You are here

function uc_paypal_help in Ubercart 8.4

Implements hook_help().

File

payment/uc_paypal/uc_paypal.module, line 17
Integrates various PayPal payment services and IPN with Ubercart.

Code

function uc_paypal_help($route_name, RouteMatchInterface $route_match) {

  // @todo Write better help!
  // Provide information and instructions on the payment method add form.
  if ($route_name == 'entity.uc_payment_method.add_form') {
    if ($route_match
      ->getRawParameter('plugin_id') == 'paypal_ec') {
      return '<p>' . t('PayPal Express Checkout settings help.') . '</p>';
    }
    elseif ($route_match
      ->getRawParameter('plugin_id') == 'paypal_wps') {
      return '<p>' . t('PayPal Payments Standard settings help.') . '</p>';
    }
  }
  elseif ($route_name == 'entity.uc_payment_method.edit_form') {
    if ($route_match
      ->getParameter('uc_payment_method')
      ->getPlugin()
      ->getPluginId() == 'paypal_ec') {
      return '<p>' . t('PayPal Express Checkout settings help.') . '</p>';
    }
    elseif ($route_match
      ->getParameter('uc_payment_method')
      ->getPlugin()
      ->getPluginId() == 'paypal_wps') {
      return '<p>' . t('PayPal Payments Standard settings help.') . '</p>';
    }
  }
}