diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm
index a01e63b..35a9a9e 100755
--- a/copri4/main/src/Mod/APIfunc.pm
+++ b/copri4/main/src/Mod/APIfunc.pm
@@ -27,6 +27,7 @@ use Mod::DBtank;
use Mod::Callib;
use Mod::Basework;
use Mod::Pricing;
+use Mod::Payment;
use Mod::MailTransport;
use Data::Dumper;
use Sys::Hostname;
@@ -37,6 +38,7 @@ my $dbt = new DBtank;
my $cal = new Callib;
my $bw = new Basework;
my $pri = new Pricing;
+my $pay = new Payment;
my $mailtrans = new MailTransport;
sub new {
@@ -3009,7 +3011,7 @@ sub auth_verify(){
#first prepaid account check (not save because without rental history)
if($auth_primary->{int03} == 3){
my $prepaidhash = { prepaid_total => 0 };
- $prepaidhash = $pri->collect_prepaid($dbh_primary,$auth_primary) if($auth_primary->{c_id});
+ $prepaidhash = $pay->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;
diff --git a/copri4/main/src/Mod/APIjsonserver.pm b/copri4/main/src/Mod/APIjsonserver.pm
index df82dd0..aa17a63 100755
--- a/copri4/main/src/Mod/APIjsonserver.pm
+++ b/copri4/main/src/Mod/APIjsonserver.pm
@@ -71,7 +71,7 @@ my $response = {
apiserver => "$apiserver",
response => "$respreq",
uri_primary => "$dbt->{primary}->{sharee_primary}->{primaryApp}",
- copri_version => "4.1.23.26",
+ copri_version => "4.1.23.28",
user_id => "",
authcookie => "",
new_authcoo => "0",
diff --git a/copri4/main/src/Mod/Indexsharee.pm b/copri4/main/src/Mod/Indexsharee.pm
index 38c0c89..9d36c2a 100755
--- a/copri4/main/src/Mod/Indexsharee.pm
+++ b/copri4/main/src/Mod/Indexsharee.pm
@@ -553,10 +553,9 @@ sub handler {
if($users_sharee->{c_id} && $R::sharee_edit && $R::sharee_edit =~ /save_transact/){
$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($users_sharee->{c_id} && $R::sharee_edit && $R::sharee_edit =~ /generate_payonelink/ && $R::prepaid_amount && $R::prepaid_amount =~ /\d+/){
+ system("$dbt->{copri_conf}->{basedir}/$varenv{syshost}/src/scripts/payonelink.pl '$varenv{syshost}' '$users_sharee->{c_id}' '$R::prepaid_amount' '$aowner' &");
+ }
if($returnwww && $returnwww =~ /failure::(.*)/){
$returnwww =~ s/::/=/g;
diff --git a/copri4/main/src/Mod/Libenz.pm b/copri4/main/src/Mod/Libenz.pm
index d74a1f0..40089b6 100755
--- a/copri4/main/src/Mod/Libenz.pm
+++ b/copri4/main/src/Mod/Libenz.pm
@@ -101,7 +101,7 @@ sub country_code(){
'DK' => 'Dänemark',
'EE' => 'Estland',
'IE' => 'Irland',
- 'EL' => 'Griechenland',
+ 'GR' => 'Griechenland',
'ES' => 'Spanien',
'FR' => 'Frankreich',
'HR' => 'Kroatien',
diff --git a/copri4/main/src/Mod/MailTransport.pm b/copri4/main/src/Mod/MailTransport.pm
index 45aa2f9..ce76037 100755
--- a/copri4/main/src/Mod/MailTransport.pm
+++ b/copri4/main/src/Mod/MailTransport.pm
@@ -187,8 +187,8 @@ sub mail_feedback2garage {
my $sendref = $self->sendrefhash();
$sendref->{mail_to} = $crecord_content->{fleed_email};
- $sendref->{subject} = "sharee.bike Werkstatt Meldung";
- $sendref->{message} = "Es ist folgende sharee.bike App-Meldung zu Mietrad $contentpos->{ct_name} an Station $contentpos->{int04} eingegangen:\n\n$contentpos->{txt01}\n\nFreundliche Grüße,\nIhr sharee.bike Mietradsystem";
+ $sendref->{subject} = "sharee.bike App Meldung";
+ $sendref->{message} = "Es ist folgende sharee.bike App Nachricht zu Mietrad $contentpos->{ct_name} an Station $contentpos->{int04} eingegangen:\n\n$contentpos->{txt01}\n\nFreundliche Grüße,\nIhr sharee.bike Mietradsystem";
$sendref->{message} =~ s/\n/\
/g;#TOD prepare_content
my ($smtp,$mailxconf) = $self->mail_connect($sendref);
diff --git a/copri4/main/src/Mod/Modalbox3.pm b/copri4/main/src/Mod/Modalbox3.pm
index 622181a..6f630d8 100755
--- a/copri4/main/src/Mod/Modalbox3.pm
+++ b/copri4/main/src/Mod/Modalbox3.pm
@@ -52,7 +52,7 @@ sub mobox3(){
if($R::node2edit eq "edit_relation" || $R::rel_edit =~ /_relation/){
$title = "Node Editor";
- $height = "400";
+ $height = "500";
$width = "600";
}
diff --git a/copri4/main/src/Mod/NodeEdit.pm b/copri4/main/src/Mod/NodeEdit.pm
index 1b5661e..1b3db85 100755
--- a/copri4/main/src/Mod/NodeEdit.pm
+++ b/copri4/main/src/Mod/NodeEdit.pm
@@ -158,7 +158,11 @@ sub admin_tpl(){
}elsif($key =~ /fleed_/){
print $q->Tr();
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
- print $q->td({-class=>'content1_cms'},$q->textfield(-class=>'etxt',-name=>"$key",-default=>"$node_meta->{$key}",-override=>'1',-size=>"$isize",-maxlength=>120)),"\n";
+ if($isize eq "area"){
+ print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-class=>"etxt", -style=>'border: 1px solid silver;', -name=>"$key", -override=>'1',-default=>"$node_meta->{$key}",-rows=>"2",-cols=>25)),"\n";
+ }else{
+ print $q->td({-class=>'content1_cms'},$q->textfield(-class=>'etxt',-name=>"$key",-default=>"$node_meta->{$key}",-override=>'1',-size=>"$isize",-maxlength=>120)),"\n";
+ }
}
}
}
diff --git a/copri4/main/src/Mod/Payment.pm b/copri4/main/src/Mod/Payment.pm
index 5e42f05..7bb3dfb 100755
--- a/copri4/main/src/Mod/Payment.pm
+++ b/copri4/main/src/Mod/Payment.pm
@@ -1176,6 +1176,152 @@ sub payone_capture {
return ($retval,$return_text);
}
+#payment-type prepaid request
+sub prepaid_request {
+ my $self = shift;
+ my $dbh = shift;
+ my $ctadr = shift || {};
+ my $owner = shift;
+
+ my $feedb = {
+ u_rows => 0,
+ prepaid_account => "",
+ prepaid_id => 0,
+ message => "",
+ };
+
+ if($ctadr->{c_id}){
+ my $pref_ctt = {
+ table => "contenttrans",
+ fetch => "one",
+ main_id => 300023,
+ template_id => 219,#prepaid tpl
+ int10 => "$ctadr->{c_id}",
+ state => "is::null",
+ close_time => "is::null",
+ };
+ my $ctt_prepaid = { c_id => 0 };
+ $ctt_prepaid = $dbt->fetch_record($dbh,$pref_ctt);
+ if(!$ctt_prepaid->{c_id}){
+ my $ct_id = $dbt->insert_contenttrans($dbh,$ctadr,"300023","219","----","$owner");
+ $pref_ctt->{c_id} = $ct_id;
+ $ctt_prepaid = $dbt->fetch_record($dbh,$pref_ctt) if($pref_ctt->{c_id});
+ my $update_adr = {
+ table => "contentadr",
+ mtime => "now()",
+ owner => $owner,
+ int18 => 3,#pay_ack
+ ct_name => "Prepaid-$ctt_prepaid->{c_id}",
+ };
+ $feedb->{u_rows} = $dbt->update_record($dbh,$update_adr,$ctadr);
+ }
+
+ my $pos_id = 0;
+ my $cttpos = { c_id => 0 };
+ if($ctt_prepaid->{c_id} > 0){
+
+ my $posref = {
+ table => "contenttrans",
+ table_pos => "contenttranspos",
+ fetch => "one",
+ keyfield => "c_id",
+ ca_id => "$ctadr->{c_id}",
+ int02 => "is::null",#0
+ };
+ $cttpos = $dbt->collect_post($dbh,$posref);
+
+ if(!$cttpos->{c_id}){
+ #pseudo part. not available in content
+ my $ct = {
+ c_id => 0,
+ barcode => 0,
+ ca_id => $ctadr->{c_id},
+ ct_id => $ctt_prepaid->{c_id},
+ int02 => 0,#prepaid price on request is 0
+ txt01 => 'Prepaid Position',
+ int16 => 4,#fibumark for prepaid
+ template_id => 219,
+ };
+
+ $cttpos->{c_id} = $dbt->insert_pos($dbh,$ctt_prepaid->{c_id},$ct,"",$ctadr,"","","","0",$owner,"");
+ $dbt->update_one($dbh,{table => 'contenttranspos',c_id => $cttpos->{c_id}},"barcode = $cttpos->{c_id},ct_name = '$ctt_prepaid->{c_id}-$cttpos->{c_id}'");
+ $feedb->{prepaid_id} = $ctt_prepaid->{c_id} . "-" . $cttpos->{c_id};
+ }
+
+ $feedb->{prepaid_account} = $ctt_prepaid->{c_id};
+ }
+ }
+ return $feedb;
+}#end prepaid_request
+
+
+#primary collect prepaid
+sub collect_prepaid {
+ my $self = shift;
+ my $dbh = shift;
+ my $ctadr = shift || {};
+
+ my $prepaidhash = {
+ prepaid_total => 0,
+ prepaid_id => 0,
+ };
+
+ if($ctadr->{c_id}){
+ #all un-booked or opos
+ my $posref = {
+ table => "contenttrans",
+ table_pos => "contenttranspos",
+ fetch => "all",
+ keyfield => "c_id",
+ ca_id => "$ctadr->{c_id}",
+ 'ct.state' => "is::null",#selects int04 is null OR int14 >= 1
+ 'ct.close_time' => "is::null",
+ };
+ my $cttpos = { c_id => 0 };
+ $cttpos = $dbt->collect_post($dbh,$posref);
+ foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
+ #print $cttpos->{$id}->{barcode} . ":" . $cttpos->{$id}->{int02},"
";
+
+ if($cttpos->{$id}->{barcode} && $cttpos->{$id}->{int02} == 0){
+ $prepaidhash->{invoice_id} = $cttpos->{$id}->{ct_id};
+ $prepaidhash->{number} = $cttpos->{$id}->{c_id};
+ $prepaidhash->{prepaid_id} = $cttpos->{$id}->{ct_id} . "-" . $cttpos->{$id}->{c_id};#payone reference
+ $prepaidhash->{description} = $cttpos->{$id}->{txt01};
+ $prepaidhash->{response_log} = $cttpos->{$id}->{txt25};
+ $prepaidhash->{payone_link} = $cttpos->{$id}->{txt30};
+ if($cttpos->{$id}->{txt25} =~ /(\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2}).*mailing/){
+ $prepaidhash->{mail_datetime} = $1;
+ }
+ }
+ if($cttpos->{$id}->{int02} && $cttpos->{$id}->{int02} != 0){
+ $prepaidhash->{prepaid_total} += $cttpos->{$id}->{int02};
+ }
+ }
+
+ if($prepaidhash->{invoice_id} && $ctadr->{int03} && $ctadr->{int03} == 3 && (!$ctadr->{int12} || $ctadr->{int12} != 2)){
+ my $update_adr = {
+ table => "contentadr",
+ ct_name => "Prepaid-$prepaidhash->{invoice_id}",
+ pay_time => "now()",#just to see who changes at what time
+ };
+
+ #for int12 vde update we need also open operator invoices to get saldo balance
+ #int12 => "1",
+
+ #if($prepaidhash->{prepaid_total} > 0){
+ #$update_adr->{int12} = "null";
+ #}else{
+ # $update_adr->{int12} = "1";
+ #}
+ $dbt->update_record($dbh,$update_adr,$ctadr);
+ $dbt->update_operatorsloop("",$ctadr->{c_id},"update");
+ }
+ }
+
+ $bw->log("Pricing prepaidhash:",$prepaidhash,"");
+ return $prepaidhash;
+}#end collect prepaid
+
#request "payone-link"
sub generate_payonelink {
my $self = shift;
@@ -1193,6 +1339,7 @@ sub generate_payonelink {
my $dbh = "";
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
+ my $view_dt = strftime "%d.%m.%Y %H:%M:%S", localtime;
open(FILE,">>$varenv->{logdir}/payonelink.log");
print FILE "\n*** $now_dt 'generate_payonelink' ctadr:$ctadr->{c_id}|$ctadr->{txt08}\n";
@@ -1227,7 +1374,7 @@ sub generate_payonelink {
mode => "$dbt->{payonelink_conf}->{mode}",
notifyUrl => "$dbt->{payonelink_conf}->{notifyUrl}",
description => "Ihr vorbereiteter sharee.bike Prepaid/Vorkasse Auftrag",
- paymentMethods => ['visa', 'mastercard', 'giropay'],
+ paymentMethods => ['visa', 'mastercard'],
reference => "$reference",
shoppingCart => [{
type => "goods",
@@ -1267,6 +1414,7 @@ sub generate_payonelink {
mtime => "now()",
owner => "$aowner",
};
+ $update_pos->{txt01} = "$prepaidhash->{description}. Payone-Link generiert $view_dt";
eval {
$response_in = decode_json($ret_json);
@@ -1286,9 +1434,8 @@ sub generate_payonelink {
my $rows = $dbt->update_record($dbh,$update_pos,$ctpos) if($ctpos->{c_id});
my $cms_message_key = "email-payonelink";
- if(!$varenv->{cms}->{$cms_message_key}->{txt}){
- $feedb->{message} = "failure::Achtung, '$cms_message_key' ist nicht vorhanden. Es wurde keine eMail versandt!";
- }elsif($ctpos->{c_id}){
+ if($ctpos->{c_id}){
+ print FILE "$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_payonelink' '$ctadr->{c_id}' '$ctpos->{c_id}' '' '$cms_message_key' '' '$app_name'";
system("$dbt->{copri_conf}->{basedir}/$varenv->{syshost}/src/scripts/mailTransportcms.pl '$varenv->{syshost}' 'send_payonelink' '$ctadr->{c_id}' '$ctpos->{c_id}' '' '$cms_message_key' '' '$app_name'");
}
@@ -1342,4 +1489,3 @@ sub rpcpayone_postjson {
1;
-
diff --git a/copri4/main/src/Mod/Prelib.pm b/copri4/main/src/Mod/Prelib.pm
index 062416f..50d8a98 100755
--- a/copri4/main/src/Mod/Prelib.pm
+++ b/copri4/main/src/Mod/Prelib.pm
@@ -48,84 +48,6 @@ my %varenv = $cf->envonline();
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
my $debug=1;
-#payment-type prepaid request
-sub prepaid_request {
- my $self = shift;
- my $dbh = shift;
- my $ctadr = shift || {};
- my $owner = shift;
-
- my $feedb = {
- u_rows => 0,
- prepaid_account => "",
- prepaid_id => 0,
- message => "",
- };
-
- if($ctadr->{c_id}){
- my $pref_ctt = {
- table => "contenttrans",
- fetch => "one",
- main_id => 300023,
- template_id => 219,#prepaid tpl
- int10 => "$ctadr->{c_id}",
- state => "is::null",
- close_time => "is::null",
- };
- my $ctt_prepaid = { c_id => 0 };
- $ctt_prepaid = $dbt->fetch_record($dbh,$pref_ctt);
- if(!$ctt_prepaid->{c_id}){
- my $ct_id = $dbt->insert_contenttrans($dbh,$ctadr,"300023","219","----","$owner");
- $pref_ctt->{c_id} = $ct_id;
- $ctt_prepaid = $dbt->fetch_record($dbh,$pref_ctt) if($pref_ctt->{c_id});
- my $update_adr = {
- table => "contentadr",
- mtime => "now()",
- owner => $owner,
- int18 => 3,#pay_ack
- ct_name => "Prepaid-$ctt_prepaid->{c_id}",
- };
- $feedb->{u_rows} = $dbt->update_record($dbh,$update_adr,$ctadr);
- }
-
- my $pos_id = 0;
- my $cttpos = { c_id => 0 };
- if($ctt_prepaid->{c_id} > 0){
-
- my $posref = {
- table => "contenttrans",
- table_pos => "contenttranspos",
- fetch => "one",
- keyfield => "c_id",
- ca_id => "$ctadr->{c_id}",
- int02 => "is::null",#0
- };
- $cttpos = $dbt->collect_post($dbh,$posref);
-
- if(!$cttpos->{c_id}){
- #pseudo part. not available in content
- my $ct = {
- c_id => 0,
- barcode => 0,
- ca_id => $ctadr->{c_id},
- ct_id => $ctt_prepaid->{c_id},
- int02 => 0,#prepaid price on request is 0
- txt01 => 'Prepaid Position',
- int16 => 4,#fibumark for prepaid
- template_id => 219,
- };
-
- $cttpos->{c_id} = $dbt->insert_pos($dbh,$ctt_prepaid->{c_id},$ct,"",$ctadr,"","","","0",$owner,"");
- $dbt->update_one($dbh,{table => 'contenttranspos',c_id => $cttpos->{c_id}},"barcode = $cttpos->{c_id},ct_name = '$ctt_prepaid->{c_id}-$cttpos->{c_id}'");
- $feedb->{prepaid_id} = $ctt_prepaid->{c_id} . "-" . $cttpos->{c_id};
- }
-
- $feedb->{prepaid_account} = $ctt_prepaid->{c_id};
- }
- }
- return $feedb;
-}#end prepaid_request
-
#select rentals for messaging user if bike > 12h ... occupied
sub longterm_occupied {
my $self = shift;
diff --git a/copri4/main/src/Mod/Pricing.pm b/copri4/main/src/Mod/Pricing.pm
index 9b1b5a3..1cbff8e 100755
--- a/copri4/main/src/Mod/Pricing.pm
+++ b/copri4/main/src/Mod/Pricing.pm
@@ -634,74 +634,6 @@ sub operator_accounting2calc {
return $oac;
}
-#primary collect prepaid
-sub collect_prepaid {
- my $self = shift;
- my $dbh = shift;
- my $ctadr = shift || {};
-
- my $prepaidhash = {
- prepaid_total => 0,
- prepaid_id => 0,
- };
-
- if($ctadr->{c_id}){
- #all un-booked or opos
- my $posref = {
- table => "contenttrans",
- table_pos => "contenttranspos",
- fetch => "all",
- keyfield => "c_id",
- ca_id => "$ctadr->{c_id}",
- 'ct.state' => "is::null",#selects int04 is null OR int14 >= 1
- 'ct.close_time' => "is::null",
- };
- my $cttpos = { c_id => 0 };
- $cttpos = $dbt->collect_post($dbh,$posref);
- foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
- #print $cttpos->{$id}->{barcode} . ":" . $cttpos->{$id}->{int02},"
";
-
- if($cttpos->{$id}->{barcode} && $cttpos->{$id}->{int02} == 0){
- $prepaidhash->{invoice_id} = $cttpos->{$id}->{ct_id};
- $prepaidhash->{number} = $cttpos->{$id}->{c_id};
- $prepaidhash->{prepaid_id} = $cttpos->{$id}->{ct_id} . "-" . $cttpos->{$id}->{c_id};#payone reference
- $prepaidhash->{description} = $cttpos->{$id}->{txt01};
- $prepaidhash->{response_log} = $cttpos->{$id}->{txt25};
- $prepaidhash->{payone_link} = $cttpos->{$id}->{txt30};
- if($cttpos->{$id}->{txt25} =~ /(\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2}).*mailing/){
- $prepaidhash->{mail_datetime} = $1;
- }
- }
- if($cttpos->{$id}->{int02} && $cttpos->{$id}->{int02} != 0){
- $prepaidhash->{prepaid_total} += $cttpos->{$id}->{int02};
- }
- }
-
- if($prepaidhash->{invoice_id} && $ctadr->{int03} && $ctadr->{int03} == 3 && (!$ctadr->{int12} || $ctadr->{int12} != 2)){
- my $update_adr = {
- table => "contentadr",
- ct_name => "Prepaid-$prepaidhash->{invoice_id}",
- pay_time => "now()",#just to see who changes at what time
- };
-
- #for int12 vde update we need also open operator invoices to get saldo balance
- #int12 => "1",
-
- #if($prepaidhash->{prepaid_total} > 0){
- #$update_adr->{int12} = "null";
- #}else{
- # $update_adr->{int12} = "1";
- #}
- $dbt->update_record($dbh,$update_adr,$ctadr);
- $dbt->update_operatorsloop("",$ctadr->{c_id},"update");
- }
- }
-
- $bw->log("Pricing prepaidhash:",$prepaidhash,"");
- return $prepaidhash;
-}#end collect prepaid
-
-
#sum of primary prepaid
sub primary_sum_prepaid {
my $self = shift;
diff --git a/copri4/main/src/scripts/payonelink.pl b/copri4/main/src/scripts/payonelink.pl
new file mode 100755
index 0000000..ac26ae5
--- /dev/null
+++ b/copri4/main/src/scripts/payonelink.pl
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+#
+#
+# SPDX-License-Identifier: AGPL-3.0-or-later
+# Copyright (c) Rainer Gümpelein, TeilRad GmbH
+#
+##forking payone request to generate an mail payone-link
+
+use vars qw($syshost);
+
+BEGIN {
+ $syshost = $ARGV[0] || exit 1;
+}
+
+use lib "/var/www/copri-bike/$syshost/src";
+use strict;
+use warnings;
+use POSIX;
+use Scalar::Util qw(looks_like_number);
+use Lib::Config;
+use Mod::DBtank;
+use Mod::Payment;
+use Data::Dumper;
+
+my $cf = new Config;
+my %varenv = $cf->envonline();
+my $dbt = new DBtank;
+my $pay = new Payment;
+my $now_dt = strftime("%Y-%m-%d %H:%M:%S",localtime(time));
+
+my $adrc_id = $ARGV[1] || "";
+my $prepaid_amount = $ARGV[2] || "";
+my $aowner = $ARGV[3] || "196";
+my $dbh = "";
+
+my $dbh = $dbt->dbconnect();
+my $authref = {
+ table => "contentadr",
+ fetch => "one",
+ template_id => "202",
+ c_id => "$adrc_id",
+};
+my $users_sharee = { c_id => 0 };
+$users_sharee = $dbt->fetch_record($dbh,$authref) if($adrc_id);
+
+my $prepaidhash = {};
+$prepaidhash = $pay->collect_prepaid($dbh,$users_sharee);
+my $ret_json = $pay->generate_payonelink(\%varenv,$users_sharee,$prepaidhash,$prepaid_amount,$aowner);
+
diff --git a/copri4/shareeapp-operator/src/Tpl/PayoneLink.pm b/copri4/shareeapp-operator/src/Tpl/PayoneLink.pm
index 047ab03..a64b60a 100755
--- a/copri4/shareeapp-operator/src/Tpl/PayoneLink.pm
+++ b/copri4/shareeapp-operator/src/Tpl/PayoneLink.pm
@@ -10,8 +10,6 @@ use CGI ':standard';
use Mod::Buttons;
use Mod::Basework;
use Mod::DBtank;
-use Mod::Prelib;
-use Mod::Pricing;
use Mod::Payment;
use Data::Dumper;
@@ -36,8 +34,6 @@ sub tpl(){
my $bw = new Basework;
my $dbt = new DBtank;
my $but = new Buttons;
- my $pl = new Prelib;
- my $pri = new Pricing;
my $pay = new Payment;
$q->import_names('R');
@@ -56,26 +52,20 @@ sub tpl(){
my $payable_check=0;
$payable_check = $bw->isuser_rentable($ctadr,$varenv);
my $prepaidhash = {};
- $prepaidhash = $pri->collect_prepaid($dbh,$ctadr) if($ctadr->{c_id});
+ $prepaidhash = $pay->collect_prepaid($dbh,$ctadr) if($ctadr->{c_id});
if(!$prepaidhash->{prepaid_id} && $ctadr->{c_id}){
- $feedb = $pl->prepaid_request($dbh,$ctadr,$aowner);
- $prepaidhash = $pri->collect_prepaid($dbh,$ctadr);
+ $feedb = $pay->prepaid_request($dbh,$ctadr,$aowner);
+ $prepaidhash = $pay->collect_prepaid($dbh,$ctadr);
}
- my $ret_json = "";
-
print $q->start_form(),"\n";
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
print "