/**
* 发起微信支付
*/
wxPayment(option) {
let options = Object.assign({
payment: {},
success: () => {},
fail: () => {},
complete: () => {},
}, option);
wx.requestPayment({
timeStamp: options.payment.timeStamp,
nonceStr: options.payment.nonceStr,
package: 'prepay_id=' + options.payment.prepay_id,
signType: 'MD5',
paySign: options.payment.paySign,
success(res) {
options.success(res);
},
fail(res) {
options.fail(res);
},
complete(res) {
options.complete(res);
}
});
},