AVS Exception yields empty response

kalinma1
Contributor
Contributor

I am using PayFlowPro API to process orders for an online subscription to one of our products and periodically see an error in the response from your server.

We have our preferences set to FLAG orders that throw an AVS exception, so the order should be processed but flagged, which seems to be happening on your end. However, some of these orders throw an exception and return an error message in the response, "Failed AVS Check: 10554-The transaction was refused" even though they are accepted on your end.

After executing the following PHP code,

$txn = new PayflowTransaction();
setTransactionData($txn, $post_data);

try {
$txn->process();
$pfp_resp = $txn->response_arr;
<MORE CODE HERE>

} catch( CVV2Exception $cvve ) {
<MORE CODE HERE>

} catch( AVSException $avse ) {
<MORE CODE HERE>

} catch( TransactionDataException $tde ) {
<MORE CODE HERE>

} catch( InvalidCredentialsException $ice ) {
<MORE CODE HERE>

} catch( FraudProtectionException $fpe ) {
<MORE CODE HERE>

} catch( InvalidResponseCodeException $irc ) {
<MORE CODE HERE>

} catch( Exception $e ) {
$pfp_resp = $txn->response_arr;
$err_msg = $e->getMessage();
error_log('RADCASES ORDER ERROR: '.$err_msg);
<MORE CODE HERE>

}

The response array (from $txn->response_arr) is empty, but the error message (from $e->getMessage()) is "Failed AVS Check: 10554-The transaction was refused." No Trasaction ID is returned in the response, so my script rejects the order. However, when I look at our merchant account in the PayPal admin panel, the customer was charged and a Transaction ID was recorded. This means I have to "manually" grant the user access to the subscription for which they were charged and manually retrieve the Transaction ID for our accounting department. Your server really should return a full response, including the Transaction ID, whenever an order goes through and the customer is charged. I cannot really program around this bug because, even if I accept orders that return this specific error ('Failed AVS Check: 10554'), I still have to monitor the site daily for this error, and go into our merchange account admin panel to retrieve Transaction IDs that were not returned in the response. What's interesting is that the exception isn't caught in the AVSException block or even the FraudProtectionException block, but the final "catch-all" Exception block.

Please advise.
Thank you.

Login to Me Too
1 REPLY 1

Charlie137
Contributor
Contributor
Help PayPal is close my account because I made my account when I was 17 they put a limitation on it won’t let me close the account Access the account Can’t do anything how do I make another account now I am 19
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.