You are here

protected function PayPalController::reversalMessage in Ubercart 8.4

Returns a message for the reason code of a PayPal reversal.

1 call to PayPalController::reversalMessage()
PayPalController::processIpn in payment/uc_paypal/src/Controller/PayPalController.php
Processes Instant Payment Notifications from PayPal.

File

payment/uc_paypal/src/Controller/PayPalController.php, line 289

Class

PayPalController
Returns responses for PayPal routes.

Namespace

Drupal\uc_paypal\Controller

Code

protected function reversalMessage($reason) {
  switch ($reason) {
    case 'chargeback':
      return $this
        ->t('The customer has initiated a chargeback.');
    case 'guarantee':
      return $this
        ->t('The customer triggered a money-back guarantee.');
    case 'buyer-complaint':
      return $this
        ->t('The customer filed a complaint about the transaction.');
    case 'refund':
      return $this
        ->t('You gave the customer a refund.');
    default:
      return $this
        ->t('Reason "@reason" unknown; contact PayPal Customer Service for more information.', [
        '@reason' => $reason,
      ]);
  }
}