Showing results for 
Search instead for 
Did you mean: 


I only have a delevoper account that is not tied to any merchant account. I am a contracted 3rd party without direct access to the clients account. I am using the php AIM tools and am trying to set up the priorauthandcapture..


Can I test this funtionality in the 'sandbox'?  I have a non-zero trans_id from the auth but when sending it via priorauthandcapture I get an error that the transaction id is not found. If I try sending something to the 'live' servers ouside of the sandbox environment I get an error that the account is not active or there is an invalid merchant id.


From what I have read it seems that you need to make sure that test mode is off in the account settings(it is off) and you are not sending x_test_request = false (i am not).  Do you have to have the merchant account set up and test the priorauthandcapture on the live servers and not sandbox?




Can you post your code? Did auth_capture work? Could be the transactionID, can you echo the response from the auth_only transaction. Did use the x_trans_id field name.


The auth_capture does work.. I am transitioning that to priorauthandcapture


I have tried many variations of this code including hardcoding the transaction id (2175284037) in the method call.

        $transaction = new AuthorizeNetAIM;
            'trans_id' => $order->transaction_ref
        $response = $transaction->priorAuthCapture();

the response appears that I am sending a zero for the trans_id... even hardcoded.


    [approved] =>
    [declined] =>
    [error] => 1
    [held] =>
    [response_code] => 3
    [response_subcode] => 2
    [response_reason_code] => 16
    [response_reason_text] => The transaction cannot be found.
    [authorization_code] =>
    [avs_response] => P
    [transaction_id] => 0
    [invoice_number] =>
    [description] =>
    [amount] => 0.00
    [method] => CC
    [transaction_type] => prior_auth_capture




response from the auth_only with some personal info xxx'ed out..


    [approved] => 1
    [declined] =>
    [error] =>
    [held] =>
    [response_code] => 1
    [response_subcode] => 1
    [response_reason_code] => 1
    [response_reason_text] => This transaction has been approved.
    [authorization_code] => JSV2OM
    [avs_response] => Y
    [transaction_id] => 2175284037
    [invoice_number] =>
    [description] =>
    [amount] => 26.47
    [method] => CC
    [transaction_type] => auth_only
    [customer_id] =>
    [first_name] => xx
    [last_name] =>
    [company] =>
    [address] =>
    [city] => xxx
    [state] => xxx
    [zip_code] => xxx
    [country] => US
    [phone] =>
    [fax] =>
    [email_address] => xxx
    [ship_to_first_name] =>
    [ship_to_last_name] =>
    [ship_to_company] =>
    [ship_to_address] =>
    [ship_to_city] =>
    [ship_to_state] =>
    [ship_to_zip_code] =>
    [ship_to_country] =>
    [tax] =>
    [duty] =>
    [freight] =>
    [tax_exempt] =>
    [purchase_order_number] =>
    [md5_hash] => 634B068DF91419C46B93D27DBCA5030B
    [card_code_response] =>
    [cavv_response] => 2
    [account_number] => XXXX1111
    [card_type] => Visa
    [split_tender_id] =>
    [requested_amount] =>
    [balance_on_card] =>
    [response] => |1|,|1|,|1|,|This transaction has been approved]



sorry for the formatting..

So i should be able to test the PRIOR_AUTH_AND_CAPTURE in the sandbox environmet?

Everything look ok. Can you login to the and see if the transactionID is valid.

When I try to look up the priorauthandcapture transaction id (2175284037) on it is not found.  Any approved transactions of AUTH_ONLY are not in the test account backend.


So do i need to have a merchant account connected and test 'live' for a PRIOR_AUTH_AND_CAPTURE  transaction?

I have a test account and it work fine for me.

Did you check both settled and unsettled transaction?

Can you double check the loginID for both the auth_only and prior_auth_capture transaction.

I figured it out.. It was a careless mistake on my end. When I was creating test transactions I was mixing the auth only with some auth and capture and was tripping over my own feet.


Mods please feel free to remove the thread as it offers nothing..


Thanks for the time and suggestions RaynorC1emen7.