亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Go - 使用有效負載重定向到特定的 url

Go - 使用有效負載重定向到特定的 url

Go
滄海一幻覺 2022-03-03 15:57:09
我正在嘗試在我的應用程序上實施付款方式,我需要幫助。要顯示支付頁面,我需要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>

可以解決你的問題。。


查看完整回答
反對 回復 2022-03-03
  • 1 回答
  • 0 關注
  • 187 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號