spree_gateway
spree_gateway copied to clipboard
Way to pass options to gateway transaction
Hey!
I need to fill a field called "description" in a transaction to Authorize.NET.
ActiveMerchant::Billing::AuthorizeNetGateway
already map options[:description]
to that field.
The problem is that I can't figure out an easy way to populate these options from my app.
Spree::Gateway::AuthorizeNet#options
doesn't give us a way to pass custom options.
o/
For now, the solution was to patch ActiveMerchant::Billing::AuthorizeNetGateway#purchase
method, utilizing .prepend
.