From 23acce0a4e7a76310cbda480dd9f24b33852fad6 Mon Sep 17 00:00:00 2001
From: "(AJ) Zin Kyaw Kyaw" <108650842+ajzkk@users.noreply.github.com>
Date: Tue, 19 Sep 2023 15:51:10 +0630
Subject: [PATCH] Add OCBC Digital Payment (#443)
* add ocbc digital payment
* fix typo
* add test for ocbc digital
* update coverage info
* resize ocbc pao image
---
Cron/OrderSyncStatus.php | 1 +
Gateway/Request/APMBuilder.php | 7 ++
Helper/OmiseHelper.php | 4 +
Model/Config/OcbcDigital.php | 18 +++++
Test/Unit/OcbcDigitalAPMBuilderTest.php | 74 ++++++++++++++++++
etc/adminhtml/system.xml | 29 +++++++
etc/config.xml | 14 ++++
etc/di.xml | 48 ++++++++++++
view/frontend/layout/checkout_index_index.xml | 3 +
view/frontend/web/css/styles.css | 11 ++-
view/frontend/web/images/ocbc_digital.png | Bin 0 -> 1868 bytes
view/frontend/web/images/ocbc_pao.png | Bin 5789 -> 3373 bytes
.../omise-offsite-ocbc-digital-method.js | 33 ++++++++
.../omise-offsite-ocbcpao-method.js | 6 +-
14 files changed, 244 insertions(+), 4 deletions(-)
create mode 100644 Model/Config/OcbcDigital.php
create mode 100644 Test/Unit/OcbcDigitalAPMBuilderTest.php
create mode 100644 view/frontend/web/images/ocbc_digital.png
create mode 100644 view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbc-digital-method.js
diff --git a/Cron/OrderSyncStatus.php b/Cron/OrderSyncStatus.php
index ac0d4d6fc..41e6ccb23 100644
--- a/Cron/OrderSyncStatus.php
+++ b/Cron/OrderSyncStatus.php
@@ -34,6 +34,7 @@ class OrderSyncStatus
"omise_offsite_mobilebanking",
"omise_offsite_rabbitlinepay",
"omise_offsite_ocbcpao",
+ "omise_offsite_ocbc_digital",
"omise_offsite_grabpay",
"omise_offsite_boost",
"omise_offsite_duitnowobw",
diff --git a/Gateway/Request/APMBuilder.php b/Gateway/Request/APMBuilder.php
index 59beffdd7..82d106d24 100644
--- a/Gateway/Request/APMBuilder.php
+++ b/Gateway/Request/APMBuilder.php
@@ -13,6 +13,7 @@
use Omise\Payment\Model\Config\Paynow;
use Omise\Payment\Model\Config\Grabpay;
use Omise\Payment\Model\Config\Ocbcpao;
+use Omise\Payment\Model\Config\OcbcDigital;
use Omise\Payment\Model\Config\Touchngo;
use Omise\Payment\Helper\ReturnUrlHelper;
use Omise\Payment\Model\Config\DuitnowQR;
@@ -278,6 +279,12 @@ public function build(array $buildSubject)
self::PLATFORM_TYPE => $this->helper->getPlatformType(),
];
break;
+ case OcbcDigital::CODE:
+ $paymentInfo[self::SOURCE] = [
+ self::SOURCE_TYPE => OcbcDigital::ID,
+ self::PLATFORM_TYPE => $this->helper->getPlatformType(),
+ ];
+ break;
case Grabpay::CODE:
$paymentInfo[self::SOURCE] = [
self::SOURCE_TYPE => 'grabpay',
diff --git a/Helper/OmiseHelper.php b/Helper/OmiseHelper.php
index 7d747dc8c..2caa7bd4d 100644
--- a/Helper/OmiseHelper.php
+++ b/Helper/OmiseHelper.php
@@ -20,6 +20,7 @@
use Magento\Store\Model\ScopeInterface;
use Omise\Payment\Model\Config\Grabpay;
use Omise\Payment\Model\Config\Ocbcpao;
+use Omise\Payment\Model\Config\OcbcDigital;
use Omise\Payment\Model\Config\Touchngo;
use Omise\Payment\Model\Config\DuitnowQR;
use Omise\Payment\Model\Config\MaybankQR;
@@ -64,6 +65,7 @@ class OmiseHelper extends AbstractHelper
Mobilebanking::CODE,
Rabbitlinepay::CODE,
Ocbcpao::CODE,
+ OcbcDigital::CODE,
Grabpay::CODE,
Boost::CODE,
DuitnowOBW::CODE,
@@ -130,6 +132,7 @@ class OmiseHelper extends AbstractHelper
Touchngo::ID => Touchngo::CODE,
Rabbitlinepay::ID => Rabbitlinepay::CODE,
Ocbcpao::ID => Ocbcpao::CODE,
+ OcbcDigital::ID => OcbcDigital::CODE,
Grabpay::ID => Grabpay::CODE,
Boost::ID => Boost::CODE,
DuitnowOBW::ID => DuitnowOBW::CODE,
@@ -196,6 +199,7 @@ class OmiseHelper extends AbstractHelper
Mobilebanking::CODE => "Mobile Banking Payment",
Rabbitlinepay::CODE => "Rabbit LINE Pay Payment",
Ocbcpao::CODE => "OCBC Pay Anyone Payment",
+ OcbcDigital::CODE => "OCBC Digital Payment",
Grabpay::CODE => "GrabPay Payment",
Boost::CODE => "Boost Payment",
DuitnowOBW::CODE => "DuitNow Online Banking/Wallets Payment",
diff --git a/Model/Config/OcbcDigital.php b/Model/Config/OcbcDigital.php
new file mode 100644
index 000000000..d4b46b4b2
--- /dev/null
+++ b/Model/Config/OcbcDigital.php
@@ -0,0 +1,18 @@
+helper = $this->getMockBuilder(OmiseHelper::class)->disableOriginalConstructor()->getMock();
+ $this->returnUrlHelper = $this->getMockBuilder(ReturnUrlHelper::class)->disableOriginalConstructor()->getMock();
+ $this->config = $this->getMockBuilder(Config::class)->disableOriginalConstructor()->getMock();
+ $this->capabilities = $this->getMockBuilder(Capabilities::class)->disableOriginalConstructor()->getMock();
+ $this->orderMock = $this->getMockBuilder(OrderAdapterInterface::class)->getMock();
+ $this->infoMock = $this->getMockBuilder(InfoMock::class)->getMock();
+ }
+
+ /**
+ * @covers Omise\Payment\Gateway\Request\APMBuilder
+ * @covers Omise\Payment\Model\Config\OcbcDigital
+ */
+ public function testApmBuilder()
+ {
+ $this->infoMock->method('getMethod')->willReturn(OcbcDigital::CODE);
+ $this->returnUrlHelper->method('create')->willReturn([
+ 'url' => 'https://omise.co/complete',
+ 'token' => '1234'
+ ]);
+
+ $this->builder = new APMBuilder(
+ $this->helper,
+ $this->returnUrlHelper,
+ $this->config,
+ $this->capabilities,
+ new OmiseMoney(),
+ );
+
+ $result = $this->builder->build(['payment' => new PaymentDataObject(
+ $this->orderMock,
+ $this->infoMock
+ )]);
+
+ $this->assertEquals('mobile_banking_ocbc', $result['source']['type']);
+ $this->assertEquals('https://omise.co/complete', $result['return_uri']);
+ }
+
+ /**
+ * @covers Omise\Payment\Model\Config\OcbcDigital
+ */
+ public function testConstants()
+ {
+ $this->assertEquals('omise_offsite_ocbc_digital', OcbcDigital::CODE);
+ $this->assertEquals('mobile_banking_ocbc', OcbcDigital::ID);
+ }
+}
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index daae14e58..30ae13f54 100644
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -659,6 +659,35 @@
+
+
+ Enable customers to pay using OCBC Digital payment method
+
+
+ Enable OCBC Digital payment method.
+ Magento\Config\Model\Config\Source\Yesno
+ payment/omise_offsite_ocbc_digital/active
+
+
+
+ This controls the title which the user sees during checkout.
+ payment/omise_offsite_ocbc_digital/title
+
+
+
+ payment/omise_offsite_ocbc_digital/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_ocbc_digital/specificcountry
+ Magento\Directory\Model\Config\Source\Country
+
+ 1
+
+
+
Enable customers to pay using GrabPay payment method
diff --git a/etc/config.xml b/etc/config.xml
index c8ebef14c..3d5a1a6d3 100644
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -300,6 +300,20 @@
authorize_capture
+
+ 0
+ OCBC Digital
+ OmiseOcbcDigitalAdapter
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ authorize_capture
+
+
0
GrabPay
diff --git a/etc/di.xml b/etc/di.xml
index 002f90b16..ee3bdf370 100644
--- a/etc/di.xml
+++ b/etc/di.xml
@@ -863,6 +863,54 @@
+
+
+
+
+ Omise\Payment\Model\Config\OcbcDigital::CODE
+ Magento\Payment\Block\Form
+ Magento\Payment\Block\Info
+ OmiseAPMOcbcDigitalValueHandlerPool
+ OmiseAPMOcbcDigitalValidatorPool
+ OmiseAPMCommandPool
+
+
+
+
+
+
+
+ - OmiseAPMOcbcDigitalConfigValueHandler
+
+
+
+
+
+
+
+ - OmiseAPMOcbcDigitalCountryValidator
+
+
+
+
+
+
+ OmiseAPMOcbcDigitalConfig
+
+
+
+
+
+ OmiseAPMOcbcDigitalConfig
+
+
+
+
+
+ Omise\Payment\Model\Config\OcbcDigital::CODE
+
+
+
diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml
index 79a1d1549..5137ae90e 100644
--- a/view/frontend/layout/checkout_index_index.xml
+++ b/view/frontend/layout/checkout_index_index.xml
@@ -86,6 +86,9 @@
-
- true
+ -
+
- true
+
-
- true
diff --git a/view/frontend/web/css/styles.css b/view/frontend/web/css/styles.css
index 9768f6c83..4f0722293 100644
--- a/view/frontend/web/css/styles.css
+++ b/view/frontend/web/css/styles.css
@@ -162,7 +162,16 @@
/** OCBC PAO **/
div.ocbc_pao {
- background-image: url('../images/payment_ocbc_pao.png');
+ background-image: url('../images/ocbc_pao.png');
+ width: 30px;
+ height: 30px;
+ float: right;
+ background-size: contain;
+ background-repeat: no-repeat;
+}
+
+div.ocbc_digital {
+ background-image: url('../images/ocbc_digital.png');
width: 30px;
height: 30px;
float: right;
diff --git a/view/frontend/web/images/ocbc_digital.png b/view/frontend/web/images/ocbc_digital.png
new file mode 100644
index 0000000000000000000000000000000000000000..699b34bb3afe99f172c99a46191431d624b5e2d7
GIT binary patch
literal 1868
zcmV-S2ebHzP)Px#9#BkFMMrQ<;sp}q1QF!~66OXH<^vJr0~6&167dEU
z1`w#$U$5}7gfgNH}k#a
zds}DO|LNSnfB(B-)vs@<(yYGjeHXOdyLq9?Qs(-_cR+h$3n7dtg^sR~GmsTgj06(;Oj`9StZThL6lg?I3d{FG)nl
zM_JQiH95(K@CPFtpedu0P02|K8TmH8cBK&PcR2#lWzTHTYUE$tEBJFprBvSmZ-RL(
zFgp+FE^h`iy8f9FQO%k|LtcGExDX2=FF7@%hzeYQCh(^w^WHpre6T6Cn)2pel9J)I
zx)hPe_K2)AB|{p`GTlT(`pR*)jrx~nL+$z1c5~J(VMbked>nzX^r4@Pe)QOOd#<``Y<)oMG=ori$r}FN
zKh#oY-*Zk{`bFs%J?I-IOn!<7
zk;l+2i|V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i|!juPF-Ey7n?S1I`GZR^2%XrV7PAGx^+!WP4D$ZL_7h;zS({C
z?e98Xn}~4w^yy9I<>lqy%49DSwh~fZUET2f^Uwdbv9a;Jt1&m1Lrm;_eL+MxbLPzZ
zt5&UAwR!XAL)SX5Yk{r*(q>`m)TyK9&6`(}o12@Hl$7+a5p()H-oLN)1Cf5V0iHQ(a2t_XhvXt6q2HxE@u00000NkvXXu0mjf
b0m1(R)W=G;;x+PY00000NkvXXu0mjfIPf%R
diff --git a/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbc-digital-method.js b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbc-digital-method.js
new file mode 100644
index 000000000..862da171a
--- /dev/null
+++ b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbc-digital-method.js
@@ -0,0 +1,33 @@
+define(
+ [
+ 'ko',
+ 'Omise_Payment/js/view/payment/omise-offsite-method-renderer',
+ 'Magento_Checkout/js/view/payment/default',
+ 'Magento_Checkout/js/model/quote',
+ ],
+ function (
+ ko,
+ Base,
+ Component,
+ quote
+ ) {
+ 'use strict';
+
+ return Component.extend(Base).extend({
+ defaults: {
+ template: 'Omise_Payment/payment/offsite-common-form'
+ },
+
+ isPlaceOrderActionAllowed: ko.observable(quote.billingAddress() != null),
+
+ code: 'omise_offsite_ocbc_digital',
+ restrictedToCurrencies: ['sgd'],
+ logo: {
+ file: "images/ocbc_digital.png",
+ width: "80",
+ height: "30",
+ name: "ocbc_digital"
+ }
+ });
+ }
+);
diff --git a/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbcpao-method.js b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbcpao-method.js
index 5d3fbc209..4d92c4146 100644
--- a/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbcpao-method.js
+++ b/view/frontend/web/js/view/payment/method-renderer/omise-offsite-ocbcpao-method.js
@@ -23,9 +23,9 @@ define(
code: 'omise_offsite_ocbcpao',
restrictedToCurrencies: ['sgd'],
logo: {
- file: "images/payment_ocbc_pao.png",
- width: "80",
- height: "32",
+ file: "images/ocbc_pao.png",
+ width: "30",
+ height: "30",
name: "ocbcpao"
}
});