payment payone_reset transaction fix

This commit is contained in:
Rainer Gümpelein 2022-02-22 18:31:25 +01:00
parent 3423fd453d
commit efb06142c0
3 changed files with 11 additions and 13 deletions

View file

@ -1549,6 +1549,7 @@ sub bikes_all(){
fetch => "all",
keyfield => "barcode",#2018-02-21 changed to bike id
template_id => "205",#Leihrad_liste
int10 => "!=::3",
};
my ($bike_group,$user_group,$tariff_content,$user_tour) = $self->fetch_tariff($auth,$q->param('authcookie'));
@ -2152,7 +2153,8 @@ sub auth_verify(){
print FILE "UPDATE adr on operator by dbname $varenv{dbname} | op3 $auth_operator3->{c_id}\n" if($debug);
my $update = {
table => "contentadr",
txt05 => "$authcookies",#authcookies
#txt05 => "$authcookies",#authcookies
txt05 => "$auth_primary->{txt05}",#authcookies
atime => "now()",
#mtime => "now()",#only set mtime on real user-data change
owner => "198",#update initiated by primary

View file

@ -223,17 +223,13 @@ sub captureSEPA_main {
my $sequence = 1;
$sequence = $ctt_rec->{sequence} if($ctt_rec->{sequence});
#print Dumper($ctt);
if($ctt->{c_id} && (!$ctt->{state} || $ctt->{int14})){
my $amount = 0;
$amount = $ctt->{int01} * 100 if(looks_like_number($ctt->{int01}));
my $currency = "EUR";
if($ctt->{c_id} && (!$ctt->{state} || $ctt->{int14} || $ctt_rec->{payone_reset})){
my $amount = 0;#if payone_reset capture 0
$amount = $ctt->{int01} * 100 if(looks_like_number($ctt->{int01}) && !$ctt_rec->{payone_reset});
my $preauth_request = {
request => 'capture',
amount => "$amount",
currency => "$currency",
currency => "EUR",
txid => "$TXID",
sequencenumber => "$sequence"
};
@ -364,9 +360,9 @@ sub captureCC_main {
my $sequence = 1;
$sequence = $ctt_rec->{sequence} if($ctt_rec->{sequence});
if($ctt->{c_id} && (!$ctt->{state} || $ctt->{int14})){
my $amount = 0;
$amount = $ctt->{int01} * 100 if(looks_like_number($ctt->{int01}));
if($ctt->{c_id} && (!$ctt->{state} || $ctt->{int14} || $ctt_rec->{payone_reset})){
my $amount = 0;#if payone_reset capture 0
$amount = $ctt->{int01} * 100 if(looks_like_number($ctt->{int01}) && !$ctt_rec->{payone_reset});
my $preauth_request = {
request => 'capture',
amount => "$amount",

View file

@ -502,7 +502,7 @@ EOF
}
#further payone capture are only allowed if OPOS && sequence && TXID is set
if($ctt->{int14} && $ctt->{int18} && $ctt->{txt16}){
print $q->div({-class=>'element6',-style=>'clear:both;'},"Weitere Payone Einzüge über die vorhandene TXID $ctt->{txt16} (vorautorisiert Summe beachten) durch manuelle inkrement der Sequencenr mit +1", $q->textfield(-class=>'etxt',-name=>"payone_sequence",-default=>"$ctt->{int18}", -override=>'1',-size=>"1",-maxlength=>1)),"\n";
print $q->div({-class=>'element6',-style=>'clear:both;'},"Weitere Payone Einzüge über die vorhandene TXID $ctt->{txt16} (vorautorisiert Summe beachten) durch manuelle inkrement der Sequencenr mit +1", $q->textfield(-class=>'etxt',-name=>"payone_sequence",-default=>"", -override=>'1',-size=>"1",-maxlength=>1)),"\n";
}
#Payone reset if OPOS and TXID
if($ctt->{int14} && $ctt->{txt16}){