Business-eWAY-RapidAPI
view release on metacpan or search on metacpan
examples/web/cgi-bin/payment.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use CGI::Session;
use DateTime;
$| = 1;
my $q = new CGI();
my $session = new CGI::Session();
print $session->header();
$session->flush();
my $Response = $session->param('Response');
my $TotalAmount = $session->param('TotalAmount');
my $InvoiceReference = $session->param('InvoiceReference');
if ( !defined($Response) ) {
header("Location: default.pl");
exit();
}
my $lblError; ##nu
my $dt = DateTime->now();
my $JSONPScript = "";
## Content
print
qq|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">|
. qq|<html xmlns="http://www.w3.org/1999/xhtml">|
. qq|<head>|
. qq| <title></title>|
. qq| <link href="../Styles/Site.css" rel="stylesheet" type="text/css" />|
. qq| <!-- Include for Ajax Calls -->|
. qq| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>|
. qq| <!-- This is the JSONP script include on the eWAY Rapid API Server - this must be included to use the Rapid API via JSONP -->|
. qq| <script type="text/javascript" src="$JSONPScript"></script>|
. qq|</head>|
.
qq|<body>|
. qq| <form id="form1" action="$Response->{'FormActionURL'}" method='post'>|
. qq| <center>|
. qq| <div id="outer">|
. qq| <div id="toplinks">|
. qq| <img alt="eWAY Logo" class="logo" src="../Images/merchantlogo.gif" width="926px" height="65px" />|
. qq| </div>|
. qq| <div id="main">|
. qq| <div id="titlearea">|
. qq| <h2>Sample Merchant Checkout</h2>|
. qq| </div>|;
if ( defined($lblError) ) {
print qq| <div id="error">|
. qq| <label style="color:red"> $lblError </label>|
. qq| </div>|;
}
print qq| <div id="maincontent">|
. qq| <div class="transactioncustomer">|
. qq| <div class="header first">|
. qq| Customer Address|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblStreet1">Street1</label>|
. qq| <label id="lblStreet1">$Response->{'Customer'}{'Street1'}</label>|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblStreet2">Street2</label>|
. qq| <label id="lblStreet2">$Response->{'Customer'}{'Street2'}</label>|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblCity">|
. qq| City</label>|
. qq| <label id="lblStreet">$Response->{'Customer'}{'City'}</label>|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblState">|
. qq| State</label>|
. qq| <label id="lblState">$Response->{'Customer'}{'State'}</label>|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblPostcode">|
. qq| Post Code</label>|
. qq| <label id="lblPostcode">$Response->{'Customer'}{'PostalCode'}</label>|
. qq| </div>|
. qq| <div class="fields">|
. qq| <label for="lblCountry">|
. qq| Country</label>|
( run in 1.126 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )