You are here

function commerce_paypal_cvv_match_message in Commerce PayPal 7

Same name and namespace in other branches
  1. 7.2 commerce_paypal.module \commerce_paypal_cvv_match_message()

Returns an appropriate message given a CVV2 match code.

1 call to commerce_paypal_cvv_match_message()
commerce_paypal_wpp_submit_form_submit in modules/wpp/commerce_paypal_wpp.module
Payment method callback: checkout form submission.

File

./commerce_paypal.module, line 340
Implements PayPal payment services for use with Drupal Commerce.

Code

function commerce_paypal_cvv_match_message($code) {
  if (is_numeric($code)) {
    switch ($code) {
      case '0':
        return t('Matched');
      case '1':
        return t('No match');
      case '2':
        return t('The merchant has not implemented CVV2 code handling.');
      case '3':
        return t('Merchant has indicated that CVV2 is not present on card.');
      case '4':
        return t('Service not available');
      default:
        return t('Unkown error');
    }
  }
  switch ($code) {
    case 'M':
      return t('Match');
    case 'N':
      return t('No match');
    case 'P':
      return t('Not processed');
    case 'S':
      return t('Service not supported');
    case 'U':
      return t('Service not available');
    case 'X':
      return t('No response');
    default:
      return t('Not checked');
  }
}