mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
init hosted fields functionality
This commit is contained in:
parent
1225ad83c8
commit
23dd407fc8
21 changed files with 212 additions and 45 deletions
|
@ -14,10 +14,11 @@ class SettingsFields
|
|||
$this->gateway(),
|
||||
$this->account(),
|
||||
$this->buttons(),
|
||||
$this->creditCards(),
|
||||
);
|
||||
}
|
||||
|
||||
protected function gateway(): array
|
||||
private function gateway(): array
|
||||
{
|
||||
return [
|
||||
'enabled' => [
|
||||
|
@ -91,7 +92,7 @@ class SettingsFields
|
|||
{
|
||||
return [
|
||||
'button_settings' => [
|
||||
'title' => __('Button Settings', 'woocommerce-paypal-gateway'),
|
||||
'title' => __('SmartButton Settings', 'woocommerce-paypal-gateway'),
|
||||
'type' => 'title',
|
||||
'description' => __(
|
||||
'Customize the appearance of PayPal Payments on your site.',
|
||||
|
@ -174,4 +175,44 @@ class SettingsFields
|
|||
],
|
||||
];
|
||||
}
|
||||
|
||||
private function creditCards() : array {
|
||||
return [
|
||||
|
||||
'credit_card_settings' => [
|
||||
'title' => __('Credit Card Settings', 'woocommerce-paypal-gateway'),
|
||||
'type' => 'title',
|
||||
'description' => __(
|
||||
'Customize the appearance of Credit Card Payments on your site.',
|
||||
'woocommerce-paypal-gateway'
|
||||
),
|
||||
],
|
||||
'enable_dcc' => [
|
||||
'title' => __('Enable credit card payment', 'woocommerce-paypal-gateway'),
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Enable credit card payments.', 'woocommerce-paypal-gateway'),
|
||||
'default' => 'yes',
|
||||
],
|
||||
'disable_cards' => [
|
||||
'title' => __('Disable specific credid cards', 'woocommerce-paypal-gateway'),
|
||||
'type' => 'multiselect',
|
||||
'class' => 'wc-enhanced-select',
|
||||
'default' => [],
|
||||
'desc_tip' => true,
|
||||
'description' => __(
|
||||
'By default all possible credit cards will be shown. You can disable some cards, if you wish.',
|
||||
'woocommerce-paypal-gateway'
|
||||
),
|
||||
'options' => [
|
||||
'visa' => _x('Visa', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'mastercard' => _x('Mastercard', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'amex' => _x('American Express', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'discover' => _x('Discover', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'jcb' => _x('JCB', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'elo' => _x('Elo', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
'hiper' => _x('Hiper', 'Name of credit card', 'woocommerce-paypal-gateway'),
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue