I’m using the Payment gem to submit authorizenet cCards at their test
server.
Working fine except I cant seem to parse the gateway response in any
usable way except in a flash[:notice]
so i get this from authorize.net
‘This transaction has been approved.’
Response codes:
authorization: ‘r6LUBy’
result code: 0
avs code: ‘Y’
transaction id: ‘507082976’
md5: ‘3F55F20B96D9ED123CADCC1828EA9F2A’
cvv2 response: ‘P’
cavv response: ‘2’
from this:
“
#{transaction.error_message}
Response codes:
- authorization: #{transaction.authorization}
- result code: #{transaction.result_code}
- avs code: #{transaction.avs_code}
- transaction id: #{transaction.transaction_id}
- md5: #{transaction.md5}
- cvv2 response: #{transaction.cvv2_response}
- cavv response: #{transaction.cavv_response}
”
But i can’t seem to get any of the responses like
transaction.error_message
into any var I can store or use.
when I try this
@auth = transaction.authorization
I just get nil
Can someone clue me in as to how to parse this?