ActiveMerchant 集成使用示例?
在哪里可以找到 ActiveMerchant
集成使用的完整示例?我可以看到大量网关的使用示例,但看不到应该如何使用集成(例如,您在 return_url
和 cancel_return_url
控制器操作中做什么? )
Where can I find a complete example of ActiveMerchant
Integrations usage? I can see tons of examples of Gateways' usage, but couldn't see how an Integration should be used (e.g. what do you do in the return_url
and cancel_return_url
controller actions?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您仍然感兴趣,我创建了一个示例Active Merchant 与 2Checkout 集成教程。
I created an example Active Merchant integration with 2Checkout tutorial if you are still interested.
我不知道是否有 ActiveMerchant Integrations 使用的具体示例(也许这会有所帮助:http:// /peepcode.com/products/activemerchant-pdf),但我可以告诉你,这取决于支付网关。
我建议进行测试交易并查看网关返回给您哪些参数,然后编写使用这些参数的代码。
例如,在 2checkout 的情况下,您需要检查 2checkout 返回的 md5 哈希值以验证交易并记录付款(也许保存从 2checkout 收到的原始参数)。当然,这也取决于您的支付网关提供什么类型的通知方式。
I don't know if there are any concrete example of ActiveMerchant Integrations usage (maybe this will help: http://peepcode.com/products/activemerchant-pdf), but I can tell you that it depends on the payment gateway.
I would suggest to make a test transaction and see what params are returned to you by the gateway and then make a code that uses those params.
For example, in case of 2checkout you would want to check md5 hash that 2checkout returns to verify the transaction and make a record of the payment (maybe save the raw params received from 2checkout). Of course, it also depends what type of notification method your payment gateway provides.