Harp Concert Payment


[insert_php]
function cleanup($dirtystr) {
$cleanstr = str_replace(“‘”, ” “, $dirtystr);
$cleanstr = str_replace(‘”‘, ‘ ‘, $cleanstr);
$cleanstr = str_replace(‘< ', '<', $cleanstr); $cleanstr = str_replace('>‘, ‘>’, $cleanstr);
return ($cleanstr);
}

function inputfield($srcfile) {
$field = cleanup(convert_uudecode(urldecode(rtrim(fgets($srcfile)))));
// $field = cleanup(rtrim(fgets($srcfile)));
return ($field);
}

function load_bkgdetails($transfile,&$bkgDetails) {
$debug = 0;

if (file_exists($transfile)) {
$srcfile = fopen($transfile, “r”) or die(“Unable to open file!”);

// Test that the data is correctly encoded by checking the first record
$transid = fgets($srcfile);
$transid = urldecode(rtrim($transid));
$transid = @convert_uudecode($transid);
if ($transid) {
$bkgDetails[‘transid’] = $transid;
$bkgDetails[‘bkgname’] = inputfield($srcfile);
$bkgDetails[‘bkgemail’] = inputfield($srcfile);
$bkgDetails[‘bkgmobile’] = inputfield($srcfile);
$bkgDetails[‘nonmembers’] = inputfield($srcfile);
$bkgDetails[‘plcmembers’] = inputfield($srcfile);
$bkgDetails[‘event1’] = inputfield($srcfile);
$bkgDetails[‘event2’] = inputfield($srcfile);
$bkgDetails[‘event3’] = inputfield($srcfile);
$bkgDetails[‘event4’] = inputfield($srcfile);
$bkgDetails[‘eventhdg1’] = inputfield($srcfile);
$bkgDetails[‘eventhdg2’] = inputfield($srcfile);
$bkgDetails[‘eventhdg3’] = inputfield($srcfile);
$bkgDetails[‘eventhdg4’] = inputfield($srcfile);
$bkgDetails[‘bkgprice’] = inputfield($srcfile);
$bkgDetails[‘bkgpriceval’] = inputfield($srcfile);
$bkgDetails[‘bkgattendees’] = inputfield($srcfile);
$bkgDetails[‘xtras1’] = inputfield($srcfile);
$bkgDetails[‘xtras2’] = inputfield($srcfile);
$bkgDetails[‘xtras3’] = inputfield($srcfile);
$bkgDetails[‘xtras4’] = inputfield($srcfile);
$bkgDetails[‘amountpaid’] = inputfield($srcfile);
$bkgDetails[‘paymentmethod’] = inputfield($srcfile);
$bkgDetails[‘paymenttoken’] = inputfield($srcfile);
$bkgDetails[‘remarks’] = inputfield($srcfile);

fclose($srcfile);
} else {
echo “Malformed data
“;
}
} else {
echo “No such transaction file
“;
}
if ($debug) {
echo ‘transid=[‘ . $bkgDetails[‘transid’] . ‘]
‘;
echo ‘bkgname=[‘ . $bkgDetails[‘bkgname’] . ‘]
‘;
echo ‘bkgemail=[‘ . $bkgDetails[‘bkgemail’] . ‘]
‘;
echo ‘bkgmobile=[‘ . $bkgDetails[‘bkgmobile’] . ‘]
‘;
echo ‘nonmembers=[‘ . $bkgDetails[‘nonmembers’] . ‘]
‘;
echo ‘plcmembers=[‘ . $bkgDetails[‘plcmembers’] . ‘]
‘;
echo ‘event1=[‘ . $bkgDetails[‘event1’] . ‘]
‘;
echo ‘event2=[‘ . $bkgDetails[‘event2’] . ‘]
‘;
echo ‘event3=[‘ . $bkgDetails[‘event3’] . ‘]
‘;
echo ‘event4=[‘ . $bkgDetails[‘event4’] . ‘]
‘;
echo ‘eventhdg1=[‘ . $bkgDetails[‘eventhdg1’] . ‘]
‘;
echo ‘eventhdg2=[‘ . $bkgDetails[‘eventhdg2’] . ‘]
‘;
echo ‘eventhdg3=[‘ . $bkgDetails[‘eventhdg3’] . ‘]
‘;
echo ‘eventhdg4=[‘ . $bkgDetails[‘eventhdg4’] . ‘]
‘;
echo ‘bkgprice=[‘ . $bkgDetails[‘bkgprice’] . ‘]
‘;
echo ‘bkgpriceval=[‘ . $bkgDetails[‘bkgpriceval’] . ‘]
‘;
echo ‘bkgattendees=[‘ . $bkgDetails[‘bkgattendees’] . ‘]
‘;
echo ‘xtras1=[‘ . $bkgDetails[‘xtras1’] . ‘]
‘;
echo ‘xtras2=[‘ . $bkgDetails[‘xtras2’] . ‘]
‘;
echo ‘xtras3=[‘ . $bkgDetails[‘xtras3’] . ‘]
‘;
echo ‘xtras4=[‘ . $bkgDetails[‘xtras4’] . ‘]
‘;
echo ‘amountpaid=[‘ . $bkgDetails[‘amountpaid’] . ‘]
‘;
echo ‘paymentmethod=[‘ . $bkgDetails[‘paymentmethod’] . ‘]
‘;
echo ‘paymenttoken=[‘ . $bkgDetails[‘paymenttoken’] . ‘]
‘;
echo ‘remarks=[‘ . $bkgDetails[‘remarks’] . ‘]
‘;
}
return;
}

