PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Murtaza Baig  >  Simple Paypal Payflow  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Simple Paypal Payflow
Process payments using Paypal Payflow
Author: By
Last change:
Date: 4 years ago
Size: 639 bytes


Class file image Download


//create a payflow object

//total price is noly required.
$pf = new payflow(2.22,'User Name','','user telphone','user shipping address','user shipping_city','user shipping state','user shipping zip','shipping country');

//get the token
$tokenResponse = $pf->getSecureToken();

//strip the response and get the token value
$secureToken = $pf->getMySecureToken($tokenResponse);

//parse out the rest of the response
$response = $pf->parseResponse($tokenResponse);

//build the HTML
$html = $pf->getHTML($response, $secureToken);

//show the button
echo $html;