https://github.com/nericode/nativescript-open-pay
https://github.com/nericode/nativescript-open-pay
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/nericode/nativescript-open-pay
- Owner: nericode
- License: apache-2.0
- Created: 2019-03-25T23:45:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-22T23:42:54.000Z (about 5 years ago)
- Last Synced: 2025-03-04T16:43:35.675Z (over 1 year ago)
- Language: TypeScript
- Size: 1.96 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Openpay  
## Support
Support Android & iOS.
## Installation
```javascript
tns plugin add nativescript-open-pay
```
## Usage
In the demo you will find a test token to test quickly
```javascript
import { Observable } from "tns-core-modules/data/observable";
import { OpenPay, Card } from "nativescript-open-pay";
export class HelloWorldModel extends Observable {
private openPay: OpenPay;
constructor() {
super();
this.openPay = new OpenPay();
this.openPay.setup(
"merchant_id", // merchantId
"api_key", // apiKey
false // ProductionMode Sandbox = false
);
let card: Card = {
holderName: "Juan Perez Ramirez",
cardNumber: "4111111111111111",
expirationMonth: "12",
expirationYear: "20",
cvv2: "110"
};
this.openPay
.createToken(card)
.then(function(args) {
console.dir(args);
})
.catch(function(error) {
console.log(error);
});
}
}
```
## License
Apache License Version 2.0, January 2004