当前位置:   article > 正文

uniapp 调起 支付宝h5 支付_uniapp app 调起 h5 支付宝

uniapp app 调起 h5 支付宝

后台生成h5支付预支付订单后,通过uniapp调起支付宝支付

  1. <template>
  2. <view>
  3. </view>
  4. </template>
  5. <script>
  6. export default {
  7. data() {
  8. return {
  9. }
  10. },
  11. onLoad(options){
  12. 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&notify_url=http%3A%2F%2Fqy.gsjf.cc%2F%2Fapi%2Fpayment%2Falipay%2Fnotify&version=1.0&app_id=2021004121680616&sign_type=RSA2&timestamp=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=\"{&quot;out_trade_no&quot;:&quot;da8dd7060bf648e8bded6afd296bbf7d&quot;,&quot;total_amount&quot;:0.01,&quot;subject&quot;:&quot;微信&quot;,&quot;product_code&quot;:&quot;QUICK_WAP_WAY&quot;}\">\n<input type=\"submit\" value=\"立即支付\" style=\"display:none\" >\n</form>";
  13. document.querySelector('body').innerHTML = data;
  14. document.forms[0].submit();
  15. },
  16. methods: {
  17. }
  18. }
  19. </script>
  20. <style>
  21. </style>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/700346
推荐阅读
相关标签
  

闽ICP备14008679号