首页 > 解决方案 > 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        

您的帮助将不胜感激!

标签: springrestpayu

解决方案


使用 UTF-8 生成 url。它可能有效


推荐阅读