Closed lstephen closed 9 years ago
None of the ActiveMerchant gateways will work out-of-the box after the code (and test code) has been generated, there will always be some modifications needed (even for the simplest gateways, such as Stripe).
If store
isn't provided by the provider, just pass options[:skip_gw] = true
by default in the add_payment_method
implementation. The killbill
gem will make sure the relevant state is persisted in the plugin tables, but no remote call will be attempted.
If store isn't provided by the provider, just pass options[:skip_gw] = true by default in the add_payment_method implementation.
Thanks, this is what I needed. :thumbsup:
The
store
method of a gateway is called here: https://github.com/killbill/killbill-plugin-framework-ruby/blob/master/lib/killbill/helpers/active_merchant/payment_plugin.rb#L171Some gateways do not implement this method as they do not support it. As mentioned in the Active Merchant documentation it is optional: http://www.rubydoc.info/github/activemerchant/active_merchant/ActiveMerchant/Billing/Gateway
A workaround is to have a gateway implement a dummy store method, but perhaps there can be a check added to see if a gateway supports it or not.