protected function PayPalWebsitePaymentsPro::buildErrorMessages in Ubercart 8.4
Builds error message(s) from PayPal failure responses.
1 call to PayPalWebsitePaymentsPro::buildErrorMessages()
- 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 305
Class
- PayPalWebsitePaymentsPro
- Defines the PayPal Website Payments Pro payment method.
Namespace
Drupal\uc_paypal\Plugin\Ubercart\PaymentMethodCode
protected function buildErrorMessages($nvp_response) {
$code = 0;
$message = '';
while (array_key_exists('L_SEVERITYCODE' . $code, $nvp_response)) {
$message .= '<br /><b>' . SafeMarkup::checkPlain($nvp_response['L_SEVERITYCODE' . $code]) . ':</b> ' . SafeMarkup::checkPlain($nvp_response['L_ERRORCODE' . $code]) . ': ' . SafeMarkup::checkPlain($nvp_response['L_LONGMESSAGE' . $code]);
$code++;
}
return $message;
}