PluginProbe ʕ •ᴥ•ʔ
GlobalPayments Gateway Provider for WooCommerce / 1.5.2
GlobalPayments Gateway Provider for WooCommerce v1.5.2
1.20.2 1.20.1 1.19.3 1.19.2 1.19.1 1.19.0 1.18.4 1.18.3 trunk 1.0.0 1.0.0-b2 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.6 1.10.7 1.10.8 1.11.0 1.12.0 1.12.1 1.13.0 1.13.1 1.13.2 1.13.3 1.13.4 1.13.7 1.13.8 1.14.0 1.14.1 1.14.2 1.14.3 1.14.4 1.14.5 1.14.6 1.14.7 1.14.8 1.14.9 1.15.0 1.15.2 1.15.4 1.15.5 1.15.6 1.15.8 1.15.9 1.16.0 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.16.6 1.17.0 1.17.1 1.18.0 1.18.1 1.18.2 1.2.0 1.2.1 1.2.2 1.3.0 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5
global-payments-woocommerce / src / Gateways / GeniusGateway.php
global-payments-woocommerce / src / Gateways Last commit date
Clients 3 years ago Handlers 3 years ago HeartlandGiftCards 3 years ago Requests 3 years ago Traits 3 years ago AbstractGateway.php 3 years ago ApplePayGateway.php 3 years ago GeniusGateway.php 3 years ago GooglePayGateway.php 3 years ago GpApiGateway.php 3 years ago HeartlandGateway.php 3 years ago TransitGateway.php 3 years ago
GeniusGateway.php
166 lines
1 <?php
2
3 namespace GlobalPayments\WooCommercePaymentGatewayProvider\Gateways;
4
5 use GlobalPayments\Api\Entities\Enums\Environment;
6 use GlobalPayments\Api\Entities\Enums\GatewayProvider;
7
8 defined( 'ABSPATH' ) || exit;
9
10 class GeniusGateway extends AbstractGateway {
11 public $gateway_provider = GatewayProvider::GENIUS;
12
13 /**
14 * Live Merchant location's Merchant Name
15 *
16 * @var string
17 */
18 public $merchant_name;
19
20 /**
21 * Live Merchant location's Site ID
22 *
23 * @var string
24 */
25 public $merchant_site_id;
26
27 /**
28 * Live Merchant location's Merchant Key
29 *
30 * @var string
31 */
32 public $merchant_key;
33
34 /**
35 * Live Merchant location's Web API Key
36 *
37 * @var string
38 */
39 public $web_api_key;
40
41 /**
42 * Sandbox Merchant location's Merchant Name
43 *
44 * @var string
45 */
46 public $sandbox_merchant_name;
47
48 /**
49 * Sandbox Merchant location's Site ID
50 *
51 * @var string
52 */
53 public $sandbox_merchant_site_id;
54
55 /**
56 * Sandbox Merchant location's Merchant Key
57 *
58 * @var string
59 */
60 public $sandbox_merchant_key;
61
62 /**
63 * Sandbox Merchant location's Web API Key
64 *
65 * @var string
66 */
67 public $sandbox_web_api_key;
68
69 /**
70 * Should live payments be accepted
71 *
72 * @var bool
73 */
74 public $is_production;
75
76 public function __construct( $is_provider = false ) {
77 parent::__construct( $is_provider );
78 array_push( $this->supports, 'globalpayments_hosted_fields' );
79 }
80
81 public function configure_method_settings() {
82 $this->id = 'globalpayments_genius';
83 $this->method_title = __( 'TSYS Genius', 'globalpayments-gateway-provider-for-woocommerce' );
84 $this->method_description = __( 'Connect to the TSYS Genius gateway', 'globalpayments-gateway-provider-for-woocommerce' );
85 }
86
87 public function get_first_line_support_email() {
88 return 'securesubmitcert@e-hps.com';
89 }
90
91 public function get_gateway_form_fields() {
92 return array(
93 'is_production' => array(
94 'title' => __( 'Live Mode', 'globalpayments-gateway-provider-for-woocommerce' ),
95 'type' => 'checkbox',
96 'description' => __( 'Get your credentials from your TSYS Genius account.', 'globalpayments-gateway-provider-for-woocommerce' ),
97 'default' => 'no',
98 ),
99 'merchant_name' => array(
100 'title' => __( 'Live Merchant Name', 'globalpayments-gateway-provider-for-woocommerce' ),
101 'type' => 'text',
102 'default' => '',
103 'class' => 'live-toggle',
104 ),
105 'merchant_site_id' => array(
106 'title' => __( 'Live Merchant Site ID', 'globalpayments-gateway-provider-for-woocommerce' ),
107 'type' => 'text',
108 'default' => '',
109 'class' => 'live-toggle',
110 ),
111 'merchant_key' => array(
112 'title' => __( 'Live Merchant Key', 'globalpayments-gateway-provider-for-woocommerce' ),
113 'type' => 'password',
114 'default' => '',
115 'class' => 'live-toggle',
116 ),
117 'web_api_key' => array(
118 'title' => __( 'Live Web API Key', 'globalpayments-gateway-provider-for-woocommerce' ),
119 'type' => 'password',
120 'default' => '',
121 'class' => 'live-toggle',
122 ),
123 'sandbox_merchant_name' => array(
124 'title' => __( 'Sandbox Merchant Name', 'globalpayments-gateway-provider-for-woocommerce' ),
125 'type' => 'text',
126 'default' => '',
127 'class' => 'sandbox-toggle',
128 ),
129 'sandbox_merchant_site_id' => array(
130 'title' => __( 'Sandbox Merchant Site ID', 'globalpayments-gateway-provider-for-woocommerce' ),
131 'type' => 'text',
132 'default' => '',
133 'class' => 'sandbox-toggle',
134 ),
135 'sandbox_merchant_key' => array(
136 'title' => __( 'Sandbox Merchant Key', 'globalpayments-gateway-provider-for-woocommerce' ),
137 'type' => 'password',
138 'default' => '',
139 'class' => 'sandbox-toggle',
140 ),
141 'sandbox_web_api_key' => array(
142 'title' => __( 'Sandbox Web API Key', 'globalpayments-gateway-provider-for-woocommerce' ),
143 'type' => 'password',
144 'default' => '',
145 'class' => 'sandbox-toggle',
146 ),
147 );
148 }
149
150 public function get_frontend_gateway_options() {
151 return array(
152 'webApiKey' => $this->get_credential_setting( 'web_api_key' ),
153 'env' => $this->is_production ? parent::ENVIRONMENT_PRODUCTION : parent::ENVIRONMENT_SANDBOX,
154 );
155 }
156
157 public function get_backend_gateway_options() {
158 return array(
159 'merchantName' => $this->get_credential_setting( 'merchant_name' ),
160 'merchantSiteId' => $this->get_credential_setting( 'merchant_site_id' ),
161 'merchantKey' => $this->get_credential_setting( 'merchant_key' ),
162 'environment' => $this->is_production ? Environment::PRODUCTION : Environment::TEST,
163 );
164 }
165 }
166