activemerchant - 使用 Payflow Pro 重复充电

标签 activemerchant payflowpro

这可能是对 Payflow Pro 技术支持的更多问题,但无论如何。我们正在尝试使用 ActiveMerchant 通过 Payflow Pro 付款实现对一张信用卡的重复收费。我们需要客户提供一次信用卡信息,然后每月收取可变金额的费用。但是,Payflow API 中似乎没有任何明确的 STORE 方法,尽管它必须以某种方式成为可能,因为 RECURRING 计费是标准的一部分。我们是否遗漏了某些东西并且有解决方法,或者我们必须使用一些解决方法?

最佳答案

好吧,最后我自己弄明白了,仅供引用:这与经常性付款无关。您可以通过发出和取消一些小额交易来简单地“存储”信用卡,然后,您可以放置​​返回的 request.token(或支付流术语中的“pn_ref”),而不是放置信用卡详细信息。

像这样的东西应该可以工作

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
     class PayflowGateway

       def store(credit_card, options = {})
         stored = purchase( 1, credit_card)
         return stored unless stored.success?

         # we may charge some money we should not but I guess there is
         # no better way for now
         voided = void(stored.authorization)
         return voided unless voided.success?

        return stored
      end

    end
  end
end

关于activemerchant - 使用 Payflow Pro 重复充电,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5600691/

相关文章:

SSLError Poodle 补丁 - ActiveMerchant & SayPay

ruby - 如何使用 ActiveMerchant 在 authorize.net 网关中取消授权交易

paypal - 如何进行PayPal Payflow测试交易?

angular - 从 Angular 4 应用程序向 Paypal Payflow API 发布请求时,在控制台日志中出现 Access-Control-Allow-Origin 错误

ruby-on-rails - Rails - 扩展 Ruby Gem

ruby-on-rails - 使用 Activemerchant gem 的多个商家帐户

utf-8 - PayPal Payflow Gateway UTF-8 字符

c# - 在 Express Checkout 审核页面中显示订单项

php - PayPal API - 使用 PayFlow Pro 在单次结帐中处理一次性付款和定期付款