The specified transaction does not meet the criteria for issuing a loan

I am trying to make a return transaction through my django application using code:

class Handler(): 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 

I am sure that the transaction I want to return is allowed for this, because I have a return option on authorize.net. Why can't I do this in my application? maybe something is missing?

 AIM_URL = 'https://test.authorize.net/gateway/transact.dll' 

In addition, in the documentation I read that I do not need the full card number for a credit transaction, only the last 4 digits. But when I use only the last 4 digits, I get the answer that the transaction was not found

+6
source share
5 answers

The problem was the security keys that I use to communicate with authorize.net. I was able to make transactions, but not return them. When I generated new keys, the problem disappeared.

+2
source

Refunds can only be made through Authorize.Net if the initial transaction is less than 6 months and the amount is equal to or less than the original purchase amount. If it does not meet these criteria, you cannot issue this refund.

change

FYI, setting x_test_request = TRUE means that the transaction was only a test and not actually processed.

+4
source

It can also be if the transaction is very new and has not been resolved. In this case, you want to perform a transaction instead of VOID.

+2
source

I have the same problem with my test account. I cannot return a transaction created a few minutes ago. You must log in to your account in the sandbox and go to the account settings β†’ test mode β†’ transaction set β€œTest” in my case was β€œLive”. How the transaction returned success.

+2
source

from

https://support.authorize.net/authkb/index?page=content&id=A567

I found that:

  • Refunds cannot be processed for transactions older than 120 days.

therefore I think that 6 months have been changed and are currently incorrect. I tried releasing REFUND for a transaction of 122 days, and I received the error message above.

+1
source

Source: https://habr.com/ru/post/888518/


All Articles