spree_gateway icon indicating copy to clipboard operation
spree_gateway copied to clipboard

Way to pass options to gateway transaction

Open theo-bittencourt opened this issue 5 years ago • 1 comments

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/

theo-bittencourt avatar Jun 18 '19 00:06 theo-bittencourt

For now, the solution was to patch ActiveMerchant::Billing::AuthorizeNetGateway#purchase method, utilizing .prepend.

theo-bittencourt avatar Jun 20 '19 04:06 theo-bittencourt