赞
踩
后台生成h5支付预支付订单后,通过uniapp调起支付宝支付
- <template>
- <view>
-
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
-
- }
- },
- onLoad(options){
- var data="<form name=\"punchout_form\" method=\"post\" action=\"https://openapi.alipay.com/gateway.do?app_cert_sn=dc9807f85214bd50ccda651dabcf1543&charset=utf-8&alipay_root_cert_sn=687b59193f3f462dd5336e5abf83c5d8_02941eef3187dddf3d3b83462e1dfcf6&method=alipay.trade.wap.pay&sign=hRGDQrz4ynmMcNWLMhcoHULSedZgXP486Y2swlXI3bbMNy0RP29ZiyWEuCxswM1qZeKPKRt73ryzfqpvd4mWQcCNtrifq75tXbo9Zbxly2oOsZ1ClEWgb9shpvTNVlcvpCuR2Ot1SaAu5HxsyAJfe3ZV6O37wOhnzyy6YbR0ndMiDhu%2FhAtiELfI6QSIZZH4jnF6DNXoU0YTUcd6cwQrvu5CbIuVnNETKXxx8RVGJGkUBXyqx6GqRIQqz1WfCa8l3pc9G9M714OJiI74T2mhHrqZI%2B5uvGady9ONt7P%2FsP23LWLZaimfGliqCyzyVsz9vxYu6sIoaW5ipoXmwTXx1w%3D%3D¬ify_url=http%3A%2F%2Fqy.gsjf.cc%2F%2Fapi%2Fpayment%2Falipay%2Fnotify&version=1.0&app_id=2021004121680616&sign_type=RSA2×tamp=2023-10-11+14%3A54%3A35&alipay_sdk=alipay-sdk-java-4.38.60.ALL&format=JSON\">\n<input type=\"hidden\" name=\"biz_content\" value=\"{"out_trade_no":"da8dd7060bf648e8bded6afd296bbf7d","total_amount":0.01,"subject":"微信","product_code":"QUICK_WAP_WAY"}\">\n<input type=\"submit\" value=\"立即支付\" style=\"display:none\" >\n</form>";
- document.querySelector('body').innerHTML = data;
- document.forms[0].submit();
- },
- methods: {
-
- }
- }
- </script>
-
- <style>
-
- </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。