When attempting to "decline" any transaction that has a FDS Pending Review Hold on it, the transaction is always being "approved".
I have been having a problem for a while now. This seems to be happening in both the Sandbox and Live Production environments.
I have run many test orders and received the same results. Just to confirm that I am indeed setting the action to "decline" and the correct transaction ID, I even tried hard coding those values in.
Pasted below is sample approveOrDeclineHeldTransaction() with values hard-coded in, and below that is the response object as received from the Sandbox.
function _approveOrDeclineHeldTransaction( $transactionid, $action )
{
$result = array();
$merchantAuthentication = $this->_new_merchant_auth();
//create a transaction
$transactionRequestType = new net\authorize\api\contract\v1\HeldTransactionRequestType();
//$transactionRequestType->setAction( $action ); // possible values: approve or decline
//$transactionRequestType->setRefTransId( $transactionid );
$transactionRequestType->setRefTransId( "40040828699" );
$transactionRequestType->setAction( "decline" ); // possible values: approve or decline
$request = new net\authorize\api\contract\v1\UpdateHeldTransactionRequest();
$request->setMerchantAuthentication( $merchantAuthentication ) ;
$request->setHeldTransactionRequest( $transactionRequestType );
$controller = new net\authorize\api\controller\UpdateHeldTransactionController($request);
$response = $this->_execute_api( $controller );
$result = $this->_parse_authnet_response( $response );
log_message('message', print("<pre>".print_r($response,true)."</pre>") );
return $result;
}
When attempting to "decline" any transaction that has a FDS Pending Review Hold on it, the transaction is always being "approved".
I have been having a problem for a while now. This seems to be happening in both the Sandbox and Live Production environments.
I have run many test orders and received the same results. Just to confirm that I am indeed setting the action to "decline" and the correct transaction ID, I even tried hard coding those values in.
Pasted below is sample approveOrDeclineHeldTransaction() with values hard-coded in, and below that is the response object as received from the Sandbox.
RESPONSE OBJECT:
net\authorize\api\contract\v1\UpdateHeldTransactionResponse Object ( [transactionResponse:net\authorize\api\contract\v1\UpdateHeldTransactionResponse:private] => net\authorize\api\contract\v1\TransactionResponseType Object ( [responseCode:net\authorize\api\contract\v1\TransactionResponseType:private] => 1 [rawResponseCode:net\authorize\api\contract\v1\TransactionResponseType:private] => [authCode:net\authorize\api\contract\v1\TransactionResponseType:private] => 8I55C8 [avsResultCode:net\authorize\api\contract\v1\TransactionResponseType:private] => P [cvvResultCode:net\authorize\api\contract\v1\TransactionResponseType:private] => [cavvResultCode:net\authorize\api\contract\v1\TransactionResponseType:private] => [transId:net\authorize\api\contract\v1\TransactionResponseType:private] => 40040828699 [refTransID:net\authorize\api\contract\v1\TransactionResponseType:private] => 40040828699 [transHash:net\authorize\api\contract\v1\TransactionResponseType:private] => [testRequest:net\authorize\api\contract\v1\TransactionResponseType:private] => 0 [accountNumber:net\authorize\api\contract\v1\TransactionResponseType:private] => XXXX1111 [entryMode:net\authorize\api\contract\v1\TransactionResponseType:private] => [accountType:net\authorize\api\contract\v1\TransactionResponseType:private] => Visa [splitTenderId:net\authorize\api\contract\v1\TransactionResponseType:private] => [prePaidCard:net\authorize\api\contract\v1\TransactionResponseType:private] => [messages:net\authorize\api\contract\v1\TransactionResponseType:private] => Array ( [0] => net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType Object ( [code:net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType:private] => 1 [description:net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType:private] => This transaction has been approved. )
)