Hi,
I'm working on integrating the AIM payment method using the Ruby SDK. I've followed the instructions in the readme and can successfully process payment:
transaction = AuthorizeNet::AIM::Transaction.new('API_LOGIN', 'API_KEY', :gateway => :sandbox) credit_card = AuthorizeNet::CreditCard.new('4111111111111111', '1120')
response = transaction.purchase('10.00', credit_card)
Now, I'd like to add an invoice number and description to the transaction before I make a purchase. I'm lost on how to do this - it looks like I need to create an Order object and somehow attach it to the transaction:
order = AuthorizeNet::Order.new(invoice_num: invoice_number, description: description)
Calling "transaction.order=" doesn't work however. I'm confused because it seems like there are different transaction models for all of the different payment options...
03-27-2015 02:02 PM
Hi jrohrbaugh,
There is not an exact way or method to set the invoice number description with your transaction request. The transaction object allows you to use set_fields to set any AIM API field. Please check: http://www.rubydoc.info/gems/authorizenet/1.8.3/AuthorizeNet/Transaction:set_fields
Thanks,
Joy
03-30-2015 03:13 PM
Hi, did you ever figure out how to add the Order object with invoice number and description in Ruby? I'm struggling and the documentation is terrible.
02-04-2017 09:15 AM