diff --git a/Model/Ui/CcConfigProvider.php b/Model/Ui/CcConfigProvider.php
index 8d0ce886..98a00a54 100644
--- a/Model/Ui/CcConfigProvider.php
+++ b/Model/Ui/CcConfigProvider.php
@@ -6,7 +6,6 @@
use Magento\Payment\Model\CcConfig as MagentoCcConfig;
use Omise\Payment\Block\Adminhtml\System\Config\CardFormCustomization\Theme;
use Omise\Payment\Model\Config\Cc as OmiseCcConfig;
-use Omise\Payment\Model\Config\Installment;
use Omise\Payment\Model\Customer;
class CcConfigProvider implements ConfigProviderInterface
@@ -46,8 +45,6 @@ public function getConfig()
$theme = new Theme();
$customDesign = $this->omiseCcConfig->getCardThemeConfig();
$selectedTheme = $this->omiseCcConfig->getCardTheme();
- $enableWlbInstallment = $this->omiseCcConfig->getValue('enable_wlb_installment', Installment::CODE);
-
return [
'payment' => [
'ccform' => [
@@ -61,8 +58,7 @@ public function getConfig()
'locale' => $this->omiseCcConfig->getStoreLocale(),
'secureForm' => $this->omiseCcConfig->getSecureForm(),
'formDesign' => $theme->getFormDesign($selectedTheme, $customDesign),
- 'theme' => $selectedTheme,
- 'enableWlbInstallment' => $enableWlbInstallment
+ 'theme' => $selectedTheme
],
]
];
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 89d2f595..94bcc458 100644
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -222,19 +222,13 @@
This controls the title which the user sees during checkout.
payment/omise_offsite_installment/title
-
-
- Magento\Config\Model\Config\Source\Yesno
- payment/omise_offsite_installment/enable_wlb_installment
- This controls whether you want to enable WLB installments or non-WLB installments.
-
-
+
payment/omise_offsite_installment/allowspecific
Magento\Payment\Model\Config\Source\Allspecificcountries
If not set to all, guest customers will not have a billing country and may not be able to check out.
-
+
payment/omise_offsite_installment/specificcountry
Magento\Directory\Model\Config\Source\Country
diff --git a/etc/config.xml b/etc/config.xml
index 90febfe6..6ab5366a 100644
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -45,7 +45,6 @@
authorize_capture
1
1
- 0
diff --git a/view/frontend/web/js/view/payment/method-renderer/omise-offsite-installment-method.js b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-installment-method.js
index 4741b4e3..2a0a6b77 100644
--- a/view/frontend/web/js/view/payment/method-renderer/omise-offsite-installment-method.js
+++ b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-installment-method.js
@@ -165,14 +165,23 @@ define(
},
applyOmiseJsToElement: function (self, element) {
+ const iframeHeightMatching = {
+ '40px': 258,
+ '44px': 270,
+ '48px': 282,
+ '52px': 295,
+ }
+
const localeMatching = {
en_US: 'en',
ja_JP: 'ja',
th_TH: 'th'
}
- const { locale, enableWlbInstallment } = window.checkoutConfig.payment.omise_cc
- element.style.height = enableWlbInstallment === '1' ? '450px' : '200px'
+ const { theme, locale, formDesign } = window.checkoutConfig.payment.omise_cc
+ const { font, input, checkbox } = formDesign
+ let iframeElementHeight = iframeHeightMatching[input.height]
+ element.style.height = 500 + 'px';
OmiseCard.configure({
publicKey: self.getPublicKey(),
@@ -182,10 +191,9 @@ define(
customCardForm: false,
customInstallmentForm: true,
locale: localeMatching[locale] ?? 'en',
- defaultPaymentMethod: 'installment',
- enableWlbInstallment: enableWlbInstallment === '1'
+ defaultPaymentMethod: 'installment'
});
-
+
OmiseCard.open({
onCreateSuccess: (payload) => {
self.createOrder(self, payload)