You are here

function commerce_payleap_avs_response in Commerce Payleap 7

Returns the message text for an AVS response code.

See also

AVS Response Codes (Transaction API Guide)

1 call to commerce_payleap_avs_response()
commerce_payleap_get_log_message in ./commerce_payleap.module
Build log message.

File

./commerce_payleap.module, line 988
Implements PayLeap payment services for use in Drupal Commerce.

Code

function commerce_payleap_avs_response($code) {
  switch ($code) {
    case 'A':
      return t('Address: Address matches, Zip does not');
    case 'B':
      return t('Street Match: Street addresses match for international transaction, but postal code doesn’t');
    case 'C':
      return t('Street Address: Street addresses and postal code not verified for international transaction');
    case 'D':
      return t('Match: Street addresses and postal codes match for international transaction');
    case 'E':
      return t('Error: Transaction unintelligible for AVS or edit error found in the message that prevents AVS from being performed');
    case 'G':
      return t('Unavailable: Address information not available for international transaction');
    case 'I':
      return t('Not Verified: Address Information not verified for International transaction');
    case 'M':
      return t('Match: Street addresses and postal codes match for international transaction');
    case 'N':
      return t('No: Neither address nor Zip matches');
    case 'P':
      return t('Postal Match: Postal codes match for international transaction, but street address doesn’t');
    case 'R':
      return t('Retry: System unavailable or time-out');
    case 'S':
      return t('Not Supported: Issuer doesn’t support AVS service');
    case 'U':
      return t('Unavailable: Address information not available');
    case 'W':
      return t('Whole Zip: 9-digit Zip matches, address doesn’t');
    case 'X':
      return t('Exact: Address and nine-digit Zip match');
    case 'Y':
      return t('Yes: Address and five-digit Zip match');
    case 'Z':
      return t('Whole Zip: 9-digit Zip matches, address doesn’t');
    case '0':
      return t('No response sent');
    case '5':
      return t('Invalid AVS response');
  }
  return '-';
}