【发布时间】:2017-11-06 03:14:31
【问题描述】:
我正在做一个功能,首先授权用户的信用卡信息。从中我可以得到响应并能够保存 transaction_id 或 authorization 密钥 w/c 可用于捕获信用卡中的钱.
但我需要单独进行,只是为了先授权信用卡信息。 因为,授权卡需要初始金额,例如:
credit_card = ActiveMerchant::Billing::CreditCard.new(
:number => '4111111111111111',
:month => '8',
:year => '2009',
:first_name => 'Tobias',
:last_name => 'Luetke',
:verification_value => '123'
)
# initial amount - 1000
response = gateway.authorize(1000, credit_card)
我现在的BIG问题是,是否可以使用#capture:
金额不同,现在是 2000
gateway.capture(2000, response.authorization)
【问题讨论】:
标签: ruby-on-rails activemerchant