Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 4
Registered: ‎02-18-2015
Accepted Solution

AIM x_type issue when capture_only

[ Edited ]

Maybe this is a dumb question but I really don't know what is the issue with this. I'm trying to capture a previuosly auth_only transaction with the respective auth_code, but in the response I'm always getting that the transaction is auth_capture, no matter what I set on the x_type field. I've already tested it with the sandbox and live credentials. Thanks in advance.

This is the code

$fields = array(
'type' => 'CAPTURE_ONLY',
'auth_code' => '9JZRI3'
);

$this->authorizenet_aim->setFields($fields);

var_dump($this->authorizenet_aim);
$response = $this->authorizenet_aim->authorizeAndCapture();


printing the aim object 

 

["_x_post_fields":protected]=>
  array(7) {
    ["version"]=>
    string(3) "3.1"
    ["delim_char"]=>
    string(1) ","
    ["delim_data"]=>
    string(4) "TRUE"
    ["relay_response"]=>
    string(5) "FALSE"
    ["encap_char"]=>
    string(1) "|"
    ["type"]=>
    string(12) "CAPTURE_ONLY"
    ["auth_code"]=>
    string(6) "9JZRI3"
  }



this is the response, then it throws a "credit card is required" error.

  ["transaction_type"]=>
  string(12) "auth_capture"

Accepted Solutions
Solution
Accepted by topic author idlikesometea
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: AIM x_type issue when capture_only

[ Edited ]

$response = $this->authorizenet_aim->authorizeAndCapture();

 

There test that you can look at

https://github.com/AuthorizeNet/sdk-php/blob/master/tests/AuthorizeNetAIM_Test.php

 

you would want to use priorAuthCapture.

 

Look at the

public function testAuthCaptureVoid()

View solution in original post


All Replies
Solution
Accepted by topic author idlikesometea
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: AIM x_type issue when capture_only

[ Edited ]

$response = $this->authorizenet_aim->authorizeAndCapture();

 

There test that you can look at

https://github.com/AuthorizeNet/sdk-php/blob/master/tests/AuthorizeNetAIM_Test.php

 

you would want to use priorAuthCapture.

 

Look at the

public function testAuthCaptureVoid()
Member
Posts: 4
Registered: ‎02-18-2015

Re: AIM x_type issue when capture_only

I knew it was something silly, thanks a lot!