如何进行 Sagepay 服务器 inFrame 集成?
我尝试了所有教程,但发现无法使用 Sagepay 服务器框架内集成进行集成。
I tried all the tutorials but I found I was not able to integrate using Sagepay server inframe integration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SagePay 网站上的文档非常好,通常您需要创建一个类,该类可以生成一些格式正确的字符串,并使用curl 将其触发到 sagepay,然后创建一个脚本来处理响应。如果您还没有这样做,请使用 SagePay 创建一个模拟器帐户,以便您可以调试脚本,这是一个非常有用的功能,并且使使用 SagePay 进行开发比使用 RBS WorldPay 更容易。
只要坚持下去,如果您在尝试后有任何具体问题,请告诉我。
The documentation on the SagePay website is very good, generally you will need to create a class that can generate a some strings that are in the correct format and use curl to fire it over to sagepay then create a script to handle the response. If you have not already done so, create yourself a simulator account with SagePay so you can debug your script this is a seriously useful feature and makes developing with SagePay easier than with RBS WorldPay for example.
Just get stuck in to it and if you have any specific questions when you have had a go, let me know.
对于像我这样一直在搜索和搜索 inframe 示例的人来说,我确实在 github 上找到了一个: https://github.com/swicks/sagepay-server-for-woocommerce
您需要更改一些内容。回调使用旧的API我认为
所以而不是: $this->notification_url = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'DS_Sagepay_Server', home_url( '/' ) ) );
应该是: $this->notification_url = get_site_url() 。 '/wc-api/DS_Sagepay_Server
另外,我必须将所有 Shipping_ 更改为 billing_ 但这只是我的设置,因为我没有运费......
For anyone, like myself who has been searching and searching for an example of inframe I did find one on github here: https://github.com/swicks/sagepay-server-for-woocommerce
there's a few things you need to change. The call back uses the old api I think
So instead of: $this->notification_url = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'DS_Sagepay_Server', home_url( '/' ) ) );
should be: $this->notification_url = get_site_url() . '/wc-api/DS_Sagepay_Server
Also I had to change all the shipping_ to billing_ but that just be my set-up as I don't have shipping...