cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with VOID transaction using AIM in developer environment

Hi.

I can not void previously processed auth_only transaction using AIM in developer environment.

Yes I read this topic and understand the difference between test environment and test mode.

 

So I didn't use test mode I double checked it. Live mode in my dev account and no "x_test_request" field in the request. This is my request and response http://clip2net.com/s/1tQjd

 

Also there is no ability to watch unsettled transactions details, only settled ones. But there is ability to watch Statistic for unsettled transactions, so I noticed that for the current day there was exactly 5 unsettled transactions I couldn't void.

Please give an answer how should I test void of the transactions in test environment

 

dV
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Here's a post that indicates you -may- need to set the void to x_test_request = true for it to work:

http://community.developer.authorize.net/t5/Integration-and-Testing/Test-Void-Transaction-giving-Cod...

 

I'm assuming, of course, that your transaction ID is valid and you're not swapping two of your values somehow before they get sent to Authorize.net. Might be helpful if you could post your code in a code box (fourth option from left in Rich Text mode).

View solution in original post

TJPride
Expert
5 REPLIES 5

Here's a post that indicates you -may- need to set the void to x_test_request = true for it to work:

http://community.developer.authorize.net/t5/Integration-and-Testing/Test-Void-Transaction-giving-Cod...

 

I'm assuming, of course, that your transaction ID is valid and you're not swapping two of your values somehow before they get sent to Authorize.net. Might be helpful if you could post your code in a code box (fourth option from left in Rich Text mode).

TJPride
Expert

Hmmmm I pressed "Accept as Solution" by accident and can't redo this :(

Really it didn't help me.

As I mentioned in my original post I read suggested article and tried that solution - it doesn't work!

 

 

So my code:

//process auth_only transaction
$request = new AuthorizeNetAIM($loginId, $tranKey);
$request->setSandbox(true); // request goes to 
https://test.authorize.net/gateway/transact.dll
 (test env)

$request->amount = 34.95; $request->card_num = $cardNumber; $request->exp_date = $expDate->toString('y-MM'); $request->card_code = $cardCode; $request->zip = $zip; $response = $request->authorizeOnly(); // OK // process void transaction $request = new AuthorizeNetAIM($loginId, $tranKey); $request->void($response->transaction_id);

 

 

If the response is giving you x_trans_id (and this is what I get on my silent post page as well), then why are you using $response->transaction_id in your void? It's theoretically possible that's the wrong field name. If you're using the PHP API, it's even possible you might have to access the fields through $response->xml->fieldNameHere. Can you do a var dump of $response so we can verify what fields are there? print_r($response) for PHP, though you can probably find an equivalent for most other languages.

So I appologize this is my fault. SDK code works correct.

I stored transaction ID in DB in the field INT(11) and it's length is not enough, that's why when voiding I got wrong ID, every time the max INT(11) value - 2147483647

 

So I'm sorry again.

It happens.