- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Passing Customer IP for Ruby CIM Transaction
Is it possible to pass the x_customer_ip when using the Ruby gem and CIM? I was able to get it to work, but I'm not sure if my solution is proper since it requird hacking up cim/transaction.rb.
In cim/transaction.rb. I changed this:
@@aim_response_options = [:delim_char, :encap_char]
to this:
@@aim_response_options = [:delim_char, :encap_char, :customer_ip]
I was then able to pass the IP like this:
transaction = AuthorizeNet::CIM::Transaction.new(my_login_id, my_transaction_key, :gateway => my_gateway)
response = transaction.create_transaction_auth_capture(3.99, customer_profile_id, customer_payment_id, nil, {:aim_options => {:customer_ip => customer_ip_here}})
Is that the correct way to pass the remote IP? If so, will cim/transaction.rb be updated in the next release of the authorize.net ruby gem?
โ10-04-2012 11:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please confirm if my changes to cim/transaction.rb were appropriate, or if there is a better way to pass along the customer IP. Thanks!
โ10-08-2012 11:23 AM