diff --git a/inc/onepay/abstract-payment.php b/inc/onepay/abstract-payment.php
index e37e480..72afad0 100644
--- a/inc/onepay/abstract-payment.php
+++ b/inc/onepay/abstract-payment.php
@@ -39,7 +39,6 @@ abstract class WooViet_OnePay_Abstract extends WC_Payment_Gateway {
public function __construct() {
$this->id = strtolower( get_called_class() );
$this->has_fields = false;
- $this->order_button_text = __( 'Proceed to OnePay', 'woo-viet' );
$this->configure_payment();
$this->supports = array(
'products',
@@ -50,11 +49,12 @@ abstract class WooViet_OnePay_Abstract extends WC_Payment_Gateway {
$this->init_settings();
// Define user set variables.
- $this->title = $this->get_option( 'title' );
- $this->description = $this->get_option( 'description' )
- . sprintf( '
',
- $this->id . '_logo',
- apply_filters( $this->id . '_logo', WOO_VIET_URL . "assets/$this->id.png" ) );
+ $this->title = $this->get_option( 'title' );
+ $this->description = $this->get_option( 'description' )
+ . sprintf( '
',
+ $this->id . '_logo',
+ apply_filters( $this->id . '_logo', WOO_VIET_URL . "assets/$this->id.png" ) );
+ $this->order_button_text = $this->get_option( 'order_button_text' );
$this->testmode = 'yes' === $this->get_option( 'testmode', 'no' );
$this->merchant_id = $this->get_option( 'merchant_id' );
diff --git a/inc/onepay/domestic-settings.php b/inc/onepay/domestic-settings.php
index 2c0667e..12b428e 100644
--- a/inc/onepay/domestic-settings.php
+++ b/inc/onepay/domestic-settings.php
@@ -21,7 +21,6 @@ return array(
'label' => __( 'Enable OnePay sandbox (testing)', 'woocommerce' ),
'default' => 'no',
'description' => sprintf( __( 'OnePay sandbox can be used to test payments. See the testing info.', 'woocommerce' ), 'https://mtf.onepay.vn/developer/?page=modul_noidia' ),
- //@todo: add the logo https://mtf.onepay.vn/developer/?page=logo
),
'title' => array(
'title' => __( 'Title', 'woo-viet' ),
@@ -37,6 +36,13 @@ return array(
'description' => __( 'This controls the description which the user sees during checkout.', 'woo-viet' ),
'default' => __( 'With OnePay, you can make payment by using any local Vietnam ATM card.', 'woo-viet' )
),
+ 'order_button_text' => array(
+ 'title' => __( 'Button text', 'woo-viet' ),
+ 'type' => 'text',
+ 'desc_tip' => true,
+ 'description' => __( 'Button label in the checkout page.', 'woo-viet' ),
+ 'default' => __( 'Pay with ATM cards', 'woo-viet' )
+ ),
'api_details' => array(
'title' => __( 'API Credentials', 'woo-viet' ),
'type' => 'title',
diff --git a/inc/onepay/international-settings.php b/inc/onepay/international-settings.php
index b2d8cfa..6d7cca9 100644
--- a/inc/onepay/international-settings.php
+++ b/inc/onepay/international-settings.php
@@ -21,7 +21,6 @@ return array(
'label' => __( 'Enable OnePay sandbox (testing)', 'woocommerce' ),
'default' => 'no',
'description' => sprintf( __( 'OnePay sandbox can be used to test payments. See the testing info.', 'woocommerce' ), 'https://mtf.onepay.vn/developer/?page=modul_quocte' ),
- //@todo: add the logo https://mtf.onepay.vn/developer/?page=logo
),
'title' => array(
'title' => __( 'Title', 'woo-viet' ),
@@ -37,6 +36,13 @@ return array(
'description' => __( 'This controls the description which the user sees during checkout.', 'woo-viet' ),
'default' => __( 'With OnePay, you can make payment by using any local international card such as Visa, Master, JCB, and Amex.', 'woo-viet' )
),
+ 'order_button_text' => array(
+ 'title' => __( 'Button text', 'woo-viet' ),
+ 'type' => 'text',
+ 'desc_tip' => true,
+ 'description' => __( 'Button label in the checkout page.', 'woo-viet' ),
+ 'default' => __( "Pay with international cards", 'woo-viet' )
+ ),
'api_details' => array(
'title' => __( 'API Credentials', 'woo-viet' ),
'type' => 'title',