RoR - PayPal ActiveMerchant - 退款

发布于 2024-09-15 18:58:00 字数 73 浏览 2 评论 0原文

我可以使用 RoR 中的 ActiveMerchant 成功直接向 PaPpal 付款。

我怎样才能对交易进行退款?

I can successfully make a direct payment to PaPpal using ActiveMerchant in RoR.

How can I make refund to a transaction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满意归宿 2024-09-22 18:58:00

汇款将涉及额外的 PayPal 费用。我建议使用ActiveMerchant退款方式。

https://github.com/Shopify /active_merchant/blob/master/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb

Money transfer will involve additional PayPal fees. I suggest to use the ActiveMerchant refund method.

https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb

子栖 2024-09-22 18:58:00

Cody Fauser 详细介绍了在 ActiveMerchant 上使用 RoR 进行 PayPal 交易的流程。

一旦您在测试模式下运行,退款就很简单。对于活跃商家,它们被称为“转账”。

在控制器中只需执行如下操作:

success = EXPRESS_GATEWAY.transfer(amount * 100, paypal_email_to_refund_to, :currency => currency.name, :subject => "Withdrawal from My Site", :note => "A personal message if you want")

Cody Fauser gives a great run down on the process to get a paypal transaction working on ActiveMerchant with RoR.

Once you get that running in test mode, it's simple to do refunds. With activemerchant, they're called 'transfers'.

In the controller just do something like below:

success = EXPRESS_GATEWAY.transfer(amount * 100, paypal_email_to_refund_to, :currency => currency.name, :subject => "Withdrawal from My Site", :note => "A personal message if you want")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文