securetrading-a2a-settings.php
1 year ago
securetrading-api-settings.php
1 year ago
securetrading-apple-pay-settings.php
1 year ago
securetrading-google-pay-settings.php
1 year ago
securetrading-iframe-settings.php
1 year ago
securetrading-paypal-settings.php
1 year ago
securetrading-transaction-columns.php
1 year ago
securetrading-apple-pay-settings.php
70 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Author: Trust Payments |
| 4 | * User: Hoang son |
| 5 | * Date: 09/02/2023 |
| 6 | * @since 1.0.0 |
| 7 | */ |
| 8 | if (!defined('ABSPATH')) { |
| 9 | exit; |
| 10 | } |
| 11 | $helper = new WC_SecureTrading_Helper(); |
| 12 | $st_apple_settings = array( |
| 13 | // 'sanbox_mode' => array( |
| 14 | // 'type' => 'title', |
| 15 | // 'description' => '<div style="background-color: #ffffff; padding: 5px 10px; border: 1px solid #DCDCDC; border-radius: 5px; width: max-content;"> |
| 16 | // <strong> |
| 17 | // '.__( 'Test Mode Enabled', SECURETRADING_TEXT_DOMAIN ).' |
| 18 | // </strong> |
| 19 | // </div>', |
| 20 | // ), |
| 21 | 'enabled' => array( |
| 22 | 'title' => __('Enable/Disable', SECURETRADING_TEXT_DOMAIN), |
| 23 | 'label' => __('Enable Apple Pay', SECURETRADING_TEXT_DOMAIN), |
| 24 | 'type' => 'checkbox', |
| 25 | 'description' => '', |
| 26 | 'default' => 'no' |
| 27 | ), |
| 28 | 'title' => array( |
| 29 | 'title' => __('Title', SECURETRADING_TEXT_DOMAIN), |
| 30 | 'type' => 'text', |
| 31 | 'description' => __('This controls the title which the user sees during checkout.', SECURETRADING_TEXT_DOMAIN), |
| 32 | 'default' => '', |
| 33 | 'desc_tip' => true, |
| 34 | ), |
| 35 | 'merchant_id' => array( |
| 36 | 'title' => __('Merchant Identifier', SECURETRADING_TEXT_DOMAIN), |
| 37 | 'label' => __('Merchant Identifier', SECURETRADING_TEXT_DOMAIN), |
| 38 | 'type' => 'text' |
| 39 | ), |
| 40 | 'merchant_name' => array( |
| 41 | 'title' => __('Merchant Name Apple Pay', SECURETRADING_TEXT_DOMAIN), |
| 42 | 'label' => __('Merchant Name Apple Pay', SECURETRADING_TEXT_DOMAIN), |
| 43 | 'type' => 'text' |
| 44 | ), |
| 45 | 'button_style' => array( |
| 46 | 'title' => __('Button style', SECURETRADING_TEXT_DOMAIN), |
| 47 | 'label' => __('Button style', SECURETRADING_TEXT_DOMAIN), |
| 48 | 'type' => 'select', |
| 49 | 'description' => __('Button Apple Pay style', SECURETRADING_TEXT_DOMAIN), |
| 50 | 'options' => array( |
| 51 | 'black' => __('Black', SECURETRADING_TEXT_DOMAIN), |
| 52 | 'white' => __('White', SECURETRADING_TEXT_DOMAIN), |
| 53 | 'white-outline' => __('White Outline', SECURETRADING_TEXT_DOMAIN), |
| 54 | ), |
| 55 | 'desc_tip' => true, |
| 56 | ), |
| 57 | ); |
| 58 | $st_securetrading_iframe_setting = get_option('woocommerce_securetrading_api_settings'); |
| 59 | if ( !empty($st_securetrading_iframe_setting) && '1' === $st_securetrading_iframe_setting['testmode'] ) { |
| 60 | $st_apple_testmode['testmode'] = array( |
| 61 | 'type' => 'title', |
| 62 | 'description' => '<div style="background-color: #ffffff; padding: 5px 10px; border: 1px solid #DCDCDC; border-radius: 5px; width: max-content;"> |
| 63 | <strong> |
| 64 | ' . __('Test Mode Enabled', SECURETRADING_TEXT_DOMAIN) . ' |
| 65 | </strong> |
| 66 | </div>' |
| 67 | ); |
| 68 | $st_apple_settings = array_merge($st_apple_testmode, $st_apple_settings); |
| 69 | } |
| 70 | return apply_filters('wc_st_apple_pay_settings', $st_apple_settings); |