Question

I am trying to submit a payment without the CVV number using the AIM API. I am able to submit the payment, but when the charge occurs, it says the CVV number does not match ("No Match") in the Merchant Interface even though I am not submitting a value other than NULL. If I submit the same payment through Authorize.net's Merchant Interface, it will say "Not Applicable". Is there away to accomplish this through the API?

Thanks

Method 1:

$payment->setTransaction($credit_card_number, $expiration, $total);

Method 2:

$payment->setTransaction($credit_card_number, $expiration, $total, NULL, $invoice, $tax);
Was it helpful?

Solution

I can tell from that code snippet that you are using the AuthnetAIM class that I wrote. To make it so this class never sends over the CVV parameter when it is null change this line:

$this->params['x_card_code'] = str_pad((int) $cvv, 3, "0", STR_PAD_LEFT);

to this:

if (!is_null($cvv))
{
    $this->params['x_card_code'] = str_pad((int) $cvv, 3, "0", STR_PAD_LEFT);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top