/*
* opt {String} 传入密文
*/
export function wxpay(opt) {
const form = document.createElement('form')
const textarea = document.createElement('input');
const button = document.createElement('button')
form.setAttribute('action', 'https://api.minpayment.com/pay.do');
form.setAttribute('method', 'post');
form.setAttribute('id', 'formid');
textarea.setAttribute('name', 'sendMsg');
textarea.setAttribute('value', opt);
button.setAttribute('type', 'submit');
button.setAttribute('id', 'submit');
/* 此处form就是后台返回接收到的数据 */
document.body.appendChild(form)
form.appendChild(textarea);
form.appendChild(button);
var submit=document.getElementById("submit");
submit.click(); // 自动提交按钮
}
h5支付返回密文请求支付端接口写法(支付宝、银联等),跳转到支付页面
最新推荐文章于 2022-02-27 10:24:13 发布