Sagepay 5006 错误代码修复

发布于 2024-09-10 14:54:15 字数 152 浏览 8 评论 0原文

谁能告诉我为什么 sagepay 会抛出 5006(无法重定向到供应商的网站。),我可以将交易发布到 sagepay,并且可以在 sagepay 端提供信用卡信息。但是,我的问题是,一旦它返回到我的通知页面,它就会抛出错误 5006。

并且我无法到达我的成功或失败 URL。

Can any one please let me know why the sagepay throws the 5006 (Unable to redirect to Vendor's web site.), i can able to post transaction to sagepay and can able to give credit card information at sagepay's end. But, my problem is once it return back to my notification page it throws error 5006.

and i could not reach my success or fail URLs at my end.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

傲娇萝莉攻 2024-09-17 14:54:15

请参阅以下有关您的交易失败错误 5006 问题的建议:无法重定向到供应商的网站。供应商未能提供重定向 URL。

错误消息本身并不总是完全准确,因为当他们在回复您的NotificationURL 的帖子时收到的通知响应存在任何类型的问题时,就会显示错误消息。以下是您可以调查的各种已知问题的列表:

1) 您可以确认收到状态为 OK、INVALID 或 ERROR 的事务响应

2) 在将上述三个字段写入 POST 的 Response 对象之前,请确保清除响应缓冲区以删除任何标头代码、注释或 HTML。 Sage Pay 服务器期望“Status=”作为响应中的第一个字符。如果它没有看到这些,它会将响应视为错误并导致事务失败!

3) 您的通知页面应该只响应 Status 字段、RedirectURL 字段和可选的 StatusDetail 字段。这些字段之前或之后不应包含其他 HTML、标题、注释或文本。 Sage Pay 服务器会将所有此类文本视为错误并使交易失败

4) 无论状态如何,都必须发送包含有效的完全限定 URL(即以 http:// 或 https:// 开头的地址)的 RedirectURL到您网站上的最终完成页面,Sage Pay 将向您的客户发送该页面

5) 编码必须为名称 = 值字段,并用回车换行符 (CRLF) 分隔

6) 您服务器上的通知页面可能会“崩溃”,并且您应该检查以确保服务器上的通知页面可以正确处理 Sage Pay 发送的所有消息(OK、ABORT、NOTAUTHED、REJECTED、PENDING 和 ERROR)。

7) 在验证通知 POST 时没有发生错误的所有情况下,您都应该发送 OK,因此即使 Sage Pay 向您发送 ABORT 或 NOTAUTHED 状态,您也应该回复 OK 和指向通知客户的页面的 RedirectURL交易未完成。

8) Sage Pay网关运行在多种固定IP地址上,它们通常使用单独的IP地址来响应所有交易请求。

请确保您的服务器或防火墙允许以下所有 IP 地址:

对于到我们网关的出站流量:

195.170.169.9 – live.sagepay.com
195.170.169.8 – test.sagepay.com

对于入站流量,如果您使用 SERVER,则只需将 IP 列入白名单,因为这是启动回调的唯一解决方案。您不需要将此应用于我们的 FORM 和 DIRECT 集成。我们回调的IP是:

195.170.169.14
195.170.169.18
195.170.169.15

Sage Pay 使用的子网掩码是 255.255.255.000。

确保您的防火墙允许出站端口 443(仅限 HTTPS!)和入站端口 443(以及可选的 80 HTTP)访问,以便与我们的服务器(在模拟器/测试/实时)进行通信。
然而,这种情况总是有改变的余地。 Sage Pay 拥有整个 195.170.169.0/255 范围(256 个 IP)。

9) 您是否使用我们通过 NextURL 传递到您的通知页面的“SecurityKey”在您的数据库上正确匹配了交易

10) 如果 MD5 签名匹配,您的通知脚本应以状态 OK 和指向任一的 RedirectURL 进行响应订单完成页面(如果状态为 OK)或相应的订单失败页面(如果状态为 NOTAUTHED 或 ERROR)。您可能希望 ABORT 消息将客户重定向到为他们提供替代付款方式的页面,或询问他们为什么选择取消。如果签名不匹配,您应该检查您的代码是否正确重建消息,如果您确定是这样,则所有此类消息都应该使用 INVALID 进行响应,并使用 RedirectURL 将用户指向失败页面。

Please see the below recommendations regarding your issue with your transactions failing error 5006: Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.

The error message itself is not always entirely accurate, as it is displayed when there is any kind of issue with the Notification response they receive in reply to their post to your NotificationURL. The following is a list of various known issues that you can investigate:

1) You can acknowledge receipt of the transaction response with a Status of either OK, INVALID or ERROR

2) Before writing the three fields above to the Response object of the POST, please ensure you clear your response buffer to remove any header code, comments or HTML. The Sage Pay Server is expecting “Status=” to be the first characters in the response. If it does not see these, it treats the response as though it is an error and fails the transaction!

