Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added functional success/failure handling pages with stylesheet. Addi…

…ng install instruction notes to readme. Renamed controller for clarity
  • Loading branch information...
commit 9ae1ec5c4fe59d25dfaf77c6be149094d9c82f43 1 parent 213fde8
@ollierattue authored
View
17 README
@@ -4,11 +4,24 @@ SagePay Form library - Functional
This CodeIgniter library handles payments via SagePay's
Form e-commerce system.
+Setup instructions
+------------------
+
+$_GET variables need to be enabled because Sage Pay returns a url like
+payment_status/failure/?crypt=ByQZExM . To enable make these changes to
+applicaton/config/config.php
+
+$config['uri_protocol'] = "PATH_INFO";
+$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?'; // Added ?
+$config['enable_query_strings'] = TRUE;
+
Usage
-----
-An example controller is provided which displays all available values
-that can be passed to Sage Pay.
+All available values that can be passed to Sage Pay are listed in
+controllers/sagepay_form_example.php
+
+The controller and views provide a fully working example.
TODO
-----
View
80 controllers/sagepay_example.php → controllers/sagepay_form_example.php
@@ -1,12 +1,20 @@
<?php
-/*
-| -------------------------------------------------------------------------
-| Sagepay library example
-| -------------------------------------------------------------------------
-*/
+/**
+ * Sage Pay Form example controller
+ *
+ * Functional code to pass order to Sage Pay Go Form service
+ * http://www.sagepay.com/products_services/sage_pay_go/integration/form
+ * and handle the success/failure redirects
+ *
+ * @package sagepay_form
+ * @author Ollie Rattue, Too many tabs <orattue[at]toomanytabs.com>
+ * @copyright Copyright (c) 2010, Ollie Rattue
+ * @license http://www.opensource.org/licenses/mit-license.php
+ * @link https://github.com/ollierattue/codeigniter-sagepay-form
+ */
-class Sagepay_example extends Controller
+class Sagepay_form_example extends Controller
{
public function __construct()
{
@@ -19,12 +27,19 @@ public function __construct()
function payment()
{
+ $vendor_tx_code = $this->sagepay_form->create_vendor_tx_code();
+
+ /**************************************************************************************************
+ * You need to save $vendor_tx_code against your order so that you can
+ * match the success/failure response message from Sage Pay
+ **************************************************************************************************/
+
$this->sagepay_form->add_data('total', '15.00'); // with 2 decimal places where relevant
$this->sagepay_form->add_data('description', 'My instructional DVD'); // The description of goods purchased is displayed on the Sage Pay Max 100
// The domain name and protocol (http or https) is defined in sagepay_form_config. DO NOT INCLUDE HERE.
- $this->sagepay_form->add_data('success_url', 'sagepay_example/payment_status/success');
- $this->sagepay_form->add_data('failure_url', 'sagepay_example/payment_status/failure');
+ $this->sagepay_form->add_data('success_url', 'sagepay_example/payment_status/success/');
+ $this->sagepay_form->add_data('failure_url', 'sagepay_example/payment_status/failure/');
// Billing address
$this->sagepay_form->add_data('billing_first_names', "Jo"); // Max 20 characters
@@ -65,26 +80,61 @@ function payment()
}
// --------------------------------------------------------------------
-
+
// Redirected to from SagePay Form
- function payment_status($type = NULL, $crypt = NULL)
+ function payment_status($type = NULL)
{
+ $crypt = $_GET["crypt"];
+
+ $decoded_response = $this->sagepay_form->decode_crypt('ByQZExM4DncJfBQMMkw9HBA1DAYPJw5rNzkkHSBLLho4PAFHJz5HUC0oLgs2XGg7JjEWFAcoR1EtNGEuNlYsACYEACQJL1YFc2pqSWIVeVZ5YUxKVH4eCnZ3cktmDX5fZmJJQTAbYGw6EyNFKABwXxUUTFVfZnUOe2hqTGp7eUIVFjokS38EDXNudD5hDgsqES1eMx4KRkwqFChFZAt8VnIRFQgTJUcFc29hOQVrCzlmbTkrKmt+eRYZD14SXCwdMSMLNQM4RlQ2Zwo5B3sAKhB2KAgVP3BXJj8VHSBNJBtpHTkzJQN2fGQZEUoBXTsaOCRFKicfcHAHHmE/Ol48Lj00RVdAeHdrJzkyCjZrPA4gJQtaKQAVewMMEUUedh0nZAE3KTUecGJ7EHcvHwB/PxYHXiQHOVdsOyoiRQVxGy5yHBkUEn93USUzMwtuAXpabQ==');
+
+ $response_array = $this->sagepay_form->getToken($decoded_response);
+ $this->data['response_array'] = $response_array;
+
switch ($type)
{
case 'success':
- echo 'Payment successfully made';
+ $this->load->view('sagepay_form_example/payment_status/success', $this->data);
break;
-
+
case('failure'):
- echo 'Payment failed';
+ // Determine the reason this transaction was unsuccessful
+ if ($response_array['Status'] == "NOTAUTHED")
+ {
+ $failure_reason = "You payment was declined by the bank. This could be due to insufficient funds, or incorrect card details.";
+ }
+ else if ($response_array['Status'] == "ABORT")
+ {
+ $failure_reason = "You chose to Cancel your order on the payment pages. If you wish to change your order and resubmit it you can do so here. If you have questions or concerns about ordering online, please contact us at [your number].";
+ }
+ else if ($response_array['Status'] == "REJECTED")
+ {
+ $failure_reason = "Your order did not meet our minimum fraud screening requirements. If you have questions about our fraud screening rules, or wish to contact us to discuss this, please call [your number].";
+ }
+ else if ($response_array['Status'] == "INVALID" or $response_array['Status'] == "MALFORMED")
+ {
+ $failure_reason = "We could not process your order because we have been unable to register your transaction with our Payment Gateway. You can place the order over the telephone instead by calling [your number].";
+ }
+ else if ($response_array['Status'] == "ERROR")
+ {
+ $failure_reason = "We could not process your order because our Payment Gateway service was experiencing difficulties. You can place the order over the telephone instead by calling [your number].";
+ }
+ else
+ {
+ $failure_reason = "The transaction process failed. Please contact us with the date and time of your order and we will investigate.";
+ }
+
+ $this->data['failure_reason'] = $failure_reason;
+
+ $this->load->view('sagepay_form_example/payment_status/failure', $this->data);
break;
-
+
default:
redirect();
break;
}
}
-
+
// --------------------------------------------------------------------
}
?>
View
243 css/formKitStyle.css
@@ -0,0 +1,243 @@
+/* CSS Document */
+
+body
+{
+ margin: 12px;
+ padding: 0px;
+ text-align: center;
+}
+
+form
+{
+ padding: 0px;
+ margin: 0px;
+}
+
+p
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #666666;
+ margin-left: 10px;
+}
+
+ul
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ color: #666666;
+}
+
+td
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #666666;
+}
+
+a
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #006699;
+}
+
+a:link
+{
+ text-decoration: none;
+}
+a:visted
+{
+ text-decoration: none;
+}
+a:hover
+{
+ text-decoration: underline;
+}
+
+#pageContainer
+{
+ margin-left: auto;
+ margin-right: auto;
+ text-align: center;
+ width: 860px;
+}
+
+#pageHeader
+{
+ padding: 20px 20px 20px 20px;
+ height: 40px;
+ width: 800px;
+}
+
+#content
+{
+ color: #666666;
+ width: 620px;
+ float: left;
+ padding: 12px;
+ text-align: left;
+ background-repeat: repeat-y;
+ background-position: top left;
+}
+
+#contentHeader
+{
+ color:#007F64;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size:22px;
+ padding-bottom: 14px;
+}
+#logo {
+ float:left;
+}
+
+#siteTitle
+{
+ float: right;
+}
+
+.subheader
+{
+ background-image: url(yellowBlob.png);
+ background-repeat: no-repeat;
+ background-position: 0px 22px;
+ padding: 20px 0px 8px 30px;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ color: #E98300;
+}
+
+.errorheader
+{
+ background-image: url(redGrad.jpg);
+ background-repeat: repeat-x;
+ background-position: top left;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ text-align: center;
+ margin-top: 20px;
+ padding: 12px;
+ border: #daa7a6 1px solid;
+}
+
+.smalltext
+{
+ font-family: Arial, Helvetica;
+ font-size: 10px;
+ color: #666666;
+}
+.code
+{
+ font-family: courier, Arial, Helvetica;
+ font-size: 11px;
+ color: #666666;
+}
+
+.greybar
+{
+ background-color:#cbcbcb;
+ background-position:center;
+ background-image: url(greyglass.gif);
+ width: 865px;
+}
+
+.greyBoxTop
+{
+ background: transparent url(greyBorderTop.gif);
+ background-repeat: no-repeat;
+ background-position: top left;
+ padding-top: 5px;
+ padding-bottom: 6px;
+}
+.greyBoxBottom
+{
+ background: transparent url(greyBorderBottom.gif);
+ background-repeat: no-repeat;
+ background-position: bottom left;
+}
+.greyBoxSides
+{
+ background: transparent url(greyBorderSides.gif);
+ background-repeat: repeat-y;
+ background-position: top left;
+ width: 210px;
+}
+
+.resourcecontent
+{
+ width: 200px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #675C53;
+ text-align: center;
+}
+.resourcecontent td
+{
+ padding: 15px;
+ font-size: 11px;
+}
+
+.warning
+{
+ list-style-image:url(form_bullet.gif);
+ font-size: 12px;
+ color: #CC0000;
+}
+
+.formTable
+{
+ width: 100%;
+ border: 0px none;
+ border-collapse: collapse;
+}
+
+.formTable td
+{
+ border-top: 0px none;
+ border-right: 0px none;
+ border-left: 0px none;
+ border-bottom: 1px solid #d3d3d3;
+ padding: 3px 10px 6px 3px;
+ vertical-align: top;
+}
+
+.formFooter
+{
+ margin: 12px 0px 0px 0px;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 14px;
+}
+.fieldLabel
+{
+ font-family: Arial, Helvetica, sans-serif;
+ color:#575C53;
+ font-size:14px;
+ font-weight:normal;
+ text-align: right;
+ width: 33%;
+}
+
+.fieldData
+{
+ width: 70%;
+}
+
+.inputBoxDisable
+{
+ background-color: #DDDDDD;
+ border: 1px solid #999999;
+}
+.inputBoxEnable
+{
+ background-color: #FFFFFF;
+ border: 1px solid #999999;
+}
+
+.greyHzShadeBar
+{
+ height: 20px;
+ background-image: url(greyGrad.png);
+ background-repeat: repeat-x;
+ background-position: bottom left;
+}
View
115 libraries/sagepay_form.php
@@ -24,7 +24,7 @@ class sagepay_form
var $purchase_url;
var $partner_id;
var $currency;
- var $VendorTxCode;
+ var $vendor_tx_code;
var $total;
var $description;
var $billing_first_names;
@@ -97,6 +97,19 @@ function add_data($field = NULL, $value = NULL)
// --------------------------------------------------------------------
+ // Creates a unique string
+ // Called by controller and the value would be stored in db against the purchase
+ function create_vendor_tx_code()
+ {
+ $timestamp = date("y-m-d-H-i-s", time());
+ $random_number = rand(0,32000)*rand(0,32000);
+ $this->vendor_tx_code = "{$timestamp}-{$random_number}";
+
+ return $this->vendor_tx_code;
+ }
+
+ // --------------------------------------------------------------------
+
function form($form_name = 'SagePayForm')
{
$strCrypt = $this->_build_form_crypt();
@@ -150,12 +163,18 @@ function button($value = NULL)
function _build_form_crypt()
{
- $strVendorTxCode = $this->_create_VendorTxCode();
-
// ** TODO ADD in basket basket support **
// Now to build the Form crypt field.
- $strPost = "VendorTxCode={$strVendorTxCode}";
+ if (strlen($this->vendor_tx_code) > 0)
+ {
+ // This is a fallback in the instance that the controller
+ // did not call this function which it should to store the
+ // value in the db for records.
+ $this->create_vendor_tx_code();
+ }
+
+ $strPost = "VendorTxCode={$this->vendor_tx_code}";
// Optional: If you are a Sage Pay Partner and wish to flag the transactions with your unique partner id, it should be passed here
if (strlen($this->partner_id) > 0)
@@ -330,21 +349,73 @@ function _build_form_crypt()
}
// Encrypt the plaintext string for inclusion in the hidden field
- $strCrypt = $this->_base64Encode($this->_SimpleXor($strPost, $this->encryption_password));
+ $strCrypt = $this->_encode_crypt($strPost);
return $strCrypt;
}
// --------------------------------------------------------------------
- // Creates a unique string
- function _create_VendorTxCode()
- {
- $timestamp = date("y-m-d-H-i-s", time());
- $random_number = rand(0,32000)*rand(0,32000);
- $VendorTxCode = "{$timestamp}-{$random_number}";
+ /* The getToken function. **
+ ** NOTE: A function of convenience that extracts the value from the "name=value&name2=value2..." reply string **
+ ** Works even if one of the values is a URL containing the & or = signs. */
+
+ function getToken($thisString) {
+
+ // List the possible tokens
+ $Tokens = array(
+ "Status",
+ "StatusDetail",
+ "VendorTxCode",
+ "VPSTxId",
+ "TxAuthNo",
+ "Amount",
+ "AVSCV2",
+ "AddressResult",
+ "PostCodeResult",
+ "CV2Result",
+ "GiftAid",
+ "3DSecureStatus",
+ "CAVV",
+ "AddressStatus",
+ "CardType",
+ "Last4Digits",
+ "PayerStatus","CardType");
+
+ // Initialise arrays
+ $output = array();
+ $resultArray = array();
+
+ // Get the next token in the sequence
+ for ($i = count($Tokens)-1; $i >= 0 ; $i--){
+ // Find the position in the string
+ $start = strpos($thisString, $Tokens[$i]);
+ // If it's present
+ if ($start !== false){
+ // Record position and token name
+ $resultArray[$i]->start = $start;
+ $resultArray[$i]->token = $Tokens[$i];
+ }
+ }
+
+ // Sort in order of position
+ sort($resultArray);
+ // Go through the result array, getting the token values
+ for ($i = 0; $i<count($resultArray); $i++){
+ // Get the start point of the value
+ $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1;
+ // Get the length of the value
+ if ($i==(count($resultArray)-1)) {
+ $output[$resultArray[$i]->token] = substr($thisString, $valueStart);
+ } else {
+ $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2;
+ $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength);
+ }
- return $VendorTxCode;
+ }
+
+ // Return the ouput array
+ return $output;
}
// --------------------------------------------------------------------
@@ -392,7 +463,23 @@ function _cleanInput($strRawText,$strType)
return $cleanInput;
}
-
+
+ // --------------------------------------------------------------------
+
+ // Wrapper function to encrypt data to store in hidden field which is sent to Sage Pay
+ function _encode_crypt($post = NULL)
+ {
+ return $this->_base64Encode($this->_SimpleXor($post, $this->encryption_password));
+ }
+
+ // --------------------------------------------------------------------
+
+ // Wrapper function to decrypt the response data sent back from Sage Pay to success/failure url via url string
+ function decode_crypt($crypt = NULL)
+ {
+ return $this->_simpleXor($this->_base64Decode($crypt), $this->encryption_password);
+ }
+
// --------------------------------------------------------------------
/* Base 64 Encoding function **
@@ -414,7 +501,7 @@ function _base64Encode($plain) {
/* Base 64 decoding function **
** PHP does it natively but just for consistency and ease of maintenance, let's declare our own function **/
- function base64Decode($scrambled) {
+ function _base64Decode($scrambled) {
// Initialise output variable
$output = "";
View
89 views/payment_status/failure.php
@@ -0,0 +1,89 @@
+<html>
+<head>
+ <title>Sagepay Form example - Payment failure</title>
+ <link rel="STYLESHEET" type="text/css" href="<?php echo base_url();?>css/formKitStyle.css">
+</head>
+
+<body>
+ <div id="pageContainer">
+ <div id="content">
+ <div id="contentHeader">Your order has NOT been successful</div>
+ <p>
+ The Form transaction did not completed successfully and the customer has been returned to this completion page for the following reason: <br>
+ <span class="warning"><strong><?php echo $failure_reason ?></strong></span><br>
+ <br>
+ The order number, for your customer's reference is: <strong><?php echo $response_array['VendorTxCode'] ?></strong><br>
+ <br>
+ They should quote this in all correspondence with you, and likewise you should use this reference when sending queries to Sage Pay about this transaction (along with your Vendor Name).<br>
+ <br>
+ The table below shows everything sent back from Form about this order. You would not normally show this level of detail to your customers, but it is useful during development. You may wish to store this information in a local database if you have one.<br>
+ <br>
+ You can customise this page to suggest alternative payment options, direct the customer to call you, or simply present a failure notice, whatever is appropriate for your application.
+ </p>
+ <div class="greyHzShadeBar">&nbsp;</div>
+ <table class="formTable">
+ <tr>
+ <td colspan="2"><div class="subheader">Details sent back by Form</div></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VendorTxCode:</td>
+ <td class="fieldData"><?php echo $response_array['VendorTxCode']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Status:</td>
+ <td class="fieldData"><?php echo $response_array['Status']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">StatusDetail:</td>
+ <td class="fieldData"><?php echo $response_array['StatusDetail']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Amount:</td>
+ <td class="fieldData"><?php echo $response_array['Amount']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VPSTxId:</td>
+ <td class="fieldData"><?php echo $response_array['VPSTxId']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VPSAuthCode (TxAuthNo):</td>
+ <td class="fieldData"><?php echo $response_array['TxAuthNo']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">AVSCV2 Results:</td>
+ <td class="fieldData"><?php echo $response_array['AVSCV2']; ?><span class="smalltext"> - Address:<?php echo $response_array['AddressResult']; ?>, Post Code:<?php echo $response_array['PostCodeResult']; ?>, CV2:<?php echo $response_array['CV2Result']; ?></span></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Gift Aid Transaction?:</td>
+ <td class="fieldData"><?php if ($response_array['GiftAid'] == 1) echo "Yes"; else echo "No"; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">3D-Secure Status:</td>
+ <td class="fieldData"><?php echo $response_array['3DSecureStatus']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">CAVV:</td>
+ <td class="fieldData"><?php echo $response_array['CAVV']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">CardType:</td>
+ <td class="fieldData"><?php echo $response_array['CardType']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Last4Digits:</td>
+ <td class="fieldData"><?php echo $response_array['Last4Digits']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">AddressStatus:</td>
+ <td class="fieldData"><span style="float:right; font-size: smaller;">&nbsp;*PayPal transactions only</span><?php if (isset($response_array['AddressStatus'])) echo $response_array['AddressStatus']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">PayerStatus:</td>
+ <td class="fieldData"><span style="float:right; font-size: smaller;">&nbsp;*PayPal transactions only</span><?php if (isset($response_array['PayerStatus'])) echo $response_array['PayerStatus']; ?></td>
+ </tr>
+ </table>
+ <div class="greyHzShadeBar">&nbsp;</div>
+</div>
+</div>
+</body>
+</html>
View
88 views/payment_status/success.php
@@ -0,0 +1,88 @@
+<html>
+<head>
+ <title>Sagepay Form example - Payment Success</title>
+ <link rel="STYLESHEET" type="text/css" href="<?php echo base_url();?>css/formKitStyle.css">
+</head>
+
+<body>
+ <div id="pageContainer">
+ <div id="content">
+ <div id="contentHeader">Your order has been Successful</div>
+ <p>
+ The Form transaction has completed successfully and the customer has been returned to this order completion page<br>
+ <br>
+ The order number, for your customer's reference is: <strong><?php echo $response_array['VendorTxCode']; ?></strong><br>
+ <br>
+ They should quote this in all correspondence with you, and likewise you should use this reference when sending queries to Sage Pay about this transaction (along with your Vendor Name).<br>
+ <br>
+ The table below shows everything sent back from Form about this order. You would not normally show this level of detail to your customers, but it is useful during development. You may wish to store this information in a local database if you have one.<br>
+ <br>
+ You can customise this page to send confirmation e-mails, display delivery times, present download pages, whatever is appropriate for your application.
+ </p>
+ <div class="greyHzShadeBar">&nbsp;</div>
+ <table class="formTable">
+ <tr>
+ <td colspan="2"><div class="subheader">Details sent back by Form</div></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VendorTxCode:</td>
+ <td class="fieldData"><?php echo $response_array['VendorTxCode']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Status:</td>
+ <td class="fieldData"><?php echo $response_array['Status']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">StatusDetail:</td>
+ <td class="fieldData"><?php echo $response_array['StatusDetail']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Amount:</td>
+ <td class="fieldData"><?php echo $response_array['Amount']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VPSTxId:</td>
+ <td class="fieldData"><?php echo $response_array['VPSTxId']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">VPSAuthCode</td>
+ <td class="fieldData"><?php echo $response_array['TxAuthNo']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">AVSCV2 Results:</td>
+ <td class="fieldData"><?php echo $response_array['AVSCV2']; ?><span class="smalltext"> - Address:<?php echo $response_array['AddressResult']; ?>, Post Code:<?php echo $response_array['PostCodeResult']; ?>, CV2:<?php echo $response_array['CV2Result']; ?></span></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Gift Aid Transaction?:</td>
+ <td class="fieldData"><?php if ($response_array['GiftAid'] == "1") echo "Yes"; else echo "No"; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">3D-Secure Status:</td>
+ <td class="fieldData"><?php echo $response_array['3DSecureStatus']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">CAVV:</td>
+ <td class="fieldData"><?php echo $response_array['CAVV']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">CardType:</td>
+ <td class="fieldData"><?php echo $response_array['CardType']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">Last4Digits:</td>
+ <td class="fieldData"><?php echo $response_array['Last4Digits']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">AddressStatus:</td>
+ <td class="fieldData"><span style="float:right; font-size: smaller;">&nbsp;*PayPal transactions only</span><?php if (isset($response_array['AddressStatus'])) echo $response_array['AddressStatus']; ?></td>
+ </tr>
+ <tr>
+ <td class="fieldLabel">PayerStatus:</td>
+ <td class="fieldData"><span style="float:right; font-size: smaller;">&nbsp;*PayPal transactions only</span><?php if (isset($response_array['PayerStatus'])) echo $response_array['PayerStatus']; ?></td>
+ </tr>
+ </table>
+ <div class="greyHzShadeBar">&nbsp;</div>
+</div>
+</div>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.