cancel
Showing results for 
Search instead for 
Did you mean: 

AIM x_type issue when capture_only

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"
idlikesometea
Member
1 ACCEPTED SOLUTION

Accepted Solutions

$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

RaynorC1emen7
Expert
2 REPLIES 2

$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()
RaynorC1emen7
Expert

I knew it was something silly, thanks a lot!