Hi All,
When submitting refund transaction through AIM method, when i pass full Credit Card number, test URL works fine. But when i pass last four digit or "XXXX"+Last four digits, transaction throws Invalid credit card number error code.
Whether i have to pass only last four digit, or like "XXXX"+Last four digit for live url. Please help.
Thanks
Chellam
03-19-2011 04:21 AM
Hi,
For example if you used credit card number 4111111111111111
you need to pass in as a masked cc# so it will be x_card_num=XXXX1111
if x_type= CREDIT (Refund process)
Balakrishnan
Sr Developer
Trinay Technology Solutions
www.trinaytech.com
570-575-0475
03-20-2011 08:59 PM
Thank you Balakrishnan.
Please help me, where can i find sample code for CIM refund.
Thanks in advance.
Chella
03-21-2011 10:46 AM
HI
Please verify this Post
Balakrishnan
Sr Developer
Trinay Technology Solutions
www.trinaytech.com
570-575-0475
03-22-2011 12:09 AM
I have similar problem, when I pass full card number I can complete refund transaction, but when 4 digits or "XXXX" and 4 digits I receive the transaction not found error.
When I pass full card number transaction is found but cannot be refunded, i have "The referenced transaction does not meet the criteria for issuing a credit" error.
It is strange because I can make refund via my test authorize.net account. When I send additional 'x_test_request': 'TRUE' parameter transaction is approved.
But I think it is wrong way because I post my requests to 'https://test.authorize.net/gateway/transact.dll'.
So how to send only last 4 digits from cc number and what about this x_test_request parameter?
This is my python code, maybe something is missing?
def __init__(self):
self.initial_values = {
'x_login': settings.API_LOGIN,
'x_tran_key': settings.TRANS_KEY,
'x_delim_data': 'TRUE',
'x_relay_response': 'FALSE',
'x_version': '3.1',
}
def send_AIM_credit(self, amount):
self.amount = amount
self.additional_values = {
'x_type': 'CREDIT',
'x_card_num': '370000000000002',
'x_amount': '123',
'x_description': "Refund",
'x_trans_id': 'someid'
}
result = self.__send_AIM_request()
if result[0] in ['3', '2']:
raise Exception("ERROR %s" % result[2], result[3])
return result
def __send_AIM_request(self):
self.initial_values.update(self.additional_values)
logging.info(self.initial_values)
params_string = urllib.urlencode(self.initial_values)
response = urllib2.urlopen(settings.AIM_URL, params_string).read()
response_list = response.split(',')
logging.info(response_list)
return response_list
05-19-2011 04:02 AM
When using AIM, it is probably easiest to pass only the last 4 digits of the card number, preceding it with XXXX is not required. The errors that you are receiving indicate that the transaction ID that you are passing simply is not eligible for a credit. Credits can only be issued against transactions that have successfully settled within the past 120 days. In this case, the transaction you are trying to refund may not have settled yet.
05-20-2011 01:38 PM
In authorize.net panel transaction status is settled successfully.
No matter if I send only 4 digits or XXXX and digits. I does not work.
I think there is other problem. Is it possible to make refund transaction in test server?
05-23-2011 01:54 AM
x_trans_id is the correct variable. Transactions submitted as CREDIT without a valid Transaction ID or a full card number will fail. The error that you are receiving clearly indicates that the transaction you are attempting to credit is not elligible. Please ensure that you are properly including the transaction ID and that the transaction has settled successfully withint he past 120 days. I just tested issuing a refund on my own test account and did not encounter any errors.
05-25-2011 03:02 PM
Hi ,
I am using the aim api to charge the credit cards , i am using the post method like follows
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader responseStream = new StreamReader(objResponse.GetResponseStream()))
{
post_response = responseStream.ReadToEnd();
responseStream.Close();
}
// the response string is broken into an array
// The split character specified here must match the delimiting character specified above
//Array response_array = post_response.Split('|');
string[] response_array = post_response.Split('|');
string responsecode = response_array[0].ToString();
string responsereason = response_array[3].ToString();
confirmationcode = response_array[37].ToString();
I assume that the response_array[37] returns me the transaction id , i save this as the transactionid.
So the problem is when i call the api for refunding a payment i pass this transaction id along with the last 4 digits of the cc , & then the amount , the response i get is "Invalid Credit Card", My 'x_type' is 'CREDIT'.
when i change 'x_type' to 'VOID' i am getting the response "A valid referenced transaction ID is required. "
Pls help , and let me knw what i am doing wrong.
08-18-2011 06:46 AM
The transation id is at the 7 postion or index 6 on a zero based array.
2)If transaction is settled, you can only do CREDIT.
Else only VOID.
08-18-2011 07:01 AM