{"id":19337302,"url":"https://github.com/infobip/payment-plugin-sencha","last_synced_at":"2025-04-23T01:31:02.949Z","repository":{"id":13648665,"uuid":"16342138","full_name":"infobip/payment-plugin-sencha","owner":"infobip","description":"Payment plugin for Sencha","archived":false,"fork":false,"pushed_at":"2014-02-13T09:14:36.000Z","size":29900,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T06:12:23.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infobip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-29T10:53:02.000Z","updated_at":"2015-03-03T15:21:09.000Z","dependencies_parsed_at":"2022-08-28T10:40:10.507Z","dependency_job_id":null,"html_url":"https://github.com/infobip/payment-plugin-sencha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Fpayment-plugin-sencha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Fpayment-plugin-sencha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Fpayment-plugin-sencha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infobip%2Fpayment-plugin-sencha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infobip","download_url":"https://codeload.github.com/infobip/payment-plugin-sencha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352205,"owners_count":21416454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:14:00.206Z","updated_at":"2025-04-23T01:30:57.935Z","avatar_url":"https://github.com/infobip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Centili in-app Payment Plugin for Sencha\n===========================================\n*only for Android platform*\n\nInstallation\n------------\n\nBefore the installation, please make sure that Cordova has been installed on your computer:\n\n\t$ cordova --version\n\t3.1.0-0.1.0\n\t\nIf Cordova is not installed, use the following command to install it:\n\n\t$ npm install -g cordova\n\nTo install plugin to your Sencha Touch project, first you need to enable support for Cordova:\n\n\t$ cd /path/to/sencha/touch/project/\n\t$ sencha cordova init [AppID] [AppName]\n\nThe `AppID` is not the same as the `AppID` in your project's app.json file. An example of an AppID is `com.example.TestApp` which is in reverse domain format to be unique. The needed command in this example would be:\n\n\t$ sencha cordova init com.example.TestApp TestApp\n\nChange current directory to `cordova` and run this command:\n\t\n\t$ cd /path/to/sencha/touch/project/cordova\n    $ cordova plugin add com.infobip.mpay\n\nThis command adds the plugin to project and make it ready for use.\n\nBasic usage\n-----------\n\nInvoke the payment action calling the `startPayment` function:\n\n\tcentili.startPayment(args, success, error);\n\n`args` is an object that contains the following variables:\n\n\tvar args = {\n        \"apiKey\": \"\u003cYOUR-API-KEY\u003e\", \t//mandatory \n        \"clientId\": \"\u003cCLIENT-ID\u003e\",\t\t// optional\n        \"info\": \"Some info text...\",\t// optional\n        \"languageCode\": \"EN\",\t\t\t// optional\n        \"packageIndex\": 0,\t\t\t\t// optional\n        \"price\": 0,\t\t\t\t\t\t// optional\n        \"offline\": false,\t\t\t\t// optional (default: false)\n        \"testMode\": false\t\t\t\t// optional (default: false)\n    }\n\nFor more information about `args` fields check [this](https://www.centili.com/manual/android/android-instructions.pdf)\n\n`success` and `error` are call-back functions that need to catch the eventActions from the Centili Plugin\n\n\t\n    var success = function(purchaseResponse) {\n        if (purchaseResponse.status == \"onPurchaseSuccess\") {\n            //TODO: payment success\n        }\n\t\tif (purchaseResponse.status == \"onPurchasePending\") {\n\t\t\t//TODO: payment pending\n\t\t\t//avoid blocking calls like alert(); \n        }\n    };\n\n\n    var error = function(purchaseResponse) {\n        if (purchaseResponse.status == \"onPurchaseFailed\") {\n            //TODO: payment faild\n        }\n        if (purchaseResponse.status == \"onPurchaseCanceled\") {\n            //TODO: payment canceled            \n        }\n\t\tif (purchaseResponse.status == \"error\") {\n            //TODO: error occurs \n        }\n    };\n\n`purchaseResponse` contains the following  fields:\n\t\n\tpurchaseResponse.status;\n\tpurchaseResponse.interval;\n\tpurchaseResponse.itemAmount;\n\tpurchaseResponse.price;\n\tpurchaseResponse.apiKey;\n\tpurchaseResponse.clientId;\n\tpurchaseResponse.currency;\n\tpurchaseResponse.errorMessage;\n\tpurchaseResponse.itemName;\n\tpurchaseResponse.transactionId;\n\nIf `purchaseResponse` has status `error` then it contains the following fields:\n\n\tpurchaseResponse.status;\n\tpurchaseResponse.message;\n\tpurchaseResponse.stackTrace;\n\t\n\t\n\nUsing advanced features\n--------------------\n\nTo enable debug mode in the Android plugin set `setDebugModeEnabled` to 'true':\n\n\tcentili.setDebugModeEnabled(true, success, error);\n\nTo disable Pending Transaction Handling set `setPandingTransactionHandlingEnabled` to 'false':\n\t\n\tcentili.setPandingTransactionHandlingEnabled(false, success, error);\n\t\t\n`success` and `error` are call-back functions.\t\n\n\nOffline mode\n------------\n\nIf offline mode is set to true, it is necessary to replace `\u003cmySenchaProject\u003e/cordova/plugins/com.infobip.mpay/src/android/CentiliLib-2.jar` with library downloaded from the [Centili Partner Panel](https://www.centili.com/partners) for a specific service, in your Android project.\n\n\nExamples\n--------\n\nIn [`app.js`](https://github.com/infobip/payment-plugin-sencha/blob/master/app.js) is the example of plugin usage. \n\nOwners\n------\n\nFramework Integration Team @ Infobip Ltd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfobip%2Fpayment-plugin-sencha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfobip%2Fpayment-plugin-sencha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfobip%2Fpayment-plugin-sencha/lists"}