From c508d650452170b7b2a917b3203fd73d9bbacb0d Mon Sep 17 00:00:00 2001 From: Dslak Date: Fri, 5 Nov 2021 08:50:29 +0100 Subject: [PATCH] fix payment --- .env | 14 +++++++++----- components/buy/buy.js | 2 -- components/checkout/checkout.js | 19 ++++++++++--------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.env b/.env index 34a2bdf..43b0ead 100644 --- a/.env +++ b/.env @@ -1,9 +1,13 @@ -API_URL=https://www.iolovolio.com/api -SITE_URL=https://www.iolovolio.com +API_URL=http://iolovolio.local/api +SITE_URL=http://iolovolio.local -PP_ACCOUNT=dslaknma@gmail.com -PP_CLIENTID=Ado8S7IQHD3t9n3hG8BfCjUOLkKKMPrX64Bd4gVkV_5HlVw1wg6E0HFbWfVySnxU3KQ6-53yLxPBlnbh -PP_SECRET=EMY1gGftiSyjYwM1O8cwgOHAIg9cF2oNQAQuXCKrOrhfmMFjrbFZyRHHgCd_lPhpwJNyEYjbr0oSzPDH +#PP_ACCOUNT=dslaknma@gmail.com +#PP_CLIENTID=Ado8S7IQHD3t9n3hG8BfCjUOLkKKMPrX64Bd4gVkV_5HlVw1wg6E0HFbWfVySnxU3KQ6-53yLxPBlnbh +#PP_SECRET=EMY1gGftiSyjYwM1O8cwgOHAIg9cF2oNQAQuXCKrOrhfmMFjrbFZyRHHgCd_lPhpwJNyEYjbr0oSzPDH + +PP_ACCOUNT=villamarchesacilento@gmail.com +PP_CLIENTID=AWu2qtnudDseQPQgzP8WjoWYgJ35RwVs5xGgnJaSUEy3GZBivJTDwpF1Iac48Ym9awFb_Q3hl30q0oX1 +PP_SECRET=EG4ocqai50hgZJ-033h2SVTnrc2QgBeeMg5Eclvrbb3Zw204wGEPmhfeag167tOMPAOpzwP5Cm8bFDmy PP_CANCEL=https://www.iolovolio.com/checkout PP_RETURN=https://www.iolovolio.com/thankyou diff --git a/components/buy/buy.js b/components/buy/buy.js index 216af6e..aab9558 100644 --- a/components/buy/buy.js +++ b/components/buy/buy.js @@ -61,9 +61,7 @@ $(document).ready( () => { }).catch( (error) => { console.error(error) }) - }) } } - }) diff --git a/components/checkout/checkout.js b/components/checkout/checkout.js index bcd9bba..781445b 100644 --- a/components/checkout/checkout.js +++ b/components/checkout/checkout.js @@ -65,8 +65,8 @@ $(document).ready( () => { const input = $(e) const type = input.prop('type') const required = input.prop('required') - - if(required) { + const visible = input.is(':visible') + if(required && visible) { switch(type) { case 'text': case 'select-one': @@ -110,11 +110,13 @@ $(document).ready( () => { } }) - if(passwords[0].value != passwords[1].value) { - $(passwords[1]).addClass('error') - errors++ - } else { - $(passwords[1]).removeClass('error') + if(isNewUser) { + if(passwords[0].value != passwords[1].value) { + $(passwords[1]).addClass('error') + errors++ + } else { + $(passwords[1]).removeClass('error') + } } if(!errors) { @@ -142,8 +144,7 @@ $(document).ready( () => { } const placeOrder = (profile, isNewUser) => { - - const inputs = component.find('.input, .radio') + const inputs = component.find('.input, .radio input') inputs.attr('disabled', true) place.hide(0) window.Spinner('show')