Login   Register  
PHP Classes
elePHPant
Icontem

File: example.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  >  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: 2012-10-12 06:26
Size: 639 bytes
 

Contents

Class file image Download
<?php 

require_once('payflow.php');

//create a payflow object

//total price is noly required.
$pf = new payflow(2.22,'User Name','user@email.com','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;

?>