sagepay form php - 交易完成时我可以从 sagepay 获得回调吗?
我正在将 sagepay 放入 PHP 驱动的网站中。 到目前为止,我在将表单集成到网站中时没有遇到任何问题,与 paypal 相比,他们的文档很棒(嘀咕)
但是我在表单集成的开发指南中注意到,他们说你不能依赖 sagepay 将客户送回每次,因为他们可以关闭浏览器,或导航到其他地方等。
同时,我不想在我知道已确认/付款之前将所有内容从用户购物车移至订单中 - 否则如果他们取消或交易如果 sagepay 端以某种方式失败,当他们回来时,他们的购物车将被清除,这使得重试交易对用户来说是一种痛苦,而且我将有一个无用的订单污染我的数据库。
所以我想知道是否有一种方法可以让 sagepay 在付款发生问题时向网站发送请求,类似于 paypal 的即时付款通知?
编辑: 或者他们只是说它不完整,因为他们无法保证它,但它在大多数情况下都有效,可以实际依赖它?
I'm putting sagepay into a PHP powered site.
So far I've had no trouble integrating the Form into the site, their docs are great compared to paypal (mutter mutter)
However I noticed in the dev guide for form integration, they say you can't rely on sagepay sending the customer back every time as they could close the browser, or navigate somewhere else etc.
At the same time, I don't want to move everything out of the user's cart and into an order before I know it's been confirmed / payed for - otherwise if they cancel or the transaction fails somehow on sagepay's end, their cart will be wiped out when they come back, making retrying the transaction a pain for the user, and I will have a duff order polluting my database.
So what I want to know is if there is a way to get sagepay to send a request to the site when something happens with a payment, similar to paypal's Instant Payment Notifications?
EDIT:
Or are they only saying it's patchy because they can't garuantee it, but it works enough of the time to practically rely on it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
交易完成后,Sagepay(又名 Protx)表单集成会自动重定向用户。
对于小型网站,我建议我的客户在发送任何货物之前始终检查 sagepay 交易日志(在 sagepay 网站上)。
您应该在订单转到 Sagepay 之前记录订单。然后,当他们重定向回您的网站时,将其“状态”更改为已付费。这为您提供了更多的书面记录来发现任何可能的问题。
如果您想要更强大的解决方案。尝试 Sagepay 直接集成。它有更多的要求并且更难集成,但在较大的项目(您无法手动检查订单)中通常需要它。主要是因为用户可以留在现场,而无需前往 Sagepay 进行付款。
Sagepay (AKA Protx) form integration redirects the user automatically once the transaction has completed.
For small sites, i advise my clients to always check the sagepay transaction logs (on the sagepay site) before sending out any goods.
You should be logging the order before they go to Sagepay. Then changing it's "status" to paid when they get redirected back to your site. This gives you a bit more of a paper trail to pick up any possible issues.
If you want a more robust solution. Try Sagepay direct integration. It has more requirements and is harder to integrate but on bigger projects (where you can't manually check orders) it's usually required. Mainly because users can stay on-site without having to go off to Sagepay to make payments.