Login   Register  
PHP Classes
elePHPant
Icontem

File: return.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2012-10-12 06:29
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;
?>