function show_bkgdetails($bkgDetails) {
$debug = 0;
echo ‘

Details of Booking with Transaction Id: ‘ . $bkgDetails[‘transid’] .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

‘ .

‘;
echo ‘

Name ‘ . $bkgDetails[‘bkgname’] . ‘
Email ‘ . $bkgDetails[‘bkgemail’] . ‘
Mobile ‘ . $bkgDetails[‘bkgmobile’] . ‘
Non Members ‘ . $bkgDetails[‘nonmembers’] . ‘
JCAA Members ‘ . $bkgDetails[‘plcmembers’] . ‘
Event #1 ‘ . $bkgDetails[‘event1’] . ‘
Event #2 ‘ . $bkgDetails[‘event2’] . ‘
Event #3 ‘ . $bkgDetails[‘event3’] . ‘
Event #4 ‘ . $bkgDetails[‘event4’] . ‘
Price ‘ . $bkgDetails[‘bkgprice’] . ‘
Amount Paid ‘ . $bkgDetails[‘amountpaid’] . ‘
Payment Method ‘ . $bkgDetails[‘paymentmethod’] . ‘
Payment Token ‘ . $bkgDetails[‘paymenttoken’] . ‘
Remarks ‘ . $bkgDetails[‘remarks’] . ‘

‘;
return;
}

$debug = 0; // set to 1 to turn on debug or 0 to turn it off

if ($debug) {
echo “Debug is ON
“;
echo “Present Working Directory is [” . getcwd() . “]
“;
}

// $didParm = $_GET[“did”];
$didParm = “harp-concert-2018”;
$tidParm = $_GET[“tid”];

if ($debug) {
echo “did=[” . $didParm . “]
“;
echo “tid=[” . $tidParm . “]
“;
}

if ($didParm != “”) {
echo ‘

‘;
} else {
echo ‘Missing URL Parameter: did=directoryname
‘;
}

[/insert_php]

Harp Concert Fundraiser Payment

Did you book a ticket for the Harp Concert but didn’t pay yet? To secure your booking please pay now as follows:

Method 1:

Click on the “Pay Now” button at the bottom of this page. This will take you to our secure payment page. You can pay by PayPal or Credit Card. Tips on how to use the PayPal payment page

Method 2:

Bank Transfer. Our Bank Account details are as follows:
BSB: 633 000 Account No.: 154894554
Use your name as the reference e.g. JOHN SMITH
Following your payment please email us at treasurer@purelandcentre.org to let us know you’ve paid by bank transfer.

Thank you.

Your Booking Details

Sorry. No booking found matching your Transaction Id (tid)

Name: ${bkgname}    Email: ${bkgemail}    Phone: ${mobile}

Number of Tickets: ${nonmembers}    Price: $${bkgprice}

[insert_php]
$mytransactionid = $_GET[“tid”];
$mytransactionid = str_replace(“‘”, ” “, $mytransactionid);
$mytransactionid = str_replace(‘”‘, ‘ ‘, $mytransactionid);
$mytransactionid = str_replace(‘<', '<', $mytransactionid); $mytransactionid = str_replace('>‘, ‘>’, $mytransactionid);
$transactionparm = 0;
if ($mytransactionid != “”) $transactionparm = 1;
if ($transactionparm) {
echo ““;
}
$paypalUrl = “https://www.paypal.com/cgi-bin/webscr”;
//$paypalUrl = “https://www.sandbox.paypal.com/cgi-bin/webscr”;
$payCmd=”_xclick”;
$payBusiness=”treasurer@purelandcentre.org”;
$payLc=”AU”;
$payItemName=”Harp Concert Ticket(s) 14 Jul 2018″;
$payCurrencyCode=”AUD”;
$payButtonSub=”services”;
$payNoNote=”1″;
$payNoShipping=”2″;
$payBn=”PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted”;
$payAmount=”1.00″;
$amtParm = $_GET[“tam”];
$amtParm = str_replace(“‘”, ” “, $amtParm);
$amtParm = str_replace(‘”‘, ‘ ‘, $amtParm);
$amtParm = str_replace(‘<', '<', $amtParm); $amtParm = str_replace('>‘, ‘>’, $amtParm);
if ($amtParm != “”) $payAmount=$amtParm;
if ($payAmount > 1) {
echo ‘

Balance payable: \$’ . $payAmount . ‘

‘;
}
else {
echo ‘

Something is wrong. No amount to be paid.

‘;
}
[/insert_php]