finspay
This commit is contained in:
@@ -17,6 +17,9 @@ select
|
||||
t.promo_estado as promo_estado,
|
||||
t.playera_estado as playera_estado,
|
||||
t.cupo as cupo,
|
||||
t.meses as meses,
|
||||
t.descuento_contado as descuento,
|
||||
t.descuento_contado_estado as desc_estado,
|
||||
l.nombre as lnombre,
|
||||
l.federativa as federativa,
|
||||
l.pais as pais,
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
|
||||
select
|
||||
t.precio as precio,
|
||||
c.nombre as nombre
|
||||
c.nombre as nombre,
|
||||
t.meses as meses,
|
||||
t.descuento_contado as descuento,
|
||||
t.descuento_contado_estado as desc_estado
|
||||
from
|
||||
curso_tienda as t
|
||||
inner join
|
||||
|
||||
@@ -61,10 +61,7 @@ sub intentConfirm{
|
||||
# cliente_nombre,cliente_correo,cliente_comentario,tienda_evento_id,talla_id,cantidad(1),monto,etapa_id(4),entrega(3),pago_clave,plazo,fecha_pago
|
||||
my $mq = $data->{'mq'};
|
||||
my $students = $data->{'students'};
|
||||
my $plan = 0;
|
||||
if (defined $data->{'selected_plan'}){
|
||||
$plan = $data->{'selected_plan'}->{'count'};
|
||||
}
|
||||
my $plan = $r->{'payment_method_options'}->{'card'}->{'installments'}->{'plan'}->{'count'} // 0;
|
||||
for (1..$mq){
|
||||
_write (
|
||||
$data_path->child("/spay/qIntentConfirm.q")->slurp,
|
||||
@@ -88,19 +85,20 @@ sub notify{
|
||||
my ($c,$d,$r) = @_;
|
||||
my $t =shift @{ _read ($data_path->child("spay/qNotify.q")->slurp,$d->{'tid'})};
|
||||
my @ra;
|
||||
my %h=qw/0 na 1 ch 2 m 3 g/;
|
||||
my $plazo= defined( $d->{'selected_plan'})?
|
||||
$d->{'selected_plan'}->{'count'} : "0";
|
||||
my %h=qw/0 na 1 CH 2 M 3 G/;
|
||||
my $plazo = $r->{'payment_method_options'}->{'card'}->{'installments'}->{'plan'}->{'count'};
|
||||
my $students = $d->{'students'};
|
||||
my $basetxta = "$t->{'cnombre'}
|
||||
clave de pago stripe: $d->{'payment_intent_id'}
|
||||
my $basetxta = "$t->{'cnombre'}
|
||||
clave de pago stripe: $r->{'id'}
|
||||
plazo: $plazo meses
|
||||
cantidad: $t->{'cantidad'}
|
||||
";
|
||||
my $basetxtu = $t->{'cnombre'}//""."
|
||||
".$t->{'subnombre'}//""."
|
||||
|
||||
";
|
||||
my $basetxtu = "
|
||||
$t->{'cnombre'}
|
||||
============================================
|
||||
".$t->{'subnombre'}//""."
|
||||
/////////////////////////////////////////////
|
||||
";
|
||||
|
||||
foreach(1 .. $d->{'mq'}) {
|
||||
push (@ra, ["
|
||||
@@ -110,9 +108,9 @@ $$students[$_ -1][0]
|
||||
|
||||
|
||||
tu clave de pago es la sigiente. Tenla a la mano para cualquier aclaración
|
||||
==========================
|
||||
$d->{'payment_intent_id'}
|
||||
===========================
|
||||
==================================
|
||||
$r->{'id'}
|
||||
==================================
|
||||
", " Inscripción ", $$students[$_ -1][1]]);
|
||||
$basetxta .= "
|
||||
Nombre: $$students[$_ -1][0]
|
||||
@@ -125,6 +123,9 @@ $$students[$_ -1][0]
|
||||
}
|
||||
|
||||
push (@ra, [$basetxta,"Inscripciones",'david@chaos.foundation']);
|
||||
push (@ra, [$basetxta,"Inscripciones",'benjamuga@gmail.com']);
|
||||
push (@ra, [$basetxta,"Inscripciones",'mmunoz@harvest.com']);
|
||||
|
||||
return @ra;
|
||||
}
|
||||
|
||||
@@ -139,19 +140,6 @@ $$students[$_ -1][0]
|
||||
#'students' => [ [ 'User', 'me@me.com', 'obs', 'M' ], [ 'usr2', 'mail2', 'obs', 'G' ], undef, undef, undef, undef, undef, undef, undef, undef ] #arr(10)
|
||||
# ===============
|
||||
|
||||
sub intentSanity{
|
||||
my ($c,$d)=@_;
|
||||
if (defined $d->{'selected_plan'} ){
|
||||
return -1 unless defined ($d->{'selected_plan'}{'type'});
|
||||
return -1 unless defined ($d->{'selected_plan'}{'count'});
|
||||
return -1 unless defined ($d->{'selected_plan'}{'interval'});
|
||||
}
|
||||
return -1 unless defined ($d->{'tid'}) && $d->{'tid'} =~ /^\d+$/ ;
|
||||
return -1 unless defined ($d->{'req'}) && $d->{'req'} eq 'check';
|
||||
return -1 unless defined ($d->{'payment_intent_id'});
|
||||
return userDataSanity($c,$d) ;
|
||||
}
|
||||
|
||||
sub userDataSanity{
|
||||
my ($c,$d) = @_;
|
||||
return -1 unless (
|
||||
@@ -160,6 +148,7 @@ sub userDataSanity{
|
||||
$d->{'mq'} =~/^\d+$/ &&
|
||||
$d->{'mq'} < 10
|
||||
);
|
||||
|
||||
my %h=qw(n 0 CH 1 M 2 G 3);
|
||||
my $mq = $d->{'mq'};
|
||||
my $students = $d->{'students'};
|
||||
|
||||
Reference in New Issue
Block a user