Skip to content

Commit

Permalink
Merge pull request #197 from culqi/feature/new-checkout.custom
Browse files Browse the repository at this point in the history
Feature/new checkout.custom
  • Loading branch information
JoseHCalderon authored May 27, 2024
2 parents 5658afe + 29f17cb commit e78202f
Show file tree
Hide file tree
Showing 5 changed files with 271 additions and 219 deletions.
27 changes: 20 additions & 7 deletions admin/assets/js/fullculqi_login.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,51 @@ jQuery(document).ready(function () {
jQuery('#errortimeexp').html('');
var llavepublica = jQuery('#fullculqi_pubkey').val().split('_');
var llaveprivada = jQuery('#fullculqi_seckey').val().split('_');
var isValid = true;
if(jQuery('#integracion').is(':checked')){
if(!(llavepublica.length==3 && llavepublica[1]=='test')){
jQuery('#errorpubkey').html('La llave pública no pertenece al ambiente de integración');
e.preventDefault();
isValid = false;
}
if(!(llaveprivada.length==3 && llaveprivada[1]=='test')){
jQuery('#errorseckey').html('La llave privada no pertenece al ambiente de integración');
e.preventDefault();
isValid = false;
}
}
if(jQuery('#produccion').is(':checked')){
if(!(llavepublica.length==3 && llavepublica[1]=='live')){
jQuery('#errorpubkey').html('La llave pública no pertenece al ambiente de producción');
e.preventDefault();
isValid = false;
}
if(!(llaveprivada.length==3 && llaveprivada[1]=='live')){
jQuery('#errorseckey').html('La llave privada no pertenece al ambiente de producción');
e.preventDefault();
isValid = false;
}
}

if(!(jQuery('#fullculqi_timexp').val()=='' || (jQuery('#fullculqi_timexp').val()>0 && jQuery('#fullculqi_timexp').val().length <= 10 && jQuery('#fullculqi_timexp').val().length > 0))){
jQuery('#errortimeexp').html('El tiempo de expiración debe ser un valor numérico, mayor a 0 y no mayor a 10 dígitos.');
e.preventDefault();
isValid = false;
}

if(!(jQuery('#fullculqi_methods_tarjeta').is(':checked') || jQuery('#fullculqi_methods_yape').is(':checked') || jQuery('#fullculqi_methods_bancaMovil').is(':checked') || jQuery('#fullculqi_methods_agents').is(':checked') || jQuery('#fullculqi_methods_wallets').is(':checked') || jQuery('#fullculqi_methods_quotedbcp').is(':checked'))){
jQuery('#errorpaymentmethods').html('Debe seleccionar por lo menos 1 método de pago.');
e.preventDefault();
isValid = false;
}

if (jQuery('#fullculqi_rsa_id').val() === '' && jQuery('#fullculqi_rsa_pk').val()){
jQuery('#errorrsa_id').html('Ingrese el RSA Id.');
isValid = false;
}

if (jQuery('#fullculqi_rsa_id').val() && jQuery('#fullculqi_rsa_pk').val() === '' ){
jQuery('#errorrsa_pk').html('Ingrese el RSA Publickey.');
isValid = false;
}


if (!isValid){
return false;
}

if (jQuery('#fullculqi_tokenlogin').val().length>0) {
var url_webhook = '';
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-04-19 - version 3.1.0
Fix: Integ. with CustomCheckout

2024-04-12 - version 3.0.18
Fix: fix backend-plugin integration

Expand Down
Loading

0 comments on commit e78202f

Please sign in to comment.