cordova-plugin-vei-wechat-pay
v0.0.4
Published
A cordova plugin, JS version of Wechat SDK.
Downloads
4
Maintainers
Readme
cordova-plugin-wechat-vei-pay
A cordova plugin, JS version of Wechat SDK limited to WechatPay feature.
Features
- send wechat payment request
Documentation
Install
ionic cordova plugin add cordova-plugin-vei-wechat-pay --variable wechatappid=YOUR_WECHAT_APPID --variable universallink=YOUR_UNIVERSAL_LINK
ionic cordova build ios --PROD
ionic cordova build android --PROD --RELEASE
Uninstall
ionic cordova plugin rm cordova-plugin-vei-wechat-pay
Usage
Send payment request
declare var cordova;
var params = {
partnerid: '10000100', // merchant id
prepayid: 'wx201411101639507cbf6ffd8b0779950874', // prepay id
noncestr: '1add1a30ac87aa2db72f57a2375d8fec', // nonce
timestamp: '1439531364', // timestamp
sign: '0CB01533B8C1EF103065174F50BCA001', // signed string
appid: YOUR_WECHAT_APPID
};
cordova.plugins.WechatVEI.sendPaymentRequest(params, function () {
alert("Success");
}, function (reason) {
alert("Failed: " + reason);
});
Remarks:
- This plugin will only work when tested on a real device.