From 82d483864d5dc2c4fc211465f113ad3b886d177b Mon Sep 17 00:00:00 2001 From: Aashish Gurung <101558497+aashishgurung@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:32:47 +0700 Subject: [PATCH] Fix the issue of GooglePay not showing in shortcode (#493) * Added the missing quotes around the value of totalPriceStatus to resolve GooglePay not showing issue. * Fix test --- includes/gateway/class-omise-payment-googlepay.php | 2 +- .../includes/gateway/class-omise-payment-googlepay-test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/gateway/class-omise-payment-googlepay.php b/includes/gateway/class-omise-payment-googlepay.php index 9d081cdb..e57f2e4e 100644 --- a/includes/gateway/class-omise-payment-googlepay.php +++ b/includes/gateway/class-omise-payment-googlepay.php @@ -219,7 +219,7 @@ private function google_pay_button_scripts() { merchantId: '" . $this->googlepay_config['merchant_id'] . "', }, transactionInfo: { - totalPriceStatus: " . $this->googlepay_config['price_status'] . ", + totalPriceStatus: '" . $this->googlepay_config['price_status'] . "', currencyCode: '" . $this->googlepay_config['currency'] . "', }, } diff --git a/tests/unit/includes/gateway/class-omise-payment-googlepay-test.php b/tests/unit/includes/gateway/class-omise-payment-googlepay-test.php index 3476b4e7..0489aabc 100644 --- a/tests/unit/includes/gateway/class-omise-payment-googlepay-test.php +++ b/tests/unit/includes/gateway/class-omise-payment-googlepay-test.php @@ -129,7 +129,7 @@ public function google_pay_button_scripts() merchantId: '', }, transactionInfo: { - totalPriceStatus: NOT_CURRENTLY_KNOWN, + totalPriceStatus: 'NOT_CURRENTLY_KNOWN', currencyCode: 'thb', }, }