diff --git a/includes/blocks/assets/js/build/omise_duitnow_obw.asset.php b/includes/blocks/assets/js/build/omise_duitnow_obw.asset.php index 28f44fb9..aa42cd09 100644 --- a/includes/blocks/assets/js/build/omise_duitnow_obw.asset.php +++ b/includes/blocks/assets/js/build/omise_duitnow_obw.asset.php @@ -1 +1 @@ - array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '9895ac689bce188c4a74717ce7c149c5'); \ No newline at end of file + array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'b1a7ad893b10317f131d580cebf99812'); \ No newline at end of file diff --git a/includes/blocks/assets/js/build/omise_duitnow_obw.js b/includes/blocks/assets/js/build/omise_duitnow_obw.js index 02028bd0..de7d53fc 100644 --- a/includes/blocks/assets/js/build/omise_duitnow_obw.js +++ b/includes/blocks/assets/js/build/omise_duitnow_obw.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.React,t=window.wp.element,n=(window.wp.i18n,window.wp.htmlEntities),a=window.wc.wcBlocksRegistry,s=(0,window.wc.wcSettings.getSetting)("omise_duitnow_obw_data",{}),l=(0,n.decodeEntities)(s.title)||"No title set",o=a=>{const{eventRegistration:l,emitResponse:o}=a,{onPaymentSetup:c}=l,r=(0,n.decodeEntities)(s.description||""),{banks:i}=s.data,[m,p]=(0,t.useState)(null);return(0,t.useEffect)((()=>{const e=c((async()=>{if(!m)return{type:o.responseTypes.ERROR,message:"Select a bank"};try{return{type:o.responseTypes.SUCCESS,meta:{paymentMethodData:{bank:m}}}}catch(e){return{type:o.responseTypes.ERROR,message:e.message}}}));return()=>e()}),[o.responseTypes.ERROR,o.responseTypes.SUCCESS,c,m]),(0,e.createElement)(e.Fragment,null,r&&(0,e.createElement)("p",null,r),(0,e.createElement)("fieldset",{id:"omise-form-installment"},(0,e.createElement)("div",{className:"fpx-select-bank"},(0,e.createElement)("label",{htmlFor:"fpx-select-bank"},"Select Bank"),(0,e.createElement)("select",{className:"fpx-bank-logo default",id:"duitnow-obw-select-bank",name:"source[bank]",defaultValue:"",onChange:e=>{p(e.target.value)}},(0,e.createElement)("option",{value:"",disabled:!0},"-- Select your option --"),i.map((t=>(0,e.createElement)("option",{key:t.code,className:t.code,value:t.code},t.name)))))))};(0,a.registerPaymentMethod)({name:s.name||"",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:n}=t.components;return(0,e.createElement)(n,{text:l})}),null),content:(0,e.createElement)(o,null),edit:(0,e.createElement)(o,null),canMakePayment:()=>s.is_active,ariaLabel:l,supports:{features:s.supports}})})(); \ No newline at end of file +(()=>{"use strict";const e=window.React,t=window.wp.element,n=(window.wp.i18n,window.wp.htmlEntities),a=window.wc.wcBlocksRegistry,s=(0,window.wc.wcSettings.getSetting)("omise_duitnow_obw_data",{}),l=(0,n.decodeEntities)(s.title)||"No title set",o=a=>{const{eventRegistration:l,emitResponse:o}=a,{onPaymentSetup:c}=l,r=(0,n.decodeEntities)(s.description||""),{banks:i}=s.data,[m,p]=(0,t.useState)(null);return(0,t.useEffect)((()=>{const e=c((async()=>{if(!m)return{type:o.responseTypes.ERROR,message:"Select a bank"};try{return{type:o.responseTypes.SUCCESS,meta:{paymentMethodData:{bank:m}}}}catch(e){return{type:o.responseTypes.ERROR,message:e.message}}}));return()=>e()}),[o.responseTypes.ERROR,o.responseTypes.SUCCESS,c,m]),(0,e.createElement)(e.Fragment,null,r&&(0,e.createElement)("p",null,r),(0,e.createElement)("fieldset",{id:"omise-form-installment"},(0,e.createElement)("div",{className:"fpx-select-bank"},(0,e.createElement)("label",{htmlFor:"fpx-select-bank"},"Select Bank"),(0,e.createElement)("select",{className:"fpx-bank-logo default",id:"duitnow-obw-select-bank",name:"source[bank]",defaultValue:"",onChange:e=>{p(e.target.value)}},(0,e.createElement)("option",{value:"",disabled:!0},"-- Select your option --"),Object.values(i).map((t=>(0,e.createElement)("option",{key:t.code,className:t.code,value:t.code},t.name)))))))};(0,a.registerPaymentMethod)({name:s.name||"",label:(0,e.createElement)((t=>{const{PaymentMethodLabel:n}=t.components;return(0,e.createElement)(n,{text:l})}),null),content:(0,e.createElement)(o,null),edit:(0,e.createElement)(o,null),canMakePayment:()=>s.is_active,ariaLabel:l,supports:{features:s.supports}})})(); \ No newline at end of file diff --git a/includes/blocks/assets/js/omise-duitnow-obw.js b/includes/blocks/assets/js/omise-duitnow-obw.js index 810ad9ae..f3bbad51 100644 --- a/includes/blocks/assets/js/omise-duitnow-obw.js +++ b/includes/blocks/assets/js/omise-duitnow-obw.js @@ -63,7 +63,7 @@ const DuitNowOBWPaymentMethod = (props) => { > { - banks.map((bank) => ( + Object.values(banks).map((bank) => (