有没有人有Omnipay和Sagepay

有没有人有Omnipay和Sagepay

本文介绍了有没有人有Omnipay和Sagepay Server或Sagepay Direct(带有3D Secure)的有效示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我都在努力工作,而Omnipay并没有太多文档.我已经成功地将其用于其他支付网关,但不能与Sagepay一起使用.我正在尝试将其集成到CodeIgniter中,但可以在其他框架中的示例中工作-我感到很绝望!

I'm struggling to get either to work and Omnipay doesn't come with much documentation. I've successfully used it for other payment gateways but not with Sagepay. I'm trying to integrate it into CodeIgniter but can work from examples in other frameworks - I'm getting desperate!

推荐答案

我昨晚对此进行了演讲,并将可运行的演示脚本放在github上:

I gave a talk last night about this, and have put the working demo scripts on github here:

https://github.com/academe/OmniPay-SagePay-Demo

SagePay Direct是一次性的操作-OmniPay发送交易明细并立即得到响应.

SagePay Direct is a one-off action - OmniPay sends the transaction details and gets an immediate response.

SagePay服务器涉及将用户重定向到SagePay网站,以使用他们的卡详细信息来授权交易.该API使用一条通知消息,其中SagePay将使用授权结果直接调用您的应用程序.这是在用户会话之外发生的,因此需要将事务存储在数据库中,以便可以在两个事务之间共享.

SagePay Server involves a redirect of the user to the SagePay website to authorise the transaction using their card details. This API uses a notify message, where SagePay will call your application directly with the authorisation results. This happens outside of the user's session, and so requires the transaction to be stored in the database so it can be shared between the two transactions.

所有这些都在上面链接的脚本中. authorize.php将进行授权.编辑该内容以使用SagePay\DirectSagePay\Server查看其工作方式. SagePay\Server的通知处理程序是sagepay-confirm.php,最终将用户发送到final.php,在那里可以从数据库中存储的事务中读取结果.

All this is in the scripts linked above. authorize.php will do the authorisation. Edit that to use SagePay\Direct or SagePay\Server to see how it works. The notification handler for SagePay\Server is sagepay-confirm.php and that ultimately sends the user to final.php where the result can be read from the transaction stored in the database.

这些脚本均已注释并且应该有意义,但是请随时在此处或在该github存储库的问题跟踪器中询问有关它们的更多问题.

The scripts are all commented and should make sense, but feel free to ask more questions about them here or in the issue tracker of that github repository.

虽然我没有尝试使用3D-Secure进行SagePay\Direct.假设组合是事物,这些脚本可能需要进行一些修改以支持这一点.

I've not tried SagePay\Direct with 3D-Secure though. The scripts may need some modification to support that, assuming that combination is a thing.

这篇关于有没有人有Omnipay和Sagepay Server或Sagepay Direct(带有3D Secure)的有效示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 13:50