You are here

function uc_2checkout_help in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 payment/uc_2checkout/uc_2checkout.module \uc_2checkout_help()

Implements hook_help().

File

payment/uc_2checkout/uc_2checkout.module, line 13
Integrates 2Checkout.com's redirected payment service.

Code

function uc_2checkout_help($route_name, RouteMatchInterface $route_match) {

  // Provide information and instructions on the payment method
  // add and edit forms.
  if ($route_name == 'entity.uc_payment_method.add_form' && $route_match
    ->getRawParameter('plugin_id') == '2checkout') {
    return '<p>' . t('To accept PayPal payments in 2Checkout, please ensure that demo mode is disabled and your store currency is one of USD, AUD, CAD, EUR or GBP.') . '</p>';
  }
  elseif ($route_name == 'entity.uc_payment_method.edit_form' && $route_match
    ->getParameter('uc_payment_method')
    ->getPlugin()
    ->getPluginId() == '2checkout') {
    return '<p>' . t('To accept PayPal payments in 2Checkout, please ensure that demo mode is disabled and your store currency is one of USD, AUD, CAD, EUR or GBP.') . '</p>';
  }
}