PHP Classes

File: return.php

Recommend this page to a friend!
  Classes of Murtaza Baig   Simple Paypal Payflow   return.php   Download  
File: return.php
Role: Auxiliary script
Content type: text/plain
Description: return
Class: Simple Paypal Payflow
Process payments using Paypal Payflow
Author: By
Last change:
Date: 11 years ago
Size: 1,008 bytes
 

Contents

Class file image Download
<?php
//set GET values, to local variables.
$transid = $_GET['PNREF'];
$result = $_GET['RESULT'];
$last4 = $_GET['ACCT'];
$amount = $_GET['AMT'];
$cardType = $_GET['CARDTYPE'];
$respMsg = $_GET['RESPMSG'];
$invnum = $_GET['INVNUM'];
//check the card type
if ($cardType == "0") {$cardType = "Visa";
} else if (
$cardType == "1") { $cardType = "Master Card";
} else if (
$cardType == "2") {$cardType = "Discover";
} else if (
$cardType == "3") {$cardType = "AMEX";
} else {
$cardType = "Credit Card";
}
//display something based on the RESULT of the Transaction
if ($result == "0") {
   
$html = "<br />Thank you for your payment!<br /><br />Details:<br />Order ID: " .
   
$transid . "<br />Invoice ID: " . $invnum . "<br />Amount: $" . $amount .
   
"<br />Card Type: " . $cardType . "<br />Card Used: ************" . $last4 . "<br />";
} else {
   
$html = "<br />There seems to have been a problem with your transaction.<br />Transaction Details: " .
   
$respMsg;
}
echo
$html;
?>