References
note
The h5 page embedded in the web-view of the applet needs to add the following code in order to use part of the API of the applet.
Query h5 available Alipay applet API
<script type="text/javascript" src="https://appx/web-view.min.js"></script>
Applet pulls up the payment cash register
my.tradePay({
// 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号trade_no
tradeNO: '201711152100110410533667792',
success: (res) => {
my.alert({
content: JSON.stringify(res),
});
},
fail: (res) => {
my.alert({
content: JSON.stringify(res),
});
}
});