- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to perform CREDIT transaction using ruby AIM api?
I'm trying to perform refund using AIM api and failed due to lack of documentation. I have no idea what is the right way to pass Card Number and Transaction ID.
request = AuthorizeNet::AIM::Transaction.new(
AUTHORIZE_NET_CONFIG["api_login_id"],
AUTHORIZE_NET_CONFIG["api_transaction_key"], {
:transaction_type => AuthorizeNet::AIM::Transaction::Type::CREDIT,
:gateway => (Rails.env.production? ? :live : :test),
:test => !Rails.env.production?
}
)
โ07-25-2012 01:49 AM - edited โ07-25-2012 01:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have only last 4 digits of CC number.
result.fields[:card_num] = '1111'
result.fields[:transaction_id] = payment.transaction_id
result.run
result.response.fields[:response_reason_text] #=> "(TESTMODE) The credit card number is invalid."
โ07-25-2012 02:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the card number should be as masked cc# like "XXXX1111"
โ07-25-2012 04:43 AM

