{"_id":"@checkout.com/cordova-plugin-checkout","_rev":"5-01bc589497b54f19823a3351afc75009","name":"@checkout.com/cordova-plugin-checkout","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@checkout.com/cordova-plugin-checkout","version":"1.0.0","description":"Checkout.com Frames cordova plugin - Start accepting online card payments in just a few minutes.","cordova":{"id":"cordova-plugin-checkout","platforms":["android","ios"]},"keywords":["ecosystem:cordova","cordova-android","cordova-ios"],"author":{"name":"Abdelrahman Iaaly"},"license":"MIT","gitHead":"d7b3b52987213642be140467b0144e78fed435e8","_id":"@checkout.com/cordova-plugin-checkout@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-kyJMmI5YaR+/7/PQNC1Mspo+knEzbZksZ2tCIZU9KPM7Nbp5ggv0iTR0jaqp9aKPso4M0T/ZEIN7IcXbD/VnJQ==","shasum":"59ce9ad2079319e9db1ce4f6b20460f57fd1328a","tarball":"https://registry.npmjs.org/@checkout.com/cordova-plugin-checkout/-/cordova-plugin-checkout-1.0.0.tgz","fileCount":10,"unpackedSize":20792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyhRBCRA9TVsSAnZWagAAulAQAJ55l6J9Oxxvzx9ec1B4\nJetnFsu2+Kr2SP08FxDfasdLFYjhoCggR94XqbZvGtZ2bqHuYPPK10mI4Rft\nq9LPsKG6yIWQVtgqNTxZuWE7o/PoMTaj72TC7dK7LNctD0tPDGwpiL53YPRM\nP6EXVd9iEtTjkBBB91pm1daq1qZUvt8TC3hPpcIpiY9+2U4MBj1NMa0hsf0H\nDelmyWlpEFaagdPlNndp+Op5ThaqEoXwom1PPCPwBh2gKuD5VHwxTFpZ44bL\nZUifoyNclAbtwYHd2OTfuuGB9ohWhg44z9RBvtIROuEAfaYs1FggTTq15+7+\nshs6P4FV9IvmvOYj4hZyyp10cxDtjo342K8qSI1+UkIC6DMBAWIb4bUbCcxa\nNAdUoc68Rm9Cq02v8tKHV93ZNcm6qADQt4yvewKs+unHArqAZViNHJLHl/lJ\nwaqT5n2Xn1G09ub+u57z2uT360TGQVvbF+/DAk0OzkuABOnyxs8E5NFGWIy4\nfobmt0HIgcjcoxcdMix64WZu9aCFtNLoZPHSIwI0jbbo8zClBj+f5uGZpJA2\n8GoynOZ3T8PbA76hM4PRjvYQcwGrkdnw/+SoOVtMTneyiODRzydeQ1+cgeBe\nCT2j0zWwV51SCQf+nYHQfEOq37GJk4tsQXo985dFRdK1t0njRoAOYp5jQZq3\nArXB\r\n=kZeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCiRPi13Wn5yw3tK137pN8XR2nnK5qoGM/h8WlYpv2GBwIhAJYSmRR0YrYaU6OvJZBaCQQRjiTZv8GFbLcYNVM/nnpu"}]},"_npmUser":{"name":"abdelrahman-iaaly-cko","email":"abdelrahman.iaaly@checkout.com"},"directories":{},"maintainers":[{"name":"abdelrahman-iaaly-cko","email":"abdelrahman.iaaly@checkout.com"},{"name":"erik.slagter.e2y","email":"erik.slagter@e2ycommerce.com"},{"name":"eusebiotrigo-e2y","email":"eusebio.trigo@e2ycommerce.com"},{"name":"nicolas.maalouf","email":"nicolas.maalouf@checkout.com"},{"name":"integration-cko","email":"integration@checkout.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-checkout_1.0.0_1623856193253_0.6707547154962397"},"_hasShrinkwrap":false},"1.0.1":{"name":"@checkout.com/cordova-plugin-checkout","version":"1.0.1","description":"Checkout.com Frames cordova plugin - Start accepting online card payments in just a few minutes.","cordova":{"id":"cordova-plugin-checkout","platforms":["android","ios"]},"keywords":["ecosystem:cordova","cordova-android","cordova-ios"],"author":{"name":"Abdelrahman Iaaly"},"license":"MIT","gitHead":"17a9cab2fe86927dff5b054989befc549dfa09bb","_id":"@checkout.com/cordova-plugin-checkout@1.0.1","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-l5WuDY5OF77nCsdcftKxqwUOttB9uk+1MZO92a/6jptmU1GAC8rT05OZ5ECdb+2jOSN8JJCKX2zxGb8neXwjUA==","shasum":"de9732c43c5f04bec5627d4939cb10829157a540","tarball":"https://registry.npmjs.org/@checkout.com/cordova-plugin-checkout/-/cordova-plugin-checkout-1.0.1.tgz","fileCount":10,"unpackedSize":20927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2Ck2CRA9TVsSAnZWagAA8q0P/2WZf9jOmwc8TrRkcMxT\nsE0LvDScTl6bSjEQ6sp3CJ/nliB96EEkrqpXVBFjC1iYjhacY2rfU3diAffq\nje5YtJzr514z7kc8AOdGNqX8mqMlAJNtvMwJaNHKPPi8jJ3vNnSc5qNiLsLq\nQbKAxk/pNqLgSJnDDygeEcb4Cv3H8wNvI1Xm/dOZgPcMwUmed7Gxd44UBhS8\nm0OObnGclu9vTI1ih+fQU1yTY503QxV0PFH0c9G20sJY7QXKSHyYO1d5TT+0\noa2OB5RaaoNWbundljS+/1A13ggTxstkL/oAPDF9jvu3w2OMlJrjVSMGSEQO\ngxeo4wAufyO+ualTG6AFhh9vt8GvfanI91qS5KIk22iY58R6V3hcglk//t9L\nra9sru6Q7EN3AbahCbmBAJJh94+7pWAXgE0totooZtIPuhRXkeJ6Ak+20LXs\nQ/Lgf7oNDWZyZNiWBnzAWvSsADgZYblX1J5tXlxczukkOlQSbFByo9rNumk8\n/1s4i5N/mNZHrBen4lJuDfuFGC8PLTdOubm4NmwTMU+UA8A3yp1yc0PMutGN\n3g1RG+TxswMBWs/Xk/51/98jNpZVTUj12T6+qwzzYJE6jB+7D9q5OHSenp9P\n8GlooWbXT+PfeucTRjvAusv99YMd+lUYw0JZh5f+lSK6QVuan41dhqhI4iQD\n2o/6\r\n=2jj7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCssFPrXPpq5Z0EoAphJPWsxgmXBW8pBVOT/1hjEFYuAiAwiboxRWzNlTmpPSEfM/h+N5BQo2l+IE8FTuWrNyyIdw=="}]},"_npmUser":{"name":"abdelrahman-iaaly-cko","email":"abdelrahman.iaaly@checkout.com"},"directories":{},"maintainers":[{"name":"integration-cko","email":"integration@checkout.com"},{"name":"nicolas.maalouf","email":"nicolas.maalouf@checkout.com"},{"name":"eusebiotrigo-e2y","email":"eusebio.trigo@e2ycommerce.com"},{"name":"erik.slagter.e2y","email":"erik.slagter@e2ycommerce.com"},{"name":"abdelrahman-iaaly-cko","email":"abdelrahman.iaaly@checkout.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cordova-plugin-checkout_1.0.1_1632143020722_0.5223969354778706"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-16T15:09:52.896Z","1.0.0":"2021-06-16T15:09:53.363Z","modified":"2023-05-16T10:46:16.931Z","1.0.1":"2021-09-20T13:03:40.884Z"},"maintainers":[{"email":"luis.marquez@e2ycommerce.com","name":"ljmarquezge2y"},{"email":"integration@checkout.com","name":"integration-cko"},{"email":"nicolas.maalouf@checkout.com","name":"nicolas.maalouf"},{"email":"eusebio.trigo@e2ycommerce.com","name":"eusebiotrigo-e2y"},{"email":"erik.slagter@e2ycommerce.com","name":"erik.slagter.e2y"}],"description":"Checkout.com Frames cordova plugin - Start accepting online card payments in just a few minutes.","keywords":["ecosystem:cordova","cordova-android","cordova-ios"],"author":{"name":"Abdelrahman Iaaly"},"license":"MIT","readme":"# Cordova Checkout Plugin\nA Cordova plugin for Checkout.com Frames SDK - Start accepting online card payments in just a few minutes. Supports Android & iOS.\n\n## Installation\n```shell\ncordova plugin add @checkout.com/cordova-plugin-checkout\n```\n\n## Example Usage\n\nFirst you need to initialize the plugin using your public key.\nThis could be either a testing key (sandbox) or a production key\n\nSandbox:\n```javascript\ncordova.plugins.Checkout.initSandboxClient(\"pk_test_MyTESTPublicKey\", \n    function() {\n        // Success, no need to do anything\n    }, function (error) {\n        // Error, message returned\n    });\n```\n\nProduction:\n```javascript\ncordova.plugins.Checkout.initLiveClient(\"pk_MyLivePublicKey\", \n    function() {\n        // Success, no need to do anything\n    }, function (error) {\n        // Error, message returned\n    });\n```\n\nNow you can start tokenizing credit/debit cards.\n\n```javascript\nvar ckoCardTokenRequest = {\n    number: \"4543474002249996\",\n    expiry_month: \"6\",\n    expiry_year: \"2025\",\n    name: \"Bruce Wayne\",\n    cvv: \"956\",\n    billing_address: {\n        address_line1: \"Checkout.com\",\n        address_line2: \"90 Tottenham Court Road\",\n        city: \"London\",\n        state: \"London\",\n        zip: \"W1T 4TJ\",\n        country: \"GB\"\n    },\n    phone: {\n        country_code: \"+1\",\n        number: \"4155552671\"\n    }\n};\n\nfunction onSuccess(tokenResponse) {\n    console.log('Tokenization successful', tokenResponse);\n}\n\nfunction onError(errorMessage) {\n    console.log('Error generating token', errorMessage);\n}\n\ncordova.plugins.Checkout.generateToken(ckoCardTokenRequest, onSuccess, onError);\n```\n\nExample of TokenResponse:\n```javascript\n{\n    type: \"card\",\n    token: \"tok_ubfj2q76miwundwlk72vxt2i7q\",\n    expires_on: \"2019-08-24T14:15:22Z\",\n    expiry_month: \"6\",\n    expiry_year: \"2025\",\n    scheme: \"VISA\",\n    last4: \"9996\",\n    bin: \"454347\",\n    card_type: \"Credit\",\n    card_category: \"Consumer\",\n    issuer: \"GOTHAM STATE BANK\",\n    issuer_country: \"US\",\n    product_id: \"F\",\n    product_type: \"CLASSIC\",\n    billing_address: {\n        address_line1: \"Checkout.com\",\n        address_line2: \"90 Tottenham Court Road\",\n        city: \"London\",\n        state: \"London\",\n        zip: \"W1T 4TJ\",\n        country: \"GB\"\n    },\n    phone: {\n        country_code: \"+1\",\n        number: \"4155552671\"\n    },\n    name: \"Bruce Wayne\"\n}\n```\n\nOnce you get the token, you can later use it to [request a payment](https://api-reference.checkout.com/#operation/requestAPaymentOrPayout), without you having to process or store any sensitive information.\n\n\n## Documentation\n\n\n* [Checkout](#module_cko)\n    * [.initSandboxClient(publicKey, [success], [error])](#module_cko.initSandboxClient)\n    * [.initLiveClient(publicKey, [success], [error])](#module_cko.initLiveClient)\n    * [.generateToken(ckoCardTokenRequest, [success], [error])](#module_cko.generateToken)\n* [Models](#module_models)\n    * [CkoCardTokenRequest](#module_models.CkoCardTokenRequest) : <code>Object</code>\n    * [CkoCardTokenResponse](#module_models.CkoCardTokenResponse) : <code>Object</code>\n    * [Address](#module_models.Address) : <code>Object</code>\n    * [Phone](#module_models.Phone) : <code>Object</code>\n\n\n<br>\n\n<a name=\"module_cko\"></a>\n\n## Checkout\n<a name=\"module_cko.initSandboxClient\"></a>\n\n### Checkout.initSandboxClient(publickey, [success], [error])\nInitialize Frames plugin in Sandbox mode\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicKey | <code>string</code> | Sandbox account public key |\n| [success] | <code>function</code> | Success callback |\n| [error] | <code>function</code> | Error callback |\n\n<a name=\"module_cko.initLiveClient\"></a>\n\n### Checkout.initLiveClient(publickey, [success], [error])\nInitialize Frames plugin in Live mode\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| publicKey | <code>string</code> | Live account public key |\n| [success] | <code>function</code> | Success callback |\n| [error] | <code>function</code> | Error callback |\n\n<a name=\"module_cko.generateToken\"></a>\n\n### Checkout.generateToken(ckoCardTokenRequest, success, error)\nGenerate a payment token\n\n\n| Param | Type | Description |\n| --- | --- | --- |\n| ckoCardTokenRequest | [<code>CkoCardTokenRequest</code>](#module_models.CkoCardTokenRequest) | payment token request object|\n| success | <code>function</code> | Success callback returns [<code>CkoCardTokenResponse</code>](#module_models.CkoCardTokenResponse) |\n| error | <code>function</code> | Error callback |\n\n\n<a name=\"module_models\"></a>\n\n## Models\n<a name=\"module_models.CkoCardTokenRequest\"></a>\n\n### CkoCardTokenRequest : <code>Object</code>\nParameters to create a payment token from a card\n\n**Properties**\n\n| Name | Type | Description | Required\n| --- | --- | --- | --- |\n| number | <code>string</code> | The card number | Required |\n| expiry_month | <code>string</code> | The expiry month of the card | Required |\n| expiry_year | <code>string</code> | The expiry year of the card | Required |\n| cvv | <code>string</code> | The card verification value/code. 3 digits, except for Amex (4 digits) | Optional |\n| name | <code>string</code> | The cardholder's name | Optional |\n| billing_address | [<code>Address</code>](#module_models.Address) | The cardholder's billing address | Optional |\n| phone | [<code>Phone</code>](#module_models.Address) | The cardholder's phone number | Optional |\n\n\n\n<a name=\"module_models.CkoCardTokenResponse\"></a>\n\n### CkoCardTokenResponse : <code>Object</code>\nObject returned after successful tokenization\n\n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| type | <code>string</code> | The token type, in this case \"card\" |\n| token | <code>string</code> | The token value |\n| expires_on | <code>string</code> | The expiration datetime of the token |\n| expiry_month | <code>string</code> | The expiry month of the card |\n| expiry_year | <code>string</code> | The expiry year of the card |\n| name | <code>string</code> | The cardholder's name |\n| scheme | <code>string</code> | The card scheme |\n| last4 | <code>string</code> | The last 4 digit of the card number |\n| bin | <code>string</code> | The bin range of the card |\n| card_type | <code>string</code> | The card type |\n| card_category | <code>string</code> | The card category |\n| issuer | <code>string</code> | The card issuer name |\n| issuer_country | <code>string</code> | The card issuer country ISO |\n| product_id | <code>string</code> | The card product id |\n| product_type | <code>string</code> | The card product type |\n| billing_address | [<code>Address</code>](#module_models.Address) | The cardholder's billing address |\n| phone | [<code>Phone</code>](#module_models.Address) | The cardholder's phone number |\n\n\n<a name=\"module_models.Address\"></a>\n\n### Address : <code>Object</code>\n\n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| address_line1 | <code>string</code> | The first line of the address |\n| address_line2 | <code>string</code> | The second line of the address |\n| city | <code>string</code> | The address city |\n| state | <code>string</code> | The address state |\n| zip | <code>string</code> | The address zip/postal code |\n| country | <code>string</code> | The two-letter ISO country code of the address |\n\n\n<a name=\"module_models.Phone\"></a>\n\n### Phone : <code>Object</code>\n\n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| country_code | <code>string</code> | The international country calling code. Required for some risk checks |\n| number | <code>string</code> | The phone number |\n\n<br>\n\n\n## Unit Testing\n\nYou can test this plugin with [cordova-plugin-test-framework](https://github.com/apache/cordova-plugin-test-framework)\n\nInstall the tests plugin:\n```shell\ncordova plugin add @checkout.com/cordova-plugin-checkout/tests\n```\n\n<br>\n","readmeFilename":"README.md"}