{"id":19718935,"url":"https://github.com/blaur/nativescript-mobilepay","last_synced_at":"2025-07-31T22:03:41.425Z","repository":{"id":34931976,"uuid":"189170502","full_name":"blaur/nativescript-mobilepay","owner":"blaur","description":"A NativeScript plugin to provide an integration with danish MobilePay","archived":false,"fork":false,"pushed_at":"2023-01-07T05:59:07.000Z","size":4750,"stargazers_count":4,"open_issues_count":24,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-25T11:07:40.354Z","etag":null,"topics":["angular","mobilepay","nativescript","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-29T07:11:22.000Z","updated_at":"2024-05-30T16:34:28.000Z","dependencies_parsed_at":"2023-01-15T10:45:32.189Z","dependency_job_id":null,"html_url":"https://github.com/blaur/nativescript-mobilepay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blaur/nativescript-mobilepay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaur%2Fnativescript-mobilepay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaur%2Fnativescript-mobilepay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaur%2Fnativescript-mobilepay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaur%2Fnativescript-mobilepay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaur","download_url":"https://codeload.github.com/blaur/nativescript-mobilepay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaur%2Fnativescript-mobilepay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267115116,"owners_count":24038522,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angular","mobilepay","nativescript","typescript"],"created_at":"2024-11-11T23:01:50.266Z","updated_at":"2025-07-31T22:03:41.400Z","avatar_url":"https://github.com/blaur.png","language":"JavaScript","readme":"# NativeScript MobilePay 1.1.2\n\n[![npm version](https://badge.fury.io/js/nativescript-mobilepay.svg)](https://badge.fury.io/js/nativescript-mobilepay)\n\nThis plugin is a wrapper for the MobilePay AppSwitch SDK (https://github.com/MobilePayDev/MobilePay-AppSwitch-SDK). It allows your app to utilize and integrate directly with Mobile Pay if installed on the phone.\n\n## (Optional) Prerequisites / Requirements\n\nTo use the plugin you would have create an account at MobilePay.\n\n## Installation\n\nDescribe your plugin installation steps. Ideally it would be something like:\n\n```javascript\n    tns plugin add nativescript-mobilepay\n```\n\n## Usage \n\nFirst add the following lines to main.ts:\n```javascript\n    import { platformNativeScriptDynamic } from \"nativescript-angular/platform\";\n\n    import { AppModule } from \"./app/app.module\";\n    import { MobilePay } from \"nativescript-mobilepay\";\n\n    // Do this for nativescript-mobilepay\n    var mobilePay = new MobilePay();\n    mobilePay.addDelegate();\n\n    platformNativeScriptDynamic().bootstrapModule(AppModule);\n\n```\n\nSimply import the MobilePay class as shown below and start using the features.\n\t\n```javascript\n    import { Component, OnInit } from \"@angular/core\";\n    import { MobilePay } from 'nativescript-mobilepay';\n    import { isAndroid, isIOS } from 'tns-core-modules/platform';\n\n    declare var dk: any;\n\n   @Component({\n    selector: \"Home\",\n    moduleId: module.id,\n    templateUrl: \"./home.component.html\"\n    })\n    export class HomeComponent implements OnInit {\n\n        private mobilePay: MobilePay;\n\n        constructor() {\n            // Use the component constructor to inject providers.\n        }\n\n        ngOnInit(): void {\n            // Create an instance on init. Important!\n            this.mobilePay = new MobilePay();\n            this.mobilePay.createMobilePayInstance(\"APPDK0000000000\");\n        }\n\n        pay() {\n            const isInstalled = this.mobilePay.isMobilePayInstalled(\"APPDK0000000000\");\n            console.log(\"Mobile Pay installed? \" + isInstalled + \" Android: \" + isAndroid + \" iOS: \" + isIOS);\n\n            // You can choose to provide a result callback like this\n            MobilePay.onPaymentSuccess = (result) =\u003e (console.log(\"WE MADE A SUCCESSFUL RESULT\"));\n            MobilePay.onPaymentFailure = (failure) =\u003e (console.log(\"WE MADE A FAILURE LOL\"));\n            MobilePay.onPaymentCancel = () =\u003e (console.log(\"WE MADE A SUCCESSFUL CANCEL\"));\n\n            if(isInstalled) {\n                this.mobilePay.MakePayment(\"APPDK0000000000\", 1.0, \"86715c57-8840-4a6f-af5f-07ee89107ece\")\n            }\n        }\n\n\n    }\n\n\n```\n\n## API\n\nProperties of the plugin\n\n### createMobilePayInstance\n\nCreates a mobile pay instance. Please see demo example.\n\n### isMobilePayInstalled\n\nChecks whether or not mobile pay is installed on device.\n\n### MakePayment\n\nMakes a payment request to mobile pay.\n\n### onPaymentSuccess\n\nCallback function if a payment was successful.\n\n### onPaymentFailure\n\nCallback if payment failed.\n\n### onPaymentCancel()\n\nCallback if payment was cancelled.\n    \n## License\n\nApache License Version 2.0, January 2004\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaur%2Fnativescript-mobilepay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaur%2Fnativescript-mobilepay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaur%2Fnativescript-mobilepay/lists"}