gpt4 book ai didi

http - Go - 使用负载重定向到特定的 url

转载 作者:数据小太阳 更新时间:2023-10-29 03:14:53 26 4
gpt4 key购买 nike

我正在尝试在我的应用程序上实现支付方式,我需要帮助。

要显示支付页面,我需要使用支付负载向他们的 url 执行 POST 请求。通常他们会用 html 响应来响应,然后我需要将它渲染到屏幕上。但是,我得到的是一个错误,指出 session 无效。

我的问题:是否可以使用 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>

最佳答案

尝试使用此代码..

<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>

希望它能解决你的问题..

关于http - Go - 使用负载重定向到特定的 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39123113/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com