You are here

function commerce_payflow_link_result_message in Commerce PayPal 7.2

Returns the message to display to a customer explaining the RESULT of a Payflow transaction.

Parameters

$result: The RESULT value from a Payflow transaction.

Return value

An error or explanation message fit for display to a customer.

1 call to commerce_payflow_link_result_message()
commerce_payflow_link_redirect_form_validate in modules/payflow/commerce_payflow.module
Payment method callback: redirect form return validation.

File

modules/payflow/commerce_payflow.module, line 1445
Implements PayPal Payments Advanced (U.S. only) and Payflow Link Hosted Checkout pages and Transparent Redirect.

Code

function commerce_payflow_link_result_message($result) {
  switch (intval($result)) {
    case 0:
      return t('Transaction approved.');
    case 1:
      return t('Account authentication error. Please contact an administrator to resolve this issue.');
    case 5:
    case 26:
      return t('The Payflow hosted checkout page is not configured for use. Please contact an administrator to resolve this issue.');
    case 2:
    case 25:
      return t('You have attempted to use an invalid payment method. Please check your payment information and try again.');
    case 3:
      return t('The specified transaction type is not appropriate for this transaction.');
    case 4:
    case 6:
      return t('The payment request specified an invalid amount format or currency code. Please contact an administrator to resolve this issue.');
    case 7:
    case 8:
    case 9:
    case 10:
    case 19:
    case 20:
      return t('The payment request included invalid parameters. Please contact an administrator to resolve this issue.');
    case 11:
    case 115:
    case 160:
    case 161:
    case 162:
      return t('The payment request timed out. Please try again or contact an administrator to resolve the issue.');
    case 12:
    case 13:
    case 22:
    case 23:
    case 24:
      return t('Payment declined. Please check your payment information and try again.');
    case 27:
    case 28:
    case 29:
    case 30:
    case 31:
    case 32:
    case 33:
    case 34:
    case 35:
    case 36:
    case 37:
    case 52:
    case 99:
    case 100:
    case 101:
    case 102:
    case 103:
    case 104:
    case 105:
    case 106:
    case 107:
    case 108:
    case 109:
    case 110:
    case 111:
    case 113:
    case 116:
    case 118:
    case 120:
    case 121:
    case 122:
    case 132:
    case 133:
    case 150:
    case 151:
      return t('The transaction failed at PayPal. Please contact an administrator to resolve this issue.');
    case 50:
    case 51:
      return t('Payment was declined due to insufficient funds or transaction limits. Please check your payment information and try again.');
    case 112:
      return t('Address and Zip code do not match. Please check your payment information and try again.');
    case 114:
      return t('Card Security Code (CSC) does not match. Please check your payment information and try again.');
    case 117:
    case 125:
    case 127:
    case 128:
      return t('Payment was declined due to merchant fraud settings. Please contact an administrator to resolve this issue.');
    case 126:
      return t('Payment was flagged for review by the merchant. We will validate the payment and update your order as soon as possible.');
  }
}