赞
踩
支付宝文档
响应示例
<form name="punchout_form" method="post" action="https://openapi.alipay.com/gateway.do?charset=UTF-8&method=alipay.trade.wap.pay&format=json&sign=ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE&version=1.0&app_id=2017060101317939&sign_type=RSA2×tamp=2014-07-24+03%3A07%3A50">
<input type="hidden" name="biz_content" value="{"time_expire":"2016-12-31 10:05:00","extend_params":"","query_options":"[\"hyb_amount\",\"enterprise_pay_info\"]","quit_url":"http://www.taobao.com/product/113714.html","settle_info":"","subject":"大乐透","product_code":"QUICK_WAP_WAY","body":"Iphone6 16G","passback_params":"merchantBizType%3d3C%26merchantBizNo%3d2016010101111","specified_channel":"pcredit","goods_detail":"","merchant_order_no":"20161008001","enable_pay_channels":"pcredit,moneyFund,debitCardExpress","out_trade_no":"70501111111S001111119","ext_user_info":"","total_amount":"9.00","business_params":"{\"mc_create_trade_ip\":\"127.0.0.1\"}","timeout_express":"90m","disable_pay_channels":"pcredit,moneyFund,debitCardExpress","auth_token":"appopenBb64d181d0146481ab6a762c00714cC27"}">
<input type="submit" value="立即支付" style="display:none" >
</form>
<script>document.forms[0].submit();</script>
vue 代码
const div = document.createElement('div');
div.innerHTML = data.qrcodeRs;
document.body.appendChild(div);
document.forms[0].submit();
后端生成支付二维码,轮询查询是否支付成功
let timerId: NodeJS.Timeout | null = null; function startTask() { timerId = setInterval(() => { setTimeout(() => { console.log('11 start'); }, 0); }, 1000 * 3); } function clearTask() { if (timerId) { clearInterval(timerId); timerId = null; } } onUnmounted(() => { clearTask(); });
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。