package PayoneCCclient; # # SPDX-License-Identifier: AGPL-3.0-or-later # Copyright (c) Rainer Gümpelein, TeilRad GmbH # use strict; use warnings; use CGI ':standard'; use Config::General; use Mod::Libenz; use Mod::DBtank; sub new { my $class = shift; my $self = {}; bless($self,$class); return $self; } #Template sub tpl(){ my $self = shift; my $tpl_id = shift; my $node_meta = shift; my $users_dms = shift || ""; my $varenv = shift; my $users_sharee = shift || ""; my $feedb = shift || ""; my $q = new CGI; my $lb = new Libenz; my $dbt = new DBtank; my $globalconf_file = "/var/www/copri4/shareeconf/global.cfg"; my $conf = Config::General->new($globalconf_file); my %globalconf = $conf->getall; my $payone_conf = $globalconf{payone_conf}; my $bgcolor1 = "009899";#sharee #my $bgcolor1 = "e2001a"; $bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1}); $bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1}); print "
\n"; print $q->div({-class=>'content_title3'},"$varenv->{cms}->{'iframe-credit-card-data'}->{txt}"),"\n"; print $q->div({-class=>'content2'},"$varenv->{cms}->{'iframe-creditcard-data-info'}->{txt}"),"\n"; if($users_sharee->{int03} && $users_sharee->{int03} == 2 && $users_sharee->{txt28} && $users_sharee->{txt28} =~ /pseudocardpan=\d{19}/ && $users_sharee->{txt28} =~ /(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2})/){ my $cc_datetime = $1 || ""; $cc_datetime = $lb->time4de($cc_datetime,"1") if($cc_datetime); $varenv->{cms}->{'iframe-cc-acception'}->{txt} =~ s/::cc_datetime::/$cc_datetime/; print $q->div({-class=>'content2', -style=>'color:#009899;'},"$varenv->{cms}->{'iframe-cc-acception'}->{txt}"),"\n"; } print "\n"; print "
\n"; if(1==1){ print< fieldset { color:black; padding: 1em; border: 1px solid #$bgcolor1; width: 275px; margin: 10px; } label { margin-right: 10px; float: left; width: 80px; padding-top: 0.3em; text-align: left; } input, select{ font-size: 1em; border: 1px solid black; padding: 0.1em; } select { margin-right: 10px; } input, .inputIframe, select { display: block; margin-bottom: 10px; } input { width: 175px; } #paymentsubmit { width: 100%; font-size:1.2em; padding: 5px; margin-top:20px; color:#FFF; background-color:#$bgcolor1; } #errorOutput { text-align: center; color: #ff0000; display: block; } EOF ; print<
EOF ; } print "
\n"; } 1;