mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
fraud messaging
This commit is contained in:
parent
d0c401c848
commit
663dfd8c13
4 changed files with 38 additions and 2 deletions
|
@ -1264,6 +1264,13 @@ sub booking_update(){
|
|||
$update_cc->{int10} = 3;
|
||||
}
|
||||
|
||||
#fraud_rental sms_message
|
||||
if($auth->{txt29} && $auth->{txt29} =~ /Betrug/){
|
||||
$bw->log("$varenv->{basedir}/src/scripts/sms_message.pl $varenv->{syshost} fraud_renatl $auth->{txt07} $record_pos->{c_id}",$record_pos->{c_id},"");
|
||||
system("$varenv->{basedir}/src/scripts/sms_message.pl $varenv->{syshost} fraud_rental $auth->{txt07} $record_pos->{c_id} &");
|
||||
|
||||
}
|
||||
|
||||
#rental end only if locked
|
||||
#if(state eq available && $record_pos.lock_state eq locked and pos-state 2=requested or 3=occupied
|
||||
}elsif($state_key == 1 && $record_pos->{int20} == 1 && ($record_pos->{int10} == 2 || $record_pos->{int10} == 3)){
|
||||
|
|
|
@ -6,7 +6,7 @@ package SMSTransport;
|
|||
#SMS sender
|
||||
#
|
||||
#perl -cw do
|
||||
#use lib "/var/www/copri4/shareeapp-primary/src";
|
||||
#use lib "/var/www/copri-bike/shareeapp-primary/src";
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
@ -123,10 +123,13 @@ sub sms_message {
|
|||
$sms_tosub =~ s/^0/\+49/;
|
||||
$sms_to = $sms_tosub;
|
||||
}
|
||||
|
||||
#todo locking_progress
|
||||
if($todo eq "locking_progress"){
|
||||
$sms_message .= "Ihre Miete von $bike wurde nicht beendet! Ihre kostenpflichtige Miete läuft weiter! Stellen Sie sicher, dass das Schloss geschlossen ist. $hotline";
|
||||
}
|
||||
|
||||
#todo if > 24h rental
|
||||
if($todo eq "24h_occupied"){
|
||||
$sms_message .= "Zur Info! Sie haben $bike seit 24 Stunden kostenpflichtig gemietet!. $hotline";
|
||||
}
|
||||
|
@ -137,6 +140,12 @@ sub sms_message {
|
|||
$sms_message .= "Zur Info! Sie haben $bike seit 72 Stunden kostenpflichtig gemietet!. $hotline";
|
||||
}
|
||||
|
||||
#todo fraud_rental
|
||||
if($todo eq "fraud_rental"){
|
||||
$sms_message .= "Miete von einem Nutzer der als Betrugsfall hinterlegt ist! Mietrad $bike ";
|
||||
}
|
||||
|
||||
|
||||
my $message = Encode::encode('iso-8859-1', Encode::decode('utf-8',"$sms_message"));
|
||||
|
||||
open(FILE,">>$dbt->{copri_conf}->{logdir}/sms_gtx.log");
|
||||
|
|
|
@ -10,6 +10,7 @@ use POSIX;
|
|||
use CGI;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
use CGI ':standard';
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Calendar::Simple;
|
||||
use Date::Calc qw(:all);
|
||||
use Lib::Config;
|
||||
|
@ -165,8 +166,10 @@ sub tpl(){
|
|||
offset => $q->escapeHTML($offset),
|
||||
};
|
||||
|
||||
if($R::ct_id){
|
||||
if($R::ct_id && looks_like_number($R::ct_id)){
|
||||
$search->{ct_id} = $q->escapeHTML("$R::ct_id");
|
||||
}elsif($R::cttpos_id && looks_like_number($R::cttpos_id)){
|
||||
$search->{cttpos_id} = $q->escapeHTML("$R::cttpos_id");
|
||||
}else{
|
||||
$search->{start_date_time} = "$start_date_time";
|
||||
$search->{end_date_time} = "$end_date_time";
|
||||
|
|
|
@ -123,3 +123,20 @@ if($todo eq "locking_progress" && $phone && $pos_id){
|
|||
$smstrans->sms_message($todo,$hotline,$phone,$booking->{ct_name});
|
||||
}
|
||||
}#end
|
||||
|
||||
#SMS message fraud to me
|
||||
if($todo eq "fraud_rental" && $pos_id){
|
||||
my $sms_to = "$dbt->{copri_conf}->{sms_to}";
|
||||
|
||||
my $booking_pos = {
|
||||
table => "contenttranspos",
|
||||
fetch => "one",
|
||||
c_id => "$pos_id",
|
||||
};
|
||||
|
||||
my $booking = { c_id => 0 };
|
||||
$booking = $dbt->fetch_tablerecord($dbh,$booking_pos);
|
||||
|
||||
$smstrans->sms_message($todo,"",$sms_to,$booking->{ct_name});
|
||||
|
||||
}#end
|
||||
|
|
Loading…
Add table
Reference in a new issue