PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.14.2
Yatra – Travel Booking & Tour Operator Software v3.0.14.2
3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 All 83 releases
yatra / app / PaymentGateways / GatewayUserMessages.php

GatewayUserMessages.php in Yatra – Travel Booking & Tour Operator Software 3.0.14.2, at app/PaymentGateways/GatewayUserMessages.php

31 lines 890 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Yatra\PaymentGateways;
6
7 /**
8 * End-user safe messages for payment gateway errors (no internal config hints).
9 */
10 final class GatewayUserMessages
11 {
12 public static function gatewayNotConfigured(PaymentGatewayInterface $gateway): string
13 {
14 $title = self::displayTitle($gateway);
15
16 return sprintf(
17 /* translators: %s: Payment gateway display name, e.g. Square, Stripe */
18 __('The selected gateway (%s) is not properly configured. Please contact your website administrator.', 'yatra'),
19 $title
20 );
21 }
22
23 private static function displayTitle(PaymentGatewayInterface $gateway): string
24 {
25 $config = $gateway->getConfig();
26 $custom = isset($config['title']) ? trim((string) $config['title']) : '';
27
28 return $custom !== '' ? $custom : $gateway->getTitle();
29 }
30 }
31