【发布时间】:2021-03-05 11:10:55
【问题描述】:
我正在使用ActiveMerchant 1.117.0 调试当前在Ruby 2.5.8 上运行的应用程序。
我能够成功创建并保存订阅。但是,当我尝试授权保存的卡时,我不断收到reasonCode 102。 Cybersource 网关端的错误是the subscription () could not be found。
我正在尝试使用该功能进行授权:
def authorize(token, amount, order_id, line_items)
response = gateway.authorize(amount, token, order_id: order_id, line_items: line_items)
if !response.success?
raise Exceptions::ChargeFailed.new(response.message, response: response)
end
response
end
这个错误会让我相信这里的格式不正确。谁能指出一些有效的 ActiveMerchant CyberSource 示例来授权订阅或指出这里可能有什么问题?
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-5 rails-activerecord cybersource