mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-11 22:37:27 +02:00
Refactoring user registration payment methodes
This commit is contained in:
parent
dc89bed086
commit
da31898968
28 changed files with 974 additions and 2750 deletions
|
@ -38,7 +38,7 @@ sub handler {
|
|||
my $cf = new Config;
|
||||
my $ml = new Mlogic;
|
||||
my $bw = new Basework;
|
||||
my $tk = new Shareework;
|
||||
my $shwo = new Shareework;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
my $but = new Buttons;
|
||||
|
@ -195,8 +195,8 @@ sub handler {
|
|||
$apif->authout($q,$coo);
|
||||
|
||||
#create_account. 2. inserts contentadr
|
||||
my $tinkc_id = $tk->create_account($aowner);
|
||||
($returnwww,$feedb) = $tk->save_account($q,$tinkc_id,\%varenv,$aowner);
|
||||
my $shareec_id = $shwo->create_account($aowner);
|
||||
($returnwww,$feedb) = $shwo->save_account($q,$shareec_id,\%varenv,$aowner);
|
||||
|
||||
#Like login_sharee, redundant
|
||||
my $hw_id = unpack ('H*', pack('Nc', time, $$ % 0xff));#old $co
|
||||
|
@ -218,8 +218,8 @@ sub handler {
|
|||
|
||||
#if user-pw authorized, then ignore conflict_ because it matches exist user-data
|
||||
#should be result to Uhps page
|
||||
if($tinkc_id && $returnwww && $returnwww =~ /conflict_txt07|conflict_txt08/){
|
||||
$return = $tk->delete_account($tinkc_id,$users_dms->{u_id});
|
||||
if($shareec_id && $returnwww && $returnwww =~ /conflict_txt07|conflict_txt08/){
|
||||
$return = $shwo->delete_account($shareec_id,$users_dms->{u_id});
|
||||
$apif->authout($q,$coo) if($coo);
|
||||
print redirect("$varenv{wwwhost}/$varenv{mandant}/Anmelden?conflict_failure=1");
|
||||
exit 0;
|
||||
|
@ -353,9 +353,9 @@ sub handler {
|
|||
my $delete_key = "delete_adr";
|
||||
$feedb->{message} = "failure::Datensatz wirklich löschen. ::?base_edit=$delete_key\&exit_box2=1\&c_id=$R::c_id ::löschen";
|
||||
}elsif($R::c_id && $R::base_edit eq "delete_adr"){
|
||||
$return = $tk->delete_account($R::c_id,$users_dms->{u_id});
|
||||
$return = $shwo->delete_account($R::c_id,$users_dms->{u_id});
|
||||
}elsif($R::c_id && $R::base_edit eq "save_adr"){
|
||||
($returnwww,$feedb) = $tk->save_account($q,$R::c_id,\%varenv,$users_dms->{u_id});
|
||||
($returnwww,$feedb) = $shwo->save_account($q,$R::c_id,\%varenv,$users_dms->{u_id});
|
||||
}
|
||||
}else{
|
||||
$feedb->{message} = "failure::Abbruch. Schreibender Zugriff \"Kunden Stammdaten\" verweigert.";
|
||||
|
@ -540,12 +540,15 @@ sub handler {
|
|||
|
||||
#save_account. 3. updates contentadr
|
||||
if($users_sharee->{c_id} && $R::sharee_edit && $R::sharee_edit =~ /save_account/){
|
||||
($returnwww,$feedb) = $tk->save_account($q,$users_sharee->{c_id},\%varenv,$aowner);
|
||||
($returnwww,$feedb) = $shwo->save_account($q,$users_sharee->{c_id},\%varenv,$aowner);
|
||||
}
|
||||
|
||||
if($users_sharee->{c_id} && $R::sharee_edit && $R::sharee_edit =~ /save_transact/){
|
||||
$returnwww = $tk->save_transact($q,$users_sharee->{c_id},$coo,$aowner);
|
||||
$returnwww = $shwo->save_transact($q,$users_sharee->{c_id},$coo,$aowner);
|
||||
}
|
||||
#we do it in PayoneLink.pm
|
||||
#if($users_sharee->{c_id} && $R::sharee_edit && $R::sharee_edit =~ /generate_payonelink/){
|
||||
# $returnwww = $pay->generate_payonelink($q,\%varenv,$users_sharee,$R::prepaid_id,$R::prepaid_amount,$aowner);
|
||||
#}
|
||||
|
||||
if($returnwww && $returnwww =~ /failure::(.*)/){
|
||||
$returnwww =~ s/::/=/g;
|
||||
|
@ -554,10 +557,8 @@ sub handler {
|
|||
if($returnwww =~ /txt22|txt23/){
|
||||
#should be result to Uhps page
|
||||
if($returnwww =~ /conflict_txt22/){
|
||||
$return = $tk->delete_account($users_sharee->{c_id},$users_dms->{u_id});
|
||||
$apif->authout($q,$coo) if($coo);
|
||||
print redirect("$varenv{wwwhost}/$varenv{mandant}/Anmelden?conflict_failure=1$session_and");
|
||||
exit 0;
|
||||
print redirect("$varenv{wwwhost}/$varenv{mandant}/Account/$varenv{accounting_2}?cum=1\&conflict_failure=1$session_and\&$returnwww");
|
||||
exit 0;
|
||||
}
|
||||
print redirect("$varenv{wwwhost}/$varenv{mandant}/Account/$varenv{accounting_2}?cum=1$session_and\&$returnwww");
|
||||
}elsif($returnwww =~ /int03/){
|
||||
|
@ -586,7 +587,6 @@ sub handler {
|
|||
print FILE "$_=$val\n";
|
||||
$payone_return .= "$_=$val\n";# if($_ =~ /error|message/i);
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
my $update_adr = {
|
||||
table => "contentadr",
|
||||
|
@ -637,10 +637,10 @@ sub handler {
|
|||
#int12=0 should be set after capture success in payment module
|
||||
|
||||
if(($users_sharee->{int04} != 1) && ($users_sharee->{txt08} =~ /\w\@\w/)){
|
||||
$tk->emailack(\%varenv,$users_sharee->{c_id});
|
||||
$shwo->emailack(\%varenv,$users_sharee->{c_id});
|
||||
}
|
||||
if(($users_sharee->{int13} != 1) && ($users_sharee->{txt07} =~ /\d{9}/ && length($users_sharee->{txt07}) <= 16)){
|
||||
$tk->smsack($users_sharee);
|
||||
$shwo->smsack($users_sharee);
|
||||
}
|
||||
close(FILE) if($debug);
|
||||
}else{
|
||||
|
@ -657,6 +657,9 @@ sub handler {
|
|||
$dbt->update_record($dbh,$update_adr,$users_sharee) if($users_sharee->{c_id} > 0);
|
||||
$dbt->update_operatorsloop($varenv{dbname},$users_sharee->{c_id},"update");
|
||||
}
|
||||
|
||||
print FILE Dumper($update_adr) . "\n" if($debug);
|
||||
close(FILE);
|
||||
}#end payone response with pseudocardpan
|
||||
}
|
||||
|
||||
|
@ -668,10 +671,10 @@ sub handler {
|
|||
print FILE "trigger confirm-code request by $R::sharee_edit\n" if($debug);
|
||||
|
||||
if(($users_sharee->{int04} != 1 && $R::sharee_edit =~ /send_email/) && ($users_sharee->{txt08} =~ /\w\@\w/)){
|
||||
$tk->emailack(\%varenv,$users_sharee->{c_id});
|
||||
$shwo->emailack(\%varenv,$users_sharee->{c_id});
|
||||
}
|
||||
if(($users_sharee->{int13} != 1 && $R::sharee_edit =~ /send_sms/) && ($users_sharee->{txt07} =~ /\d{9}/ && length($users_sharee->{txt07}) <= 16)){
|
||||
$tk->smsack($users_sharee);
|
||||
$shwo->smsack($users_sharee);
|
||||
}
|
||||
close(FILE) if($debug);
|
||||
}#send confirm code
|
||||
|
@ -771,7 +774,7 @@ sub handler {
|
|||
|
||||
if($R::email && $R::sharee_edit =~ /password_forgotten/){
|
||||
my $hw_id = unpack ('H*', pack('Nc', time, $$ % 0xff));#old $co
|
||||
$tk->send_password(\%varenv,$R::email,$hw_id,$aowner);
|
||||
$shwo->send_password(\%varenv,$R::email,$hw_id,$aowner);
|
||||
}
|
||||
|
||||
#redirections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue