-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
3,056 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
li.wc_payment_method.payment_method_woocommerce_wompi_pse > label[for=payment_method_woocommerce_wompi_pse] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
|
||
li.wc_payment_method.payment_method_woocommerce_wompi_credit_cards > label[for=payment_method_woocommerce_wompi_credit_cards] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
|
||
li.wc_payment_method.payment_method_payulatam_co > label[for=payment_method_payulatam_co] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
|
||
li.wc_payment_method.payment_method_woocommerce_wompi_cash_bancolombia > label[for=payment_method_woocommerce_wompi_cash_bancolombia] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
|
||
li.wc_payment_method.payment_method_woocommerce_wompi_bancolombia_button > label[for=payment_method_woocommerce_wompi_bancolombia_button] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
li.wc_payment_method.payment_method_woocommerce_wompi_nequi > label[for=payment_method_woocommerce_wompi_nequi] > img { | ||
margin-left: 6px; | ||
margin-top: -7px; | ||
max-height: 40px; | ||
} | ||
|
||
div.card-js > .installments-wrapper > select { | ||
padding-left: 10px; | ||
} | ||
|
||
.card-js .installments-wrapper { | ||
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.7), inset 0 1px 0 rgba(255,255,255,.7); | ||
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.7),inset 0 1px 0 rgba(255,255,255,.7); | ||
-ms-box-shadow: 0 1px 0 rgba(255,255,255,.7),inset 0 1px 0 rgba(255,255,255,.7); | ||
-o-box-shadow: 0 1px 0 rgba(255,255,255,.7),inset 0 1px 0 rgba(255,255,255,.7); | ||
box-shadow: 0 1px 0 rgba(255,255,255,.7), inset 0 1px 0 rgba(255,255,255,.7); | ||
position: relative; | ||
display: inline-block; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
(function($){ | ||
'use strict'; | ||
$( 'body' ).on( 'updated_checkout', function() { | ||
$(".card-js").CardJs(); | ||
} ); | ||
|
||
|
||
var checkout_form = $( 'form.checkout' ); | ||
|
||
$(document.body).on('checkout_error', function () { | ||
swal.close(); | ||
Cookies.remove('woocommerce_wompi_credit_cards_intent'); | ||
}); | ||
|
||
checkout_form.on( 'checkout_place_order', function() { | ||
|
||
var form_checkout_payment = $('form[name="checkout"] input[name="payment_method"]:checked'); | ||
|
||
if(form_checkout_payment.val() === 'woocommerce_wompi_credit_cards'){ | ||
|
||
if( typeof Cookies.get('woocommerce_wompi_credit_cards_intent') === 'undefined' ){ | ||
var inFiveMinutes = new Date(new Date().getTime() + 5 * 60 * 1000); | ||
Cookies.set('woocommerce_wompi_credit_cards_intent', 0, { expires: inFiveMinutes, path: '/' }) | ||
} | ||
|
||
//Sweetalert to show the loading spinner | ||
Swal.fire({ | ||
title: 'Procesando tu pago', | ||
html: 'Por favor espera un momento...', | ||
imageWidth: "200px", | ||
timerProgressBar: true, | ||
allowOutsideClick: false, | ||
allowEscapeKey: false, | ||
allowEnterKey: false, | ||
showCancelButton: false, | ||
showConfirmButton: false, | ||
showCloseButton: false, | ||
didOpen: () => { | ||
Swal.showLoading(); | ||
} | ||
}) | ||
} | ||
}); | ||
|
||
|
||
|
||
|
||
})(jQuery); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(function($){ | ||
'use strict'; | ||
if( typeof Cookies.get('wompi_sessionId') === 'undefined' ){ | ||
$wompi.initialize( function ( data, error ) { | ||
if ( error === null ) { | ||
Cookies.set('wompi_sessionId', data.sessionId, { expires: 90, path: '/' }) | ||
} | ||
}) | ||
} | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
;(function( $ ) { | ||
'use strict'; | ||
|
||
const checkout_form = $( 'form.checkout' ); | ||
|
||
$(document.body).on('checkout_error', function () { | ||
swal.close(); | ||
}); | ||
|
||
checkout_form.on( 'checkout_place_order', function() { | ||
|
||
const form_checkout_payment = $('form[name="checkout"] input[name="payment_method"]:checked'); | ||
|
||
if(form_checkout_payment.val() === 'woocommerce_wompi_nequi'){ | ||
|
||
Swal.fire({ | ||
title: 'Verifica tu celular', | ||
html: wompi_payments_plugin_nequi.check_your_phone_msg, | ||
imageUrl: wompi_payments_plugin_nequi.logo_url, | ||
imageWidth: "200px", | ||
timer: wompi_payments_plugin_nequi.seconds_to_wait * 1000, | ||
timerProgressBar: true, | ||
allowOutsideClick: false, | ||
allowEscapeKey: false, | ||
allowEnterKey: false, | ||
showCancelButton: false, | ||
showConfirmButton: false, | ||
showCloseButton: false, | ||
didOpen: () => { | ||
Swal.showLoading(); | ||
const timer = Swal.getPopup().querySelector("b"); | ||
timerInterval = setInterval(() => { | ||
const timerLeft = Swal.getTimerLeft(); | ||
let minutes = Math.floor(timerLeft / 60000); | ||
let seconds = Math.floor((timerLeft % 60000) / 1000); | ||
|
||
if(minutes < 10){ minutes = `0${minutes}`; } | ||
if(seconds < 10){ seconds = `0${seconds}`; } | ||
timer.textContent = `${minutes}:${seconds}`; | ||
|
||
}, 500); | ||
}, | ||
willClose: () => { | ||
if(typeof timerInterval !== 'undefined'){ | ||
clearInterval(timerInterval); | ||
} | ||
} | ||
}) | ||
} | ||
}); | ||
|
||
|
||
|
||
})( jQuery ); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.