protected function PayPalWebsitePaymentsPro::avscodeMessage in Ubercart 8.4
Returns a human readable message for the AVS code.
1 call to PayPalWebsitePaymentsPro::avscodeMessage()
- PayPalWebsitePaymentsPro::chargeCard in payment/
uc_paypal/ src/ Plugin/ Ubercart/ PaymentMethod/ PayPalWebsitePaymentsPro.php - Called when a credit card should be processed.
File
- payment/
uc_paypal/ src/ Plugin/ Ubercart/ PaymentMethod/ PayPalWebsitePaymentsPro.php, line 339
Class
- PayPalWebsitePaymentsPro
- Defines the PayPal Website Payments Pro payment method.
Namespace
Drupal\uc_paypal\Plugin\Ubercart\PaymentMethodCode
protected function avscodeMessage($code) {
if (is_numeric($code)) {
switch ($code) {
case '0':
return $this
->t('All the address information matched.');
case '1':
return $this
->t('None of the address information matched; transaction declined.');
case '2':
return $this
->t('Part of the address information matched.');
case '3':
return $this
->t('The merchant did not provide AVS information. Not processed.');
case '4':
return $this
->t('Address not checked, or acquirer had no response. Service not available.');
default:
return $this
->t('No AVS response was obtained.');
}
}
switch ($code) {
case 'A':
case 'B':
return $this
->t('Address matched; postal code did not');
case 'C':
case 'N':
return $this
->t('Nothing matched; transaction declined');
case 'D':
case 'F':
case 'X':
case 'Y':
return $this
->t('Address and postal code matched');
case 'E':
return $this
->t('Not allowed for MOTO transactions; transaction declined');
case 'G':
return $this
->t('Global unavailable');
case 'I':
return $this
->t('International unavailable');
case 'P':
case 'W':
case 'Z':
return $this
->t('Postal code matched; address did not');
case 'R':
return $this
->t('Retry for validation');
case 'S':
return $this
->t('Service not supported');
case 'U':
return $this
->t('Unavailable');
case 'Null':
return $this
->t('No AVS response was obtained.');
default:
return $this
->t('An unknown error occurred.');
}
}