You are here

protected function AuthorizeNet::avsCodeMessage in Ubercart 8.4

Returns the message text for an AVS response code.

1 call to AuthorizeNet::avsCodeMessage()
AuthorizeNet::_uc_authorizenet_charge in payment/uc_authorizenet/src/Plugin/Ubercart/PaymentMethod/AuthorizeNet.php
Handles authorizations and captures through AIM at Authorize.Net.

File

payment/uc_authorizenet/src/Plugin/Ubercart/PaymentMethod/AuthorizeNet.php, line 505

Class

AuthorizeNet
Defines the Authorize.net payment method.

Namespace

Drupal\uc_authorizenet\Plugin\Ubercart\PaymentMethod

Code

protected function avsCodeMessage($code) {
  $text = $code . ' - ';
  switch ($code) {
    case 'A':
      $text .= $this
        ->t('Address (Street) matches, ZIP does not');
      break;
    case 'B':
      $text .= $this
        ->t('Address information not provided for AVS check');
      break;
    case 'E':
      $text .= $this
        ->t('AVS error');
      break;
    case 'G':
      $text .= $this
        ->t('Non-U.S. Card Issuing Bank');
      break;
    case 'N':
      $text .= $this
        ->t('No Match on Address (Street) or ZIP');
      break;
    case 'P':
      $text .= $this
        ->t('AVS not applicable for this transaction');
      break;
    case 'R':
      $text .= $this
        ->t('Retry – System unavailable or timed out');
      break;
    case 'S':
      $text .= $this
        ->t('Service not supported by issuer');
      break;
    case 'U':
      $text .= $this
        ->t('Address information is unavailable');
      break;
    case 'W':
      $text .= $this
        ->t('Nine digit ZIP matches, Address (Street) does not');
      break;
    case 'X':
      $text .= $this
        ->t('Address (Street) and nine digit ZIP match');
      break;
    case 'Y':
      $text .= $this
        ->t('Address (Street) and five digit ZIP match');
      break;
    case 'Z':
      $text .= $this
        ->t('Five digit ZIP matches, Address (Street) does not');
      break;
  }
  return $text;
}