使用范围:UI2
Contents
class WxPay ($UI/system/api/native/wxPay)
微信支付
var wxPay = require('$UI/system/api/native/wxPay'); var tradeNo = justep.UUID.createUUID(); var notifyUrl = location.origin + "/baas/weixin/weixin/notify"; wxPay.pay({ body : "x5外卖", mchId : "1305137601", notifyUrl : notifyUrl, outTradeNo : tradeNo, totalFee : "1", success : function(e) { alert(JSON.stringify(e)) }, cancel : function(e) { alert(JSON.stringify(e)) }, fail : function(e) { alert(JSON.stringify(e)) } });
Constructor Top
WxPay () |
Static Methods Top
void | pay (Object options) |
Constructor details
Top
public
WxPay
()
微信支付
var wxPay = require('$UI/system/api/native/wxPay');
var tradeNo = justep.UUID.createUUID();
var notifyUrl = location.origin + "/baas/weixin/weixin/notify";
wxPay.pay({
body : "x5外卖",
mchId : "1305137601",
notifyUrl : notifyUrl,
outTradeNo : tradeNo,
totalFee : "1",
success : function(e) {
alert(JSON.stringify(e))
},
cancel : function(e) {
alert(JSON.stringify(e))
},
fail : function(e) {
alert(JSON.stringify(e))
}
});
public
WxPay
()
微信支付
var wxPay = require('$UI/system/api/native/wxPay'); var tradeNo = justep.UUID.createUUID(); var notifyUrl = location.origin + "/baas/weixin/weixin/notify"; wxPay.pay({ body : "x5外卖", mchId : "1305137601", notifyUrl : notifyUrl, outTradeNo : tradeNo, totalFee : "1", success : function(e) { alert(JSON.stringify(e)) }, cancel : function(e) { alert(JSON.stringify(e)) }, fail : function(e) { alert(JSON.stringify(e)) } });
Static Methods Detail Top
static
public
void
pay
(Object options)
发起支付