We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 845942b6 authored by Alessio Zampatti's avatar Alessio Zampatti

Add CheckoutUtility service creation to try/catch block, to prevent exception...

Add CheckoutUtility service creation to try/catch block, to prevent exception thrown while in production mode if the endpoint prefix is not specified
parent cfd948a2
...@@ -1394,8 +1394,8 @@ class Data extends AbstractHelper ...@@ -1394,8 +1394,8 @@ class Data extends AbstractHelper
$client = $this->initializeAdyenClient($storeId); $client = $this->initializeAdyenClient($storeId);
$service = $this->createAdyenCheckoutUtilityService($client);
try { try {
$service = $this->createAdyenCheckoutUtilityService($client);
$response = $service->originKeys($params); $response = $service->originKeys($params);
} }
catch(\Exception $e){ catch(\Exception $e){
......
...@@ -33,7 +33,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year'); ...@@ -33,7 +33,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */ <fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */
echo $code; ?>" style="display:none"> echo $code; ?>" style="display:none">
<span id="noApiKey" class="message message-error error" style="visibility: hidden"><?php echo $block->escapeHtml(__('Please configure an API Key in your Adyen Required Settings'));?></span> <span id="noApiKey" class="message message-error error" style="visibility: hidden"><?php echo $block->escapeHtml(__('Please configure an API Key and a live endpoint prefix(if in Production Mode) in your Adyen Required Settings'));?></span>
<div class="field admin__field"> <div class="field admin__field">
<label for="<?php /* @noEscape */ <label for="<?php /* @noEscape */
echo $code; ?>_cc_owner"> echo $code; ?>_cc_owner">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="payment-method-content"> <div class="payment-method-content">
<!-- ko ifnot: (getOriginKey()) --> <!-- ko ifnot: (getOriginKey()) -->
<span class="message message-error error"><!-- ko text: $t('Please configure an API Key in your Adyen Required Settings')--><!-- /ko --></span> <span class="message message-error error"><!-- ko text: $t('Please configure an API Key and a live endpoint prefix(if in Production Mode) in your Adyen Required Settings')--><!-- /ko --></span>
<!--/ko--> <!--/ko-->
<div class="payment-method-billing-address"> <div class="payment-method-billing-address">
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="payment-method-content"> <div class="payment-method-content">
<!-- ko ifnot: (getOriginKey()) --> <!-- ko ifnot: (getOriginKey()) -->
<span class="message message-error error"><!-- ko text: $t('Please configure an API Key in your Adyen Required Settings')--><!-- /ko --></span> <span class="message message-error error"><!-- ko text: $t('Please configure an API Key and a live endpoint prefix(if in Production Mode) in your Adyen Required Settings')--><!-- /ko --></span>
<!--/ko--> <!--/ko-->
<!-- ko foreach: $parent.getRegion(getMessageName()) --> <!-- ko foreach: $parent.getRegion(getMessageName()) -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment