未能测试全部功能, 如发现问题请及时指正, 谢谢~
Install the plugin
# 暂未上传 cordova 插件库 请先从 github 或 coding 安装
or install form github
$ cordova plugin add https://github.com/TongChia/cordova-plugin-pingpp.git --variable URL_SCHEME=YOUR-URL-SCHEME
form coding.net
$ cordova plugin add https://git.coding.net/tongchia/cordova-plugin-pingpp.git --variable URL_SCHEME=YOUR-URL-SCHEME
javascript
pingpp.createPayment(charge, function(result){
console.log('suc: '+result) //"success"
}, function(result){
console.log('err: '+result) //"fail"|"cancel"|"invalid"
});
with Angular (#ionic)
angular.module('yourApp', [])
.factory('$pingpp', ['$q', '$window', function ($q, $window) {
return {
createPayment: function (charge) {
return $q(function (resolve, reject) {
$window.pingpp.createPayment(charge, function () {
resolve();
}, function (err) {
reject(err);
});
});
}
};
}]);
Base on pingpp native sdk
Apache License 2.0