3) Your Notification Page should ONLY respond with a Status field, a RedirectURL field and optionally a StatusDetail field. No other HTML, headers, comments or text should be included either before or after these fields. The Sage Pay Server will treat all such text as an error and fail the transaction

4) Regardless of status, the RedirectURL must be sent that contains a valid, Fully Qualified URL (i.e. an address starting http:// or https://) to the final completion page on your site to which Sage Pay will send your customer

5) Encoding must be as Name=Value fields separated by carriage-return-linefeeds (CRLF)

6) Your notification page on your server may be ‘crashing’ and you should check to ensure that the notification page on your server can handle correctly all the message sent by Sage Pay (OK, ABORT, NOTAUTHED, REJECTED, PENDING and ERROR).

7) You should send OK in all circumstances where no errors occur in validating the Notification POST, so even if Sage Pay send you a status of ABORT or NOTAUTHED, you should reply with an OK and a RedirectURL that points to a page informing the customer that the transaction did not complete.

8) Sage Pay gateway operates on a variety of fixed IP addresses and they usually use separate IP addresses to respond to all transaction requests.

Please ensure that all of the following IP addresses are allowed within your Server or Firewall:

For outbound traffic to our gateway:

195.170.169.9 – live.sagepay.com
195.170.169.8 – test.sagepay.com

For inbound traffic you only need to whitelist IPs if you are using SERVER as this is the only solution that initiates call backs. You don’t need to apply this for our FORM and DIRECT integrations. The IPs from which we call back are:

195.170.169.14
195.170.169.18
195.170.169.15

The Subnet mask used by Sage Pay is 255.255.255.000.

Ensure that your firewalls allow outbound Port 443 (HTTPS only!) and inbound Ports 443 (and optionally 80 HTTP) access in order to communicate with our servers (on Simulator/Test/Live).
There is however always scope for this to change. Sage Pay own the entire 195.170.169.0/255 range (256 IP’s).

9) Are you matching the transaction correctly on your database using the ‘SecurityKey’ we passed to your notification page with the NextURL

10) If the MD5 signatures match, your Notification Script should respond with a Status of OK and a RedirectURL pointing to either an order completion page (if the Status was OK) or an appropriate order failure page (if the Status was NOTAUTHED or ERROR). You may wish ABORT messages to redirect the customer to a page providing them with alternative methods of payment, or asking them why they chose to cancel. If the signatures do not match, you should check that your code is rebuilding the message correctly, and if you are sure that it is, all such messages should be responded to with an INVALID and a RedirectURL pointing the user to a failure page.

疾风者 2024-09-17 14:54:15

尝试

提供一些想法。只要在他们的论坛中搜索 5006 即可。那里有很多帖子。

一般建议:对于支付网关,通常最好在各自的供应商站点寻求支持。

Try

for some ideas. Just search their forum for 5006. There is plenty posts.

As a general advice: with Payment Gateways it is usually better to ask for support at their respective vendors sites.

耀眼的星火 2024-09-17 14:54:15

RedirectURL 通常是您自己网站上托管的页面,该页面被设计为订单完成页面,我们在交易完成后将购物者的 Web 浏览器重定向到该页面。

有关详细信息,请查看 Sage Pay 服务器协议和集成指南

The RedirectURL is usually a page hosted on your own site which is designed to be an order complete page that we redirect the shopper's web browser to upon transaction completion.

For more information on this, please check Sage Pay Server Protocol and Integration Guidelines.

绅士风度i 2024-09-17 14:54:15

我遇到了这个问题,这里的建议都不适合我。我最终找出了问题所在:

  1. 我必须发送带有尾部斜杠的 siteFqdns 值。
  2. 我必须发送没有网站地址的 serverNotificationUrl
    前缀(即只是页面,而不是完整的 URL)
  3. 我必须对 serverNotificationUrl 值进行 urlencode(因为它
    包含查询字符串参数)

只有当我完成所有这三件事时,它才会按预期运行。

I had this problem, and none of the suggestions here worked for me. I eventually figured out what was wrong:

  1. I had to send the siteFqdns value with a trailing slash.
  2. I had to send the serverNotificationUrl without the website address
    prefix (ie. just the page, not the full URL)
  3. I had to urlencode the serverNotificationUrl value (because it
    included querystring parameters)

Only when I did all three of those things would it behave as expected.

浅暮の光 2024-09-17 14:54:15

我遇到了这个问题,并通过更新 strYourSiteFQDN 值来解决。在我的例子中,这些值缺少 https,只有 http。如果站点是 https 并且您仅提供 http,则圣人不会重定向。

I had that issue and solve by updating the strYourSiteFQDN value. In my case the values was missing https and was http only. The sage will not redirect if site is https and you provide http only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文