我正在嘗試在我的應用程序上實施付款方式,我需要幫助。要顯示支付頁面,我需要POST使用支付負載向他們的 url 執行請求。通常他們會用一個 html 響應來響應,然后我需要將它渲染到屏幕上。但是,我得到的是一個錯誤,說會話無效。我的問題:是否可以使用POST請求有效負載重定向到另一個 url?POST http://payment.api.net/merchant/init?corpid=CN000001<order> <corp>NN01</corp> <amount>20.0</amount> <currency>USD</currency> <ordernumber>10010111</ordernumber> <redirect>http://mycallback.api.net/store/payment/callback</redirect> <randomstring>NnwLRINzhOgvmvyunzZIrUtCgvmvy</randomstring> <hash>4792e72f5e1860b220420ad3f22f005c9d2fce83f3a138336869780153145700</hash></order>
1 回答

四季花海
TA貢獻1811條經驗 獲得超5個贊
嘗試使用此代碼..
<html>
<body>
<form action="http://payment.api.net/merchant/init?corpid=CN000001" method="post" enctype='text/plain'>
<input type="hidden" name="order" value='<order><corp>NN01</corp><amount>20.0</amount><currency>USD</currency><ordernumber>10010111</ordernumber><redirect>http://mycallback.api.net/store/payment/callback</redirect><randomstring>NnwLRINzhOgvmvyunzZIrUtCgvmvy</randomstring><hash>4792e72f5e1860b220420ad3f22f005c9d2fce83f3a138336869780153145700</hash></order>'>
<button type="submit">Submit</button>
</form>
</body>
</html>
可以解決你的問題。。
- 1 回答
- 0 關注
- 187 瀏覽
添加回答
舉報
0/150
提交
取消