FIX: Drupal popravek procesiranja narocila in preusmeritev.
This commit is contained in:
parent
b8f44d003a
commit
361dd42739
@ -1232,6 +1232,7 @@ function oddajNarociloNaStreznik() {
|
|||||||
jQuery('.procesiram-narocilo').show();
|
jQuery('.procesiram-narocilo').show();
|
||||||
var nacinPlacila = jQuery('[name="payment_method"]:checked').val();
|
var nacinPlacila = jQuery('[name="payment_method"]:checked').val();
|
||||||
jQuery('.procesiram-narocilo .procesiram-narocilo-'+nacinPlacila).show();
|
jQuery('.procesiram-narocilo .procesiram-narocilo-'+nacinPlacila).show();
|
||||||
|
|
||||||
if(nacinPlacila == 2){
|
if(nacinPlacila == 2){
|
||||||
jQuery('.procesiram-narocilo .procesiram-narocilo-ime').text('PayPal');
|
jQuery('.procesiram-narocilo .procesiram-narocilo-ime').text('PayPal');
|
||||||
} else if (nacinPlacila == 3){
|
} else if (nacinPlacila == 3){
|
||||||
@ -1284,20 +1285,24 @@ function oddajNarociloNaStreznik() {
|
|||||||
|
|
||||||
} else if (paymentMethod == 2) {
|
} else if (paymentMethod == 2) {
|
||||||
|
|
||||||
|
// PayPal redirect
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
urlRedirect = val.paypal_link;
|
return window.location = val.paypal_link
|
||||||
}, 2000);
|
}, 1000);
|
||||||
|
|
||||||
} else if (paymentMethod == 3) {
|
} else if (paymentMethod == 3) {
|
||||||
|
|
||||||
// Nastavimo Stripe instanco
|
// Nastavimo Stripe instanco
|
||||||
var stripe = Stripe(jQuery('#stripe-token').val());
|
var stripe = Stripe(jQuery('#stripe-token').val());
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
return stripe.redirectToCheckout({ sessionId: val.session_id });
|
return stripe.redirectToCheckout({ sessionId: val.session_id });
|
||||||
}, 2000);
|
}, 1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location = urlRedirect;
|
window.location = urlRedirect;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -792,7 +792,7 @@
|
|||||||
Naročilo se obdeluje. Prosimo počakajte trenutek
|
Naročilo se obdeluje. Prosimo počakajte trenutek
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="procesiram-narocilo-2 procesiram-narocilo-3 procesiram-posamezno-narocilo"></div>
|
<div class="procesiram-narocilo-2 procesiram-narocilo-3 procesiram-posamezno-narocilo">
|
||||||
Sedaj vas bomo preusmerili na platformo <span class="procesiram-narocilo-ime">Stripe</span>, kjer boste vnesli podatke za plačilo.
|
Sedaj vas bomo preusmerili na platformo <span class="procesiram-narocilo-ime">Stripe</span>, kjer boste vnesli podatke za plačilo.
|
||||||
Po uspešnem plačilu vas bo preusmerilo nazaj na spletno mesto 1KA. Prosimo počakajte trenutek
|
Po uspešnem plačilu vas bo preusmerilo nazaj na spletno mesto 1KA. Prosimo počakajte trenutek
|
||||||
</div>
|
</div>
|
||||||
@ -801,7 +801,7 @@
|
|||||||
The order is being processed. Please wait a moment
|
The order is being processed. Please wait a moment
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="procesiram-narocilo-2 procesiram-narocilo-3 procesiram-posamezno-narocilo"></div>
|
<div class="procesiram-narocilo-2 procesiram-narocilo-3 procesiram-posamezno-narocilo">
|
||||||
We will now redirect you to the <span class="procesiram-narocilo-ime">Stripe</span> platform, where you will enter your payment information.
|
We will now redirect you to the <span class="procesiram-narocilo-ime">Stripe</span> platform, where you will enter your payment information.
|
||||||
After a successful payment, you will be redirected back to the 1KA website. Please, wait a moment
|
After a successful payment, you will be redirected back to the 1KA website. Please, wait a moment
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user