This Cordova Plugin adds support for the app-to-app payment on iOS and Android platforms. It uses the native VinIDPay Mobile SDK libraries, which you must also download.
For OutSystems user, follow the official guideline to integrate with the plugin. This is a sample JSON file for the Extensibility Configuration module property:
{
"plugin": {
"url": "https://github.com/VinID-lab/vinidpay-app2app-cordova-plugin.git#1.0.0"
}
}
- window.plugins.checkoutPlugin.checkout
- window.plugins.checkoutPlugin.setSandboxMode
- window.plugins.checkoutPlugin.setReturnURLScheme
Request a payment with an orderId
and signature
, return the status of the transaction (success/failed) with corresponding callback.
Enable Sandbox Mode for testing. Default value is false
, equavalent to PRODUCTION Mode.
This function helps Setup for app switch for iOS platform. It has been setup properly by default, use it if you want to customize the scheme.
Follow the native library guideline(iOS, Android) for more information about params and how it works.
Here is a sample code for making a checkout request and receiving response:
function onCheckoutPress(){
var orderId = document.getElementById('orderId').value;
var signature = document.getElementById('signature').value;
window.plugins.checkoutPlugin.checkout(
orderId,
signature,
function(data) {alert('Checkout successfull!');},
function(err) { alert('Checkout errror ' + err);});
}