mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +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
|
@ -1902,7 +1902,7 @@ sub bikes_available(){
|
|||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
$return->{$id}->{aa_ride} = "0";
|
||||
$return->{$id}->{aa_ride} = "1" if($record_st->{$record->{$id}->{int04}}->{int42});
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
$return->{$id}->{uri_operator} = "$dbt->{operator}->{$varenv->{dbname}}->{operatorApp}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
|
||||
|
@ -2084,7 +2084,7 @@ sub bikes_all(){
|
|||
foreach my $id (sort { $record->{$a}->{barcode} <=> $record->{$b}->{barcode} } keys (%$record)){
|
||||
if(1==1){
|
||||
$bikes_on_station->{$record->{$id}->{int04}}->{bike_ist} += 1;
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
$return->{$id}->{uri_operator} = "$dbt->{operator}->{$varenv->{dbname}}->{operatorApp}";
|
||||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
|
@ -2302,7 +2302,7 @@ sub stations_available(){
|
|||
$return->{$id}->{capacity} = "$record->{$id}->{int05}" || "1";
|
||||
|
||||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
$return->{$id}->{uri_operator} = "$dbt->{operator}->{$varenv->{dbname}}->{operatorApp}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
my $description = $q->unescapeHTML($record->{$id}->{txt01}) || "";
|
||||
$return->{$id}->{description} = "$description";
|
||||
|
@ -2497,7 +2497,7 @@ sub stations_all(){
|
|||
}
|
||||
}
|
||||
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
$return->{$id}->{uri_operator} = "$dbt->{operator}->{$varenv->{dbname}}->{operatorApp}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
if($record->{$id}->{description}){
|
||||
my $description = $q->unescapeHTML($record->{$id}->{txt01}) || "";
|
||||
|
@ -2940,6 +2940,16 @@ sub auth_verify(){
|
|||
$update_primary->{txt26} = $q->escapeHTML($user_agent) if($user_agent);
|
||||
}
|
||||
|
||||
#check prepaid account
|
||||
if($auth_primary->{int03} == 3){
|
||||
my $prepaidhash = { prepaid_total => 0 };
|
||||
$prepaidhash = $pri->collect_prepaid($dbh_primary,$auth_primary) if($auth_primary->{c_id});
|
||||
if(!$prepaidhash->{prepaid_total} || $prepaidhash->{prepaid_total} < 0){
|
||||
my $vde = $auth_primary->{int12} || 1;
|
||||
$update_primary->{int12} = $vde;
|
||||
}
|
||||
}
|
||||
|
||||
my $rows = $dbt->update_record($dbh_primary,$update_primary,$auth_primary);
|
||||
$auth_primary = $dbt->fetch_record($dbh_primary,$authref);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue