支付宝支付
uni.$u.http.get('/api/pay/h5/spend', {
data: {
myOrderNum: myOrderNum
}
}).then(res => {
document.querySelector('body').innerHTML = res;
document.forms[0].submit()
})
打印后端返回的res为
<form name="punchout_form" method="post" action="https://openapi.alipay.com/gateway.do?app_cert_sn=e47c49bf6deff7f6fa353eeb632a13f2&charset=utf-8&alipay_root_cert_sn=687b59193f3f462dd5336e5abf83c5d8_02941eef3187dddf3d3b83462e1dfcf6&method=alipay.trade.wap.pay&sign=bhlSV%2BfgDpOBmL57RKY748b%2BEZrMHuwzXWEss7SeNtdClDpm9nhZadu8Kete34KMcYF8fPkirP%2FUoeU9CMzLzFk9qqKdIMmqJqPPqnlPN7ZEG8PtJ2l52tQsRaxqFsKYNjLXRPcWTdLx6yw%3D%3D&return_url=http%3A%2F%2Ftest_zt_ip62.phone.androidscloud.com%2Fcloud%2Fphone%2Fweb%2F%23%2Fpages%2Forder%2Fstatus¬ify_url=http%3A%2F%2F14.18.190.141%3A24380%2Fapi%2Fpay%2Fv1%2Falipay%2Fspend%2Fh5%2Fasync_check&version=1.0&app_id=2019092067633317&sign_type=RSA2×tamp=2022-04-10+15%3A20%3A36&alipay_sdk=alipay-sdk-java-4.7.11.ALL&format=json">
<input type="hidden" name="biz_content" value="{"out_trade_no":"XQqZC1641347855SZX67767626857","product_code":"QUICK_WAP_WAY","quit_url":"http:\/\/test_zt_ip62.phone.androidscloud.com\/cloud\/phone\/web\/#\/pages\/order\/status","subject":"10天","time_expire":"2022-04-10 15:25:36","total_amount":"9.0"}">
<input type="submit" value="立即支付" style="display:none" >
</form>
<script>document.forms[0].submit();</script>
微信支付
uni.$u.http.get('/api/pay/h5/spend', {
data: {
myOrderNum: myOrderNum
}
}).then(res => {
window.location.href = res
})
打印后端返回的res为 https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx10152504825176&package=20659&redirect_url=http://test_zt_ip.androidscloud.com/cloud?parames=%7
|