Support PayPal Express Checkout #27 (#46)

This commit is contained in:
longnguyen
2018-04-24 22:36:04 +07:00
committed by Dat Hoang
parent 9c371f6d74
commit 68752ae215
3 changed files with 232 additions and 0 deletions
+16
View File
@@ -64,6 +64,12 @@ class WooViet {
array(
'enabled' => 'yes',
),
'vnd_paypal_express_checkout' =>
array(
'enabled' => 'yes',
'currency' => 'USD',
'rate' => '22770',
),
);
/**
* The properties to manage all classes under the "inc/" folder
@@ -76,6 +82,7 @@ class WooViet {
protected $Currency;
protected $VND_PayPal_Standard;
protected $Admin_Page;
protected $VND_PayPal_Express_Checkout;
/**
* Setup class.
@@ -199,6 +206,15 @@ class WooViet {
);
}
// Check if "Support VND for the PayPal Express Checkout gateway" is enabled
if ( 'yes' == $settings['vnd_paypal_express_checkout']['enabled'] ) {
include( WOO_VIET_DIR . 'inc/class-wooviet-vnd-paypal-express-checkout.php' );
$this->VND_PayPal_Express_Checkout = new WooViet_VND_PayPal_Express_Checkout(
$settings['vnd_paypal_express_checkout']['rate'],
$settings['vnd_paypal_express_checkout']['currency']
);
}
}
/**