SagePay 服务器集成
我正在集成 SagePay Server,但卡在步骤 4 处:https: //developer-eu.elavon.com/docs/opayo-server/take- payments
我收到此错误:服务器错误 5006:无法重定向到供应商的网站。供应商未能提供重定向 URL。
我知道对于这个错误有很多建议。这基本上意味着通知 URL 上的代码有问题。
我知道它很好地完成了前面的步骤(我得到了正确的响应参数),我已经确保允许 Opayo 的 IP,MD5 签名匹配。
我认为问题在于我如何“回复通知帖子”。
我正在做一个标准的 WebRequest 将我们的 RedirectUrl 发送到 SagePay - 但这里的链接 - SagePay RedirectURL failure -建议它不需要那个。相反,我应该“写入简单的 Response 对象。” 问题是,我不知道他们的意思。
任何有关这方面的帮助/经验,非常感谢。
乔恩
I'm integrating SagePay Server and am stuck at step 4 here: https://developer-eu.elavon.com/docs/opayo-server/taking-payments
I get this error: Server error 5006: Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.
I know there are quite a lot of suggestions for this error out there. That it basically means there is something wrong with your code on the Notification URL.
I know it is completing the previous steps fine (I get the correct response parameters), I have made sure Opayo's IPs are allowed, the MD5 signatures match.
I think the problem is how I am "Responding to the Notification Post".
I am doing a standard WebRequest to send our RedirectUrl to SagePay - but the link here - SagePay RedirectURL failure - suggests it doesn't need that. Rather I should just "write to the simple Response object." The trouble is, I don't know what they mean by that.
Any help / experience with this, much appreciated.
Jon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我希望这个答案对您有用。
您遇到了我一直在使用 Opayo(以前的 SagePay)时遇到的主要问题 - 即他们为开发人员提供的集成指南很糟糕。
由于 Opayo Server 集成方法与旧的 SagePay 版本相同,我发现遵循其更名之前的更深入说明很有帮助。您可以在此处找到这些说明:
https://www.opayo.co.uk/file/12246/download-document/SERVER_Integration_and_Protocol_Guidelines_010814.pdf
对于您的具体问题,您可以参考上述 PDF 指南的第 68 页。 RE: 您确认收到通知 POST,引用:“这是在上述步骤中由服务器发起的 POST 的纯文本响应部分。编码必须为由回车换行符 (CRLF) 分隔的名称=值字段。 ”
从字面上看,您的脚本只需打印或回显以下内容:
或者错误、中止等的等效内容
。请记住,任何未按上述格式格式化的输出都会破坏折回过程,因此您必须抑制任何错误或错误您的脚本可能生成的警告(最好以日志或其他方式捕获它们)。
Opayo 基本上没有给你修复错误的帮助,所以如果你继续遇到错误,你几乎只能在黑暗中工作。
I hope this answer isn't too late to be useful to you.
You're suffering from the main issue I've always had with Opayo (formerly SagePay) - namely that their integration guides for developers are terrible.
As the Opayo Server integration method is identical to the old SagePay version, I found it helpful to follow the much more in-depth instructions from before they rebranded. You can find those instructions here:
https://www.opayo.co.uk/file/12246/download-document/SERVER_Integration_and_Protocol_Guidelines_010814.pdf
In answer to your specific question, you can refer to page 68 of the above PDF guide. RE: You acknowledge receipt of the Notification POST, quote, "This is the plain text response part of the POST originated by the Server in the step above. Encoding must be as Name=Value fields separated by carriage-return linefeeds (CRLF)."
Literally, your script just has to print or echo something along the lines of:
Or the equivalent for errors, aborts, etc.
Bear in mind that any output not formatted like the above will break the foldback process, so you must supress any errors or warnings your script might generate (ideally capturing them in a log or some other way).
Opayo give you basically no help in bugfixing, so if you continue to encounter errors you pretty much have to work in the dark.