spring - POST 请求的 PayU 集成错误 - payu 响应中缺少强制归档的“furl”
问题描述
我通过 Spring Boot 应用程序与 Payu 进行了集成。
已通过端点的 rest 模板向 Payu 发起 POST 调用——“https://test.payu.in/_payment”以及所有必填字段,如商家密钥、txnid、金额、产品信息、名字、电子邮件、电话、 surl、furl、hash,但是 payu 响应显示请求正文中缺少字段 furl。
这里,hash 是由 MessageDigest SHA-256 算法生成的 hashSequence -key|txnid|amount|productinfo|firstname|email|||||||||||salt"</p>
查找控制器代码和邮递员请求的以下详细信息:
邮递员要求:
POST /payment/payu HTTP/1.1
Host: localhost:8080
Authorization: 3yFfqME/WIdeDKJdsdewSeDVFz3RYZMCDgWsM=
Content-Type: application/x-www-form-urlencoded
firstname=Swati&phone=9899999999&productInfo=Donation&amount=800&email=xyz@gmail.com&furl=http://localhost:8080/payment/payment-response-failure&hash=4bcb0d64d85d47ab89ab90372b14b5484451aaecf3d325df9f2c5ff54a9704d5a89bce9f69bcf80bd6854006eea070858b06d7aa9d94956223ae3ea82&key=auJL3I4R&txnId=Dev75e75f95d0b3&surl=http://localhost:8080/payment/payment-response
错误描述
SORRY!We were unable to process your payment</h2>
Error Reason
Mandatory parameters which must be sent in the transaction are:
key, txnid, amount, productinfo, firstname, email, phone, surl, furl, hash
The parameters which you have actually sent in the transaction are:
key, txnid, amount, productinfo, surl, hash, firstname, email, phone
您的帮助将不胜感激!
解决方案
使用 UTF-8 生成 url。它可能有效
推荐阅读
- javascript - Angular 中的 Observables 和订阅
- javascript - 如何使用 Chai 确保 Promise 抛出错误?
- pyomo - 为什么 Pyomo 中 Set 的输出是无序的?
- kotlin - 它是如何调用具有特定关键字的过滤器的,例如在 Youtube 应用程序中。安卓工作室科特林
- c# - InvalidOperationException:无法从 Blazor 中的单例“...IAuthentication”使用范围服务“Microsoft.JSInterop.IJSRuntime”
- c++ - 使用函数时字符串下标超出范围
- python - Python:预期类型'socket.pyi',改为'socket'
- flutter - 如何创建一个在单击单词时发音的函数?
- database - 问:AWS DynamoDB 到 S3 [管道]
- nlp - 我们可以将 GPT-2 句子嵌入用于分类任务吗?