PHP Classes

Simple PHP Paypal Button Generator: Create Paypal payment buttons

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 499 All time: 5,822 This week: 488Up
Version License PHP version Categories
simple-paypal-button 1.02GNU General Publi...5.4HTML, PHP 5, E-Commerce


This class can create Paypal payment buttons.

It can compose the definition of a shopping cart with all the details like the items, prices, currencies, site URL, return URL, etc..

The class generates HTML for a form with hidden inputs and a a payment button to lead the user to purchased the described items with his Paypal account.

The button image and other presentation details are configurable parameters.

Picture of Robert Ireland
Name: Robert Ireland <contact>
Classes: 1 package by
Country: United Kingdom
Age: 47
All time rank: 3267144 in United Kingdom
Week rank: 298 Up12 in United Kingdom Up


//change below to you paypal account name
// turn on error reporting
// turn on sandbox mode
// set return url
// set a custom button image
// Set the currency code and symbol
// create an item
PaypalSimpleClass::setItem(1, 'Test Item 1', '', 10.00, 1.00, '');
// create a product option
// assign options and price pairs
PaypalSimpleClass::opt1ArrayValue(array(array('Pink', 20.00),array('Red', 22.00)));
// create a product option
// assign options
// output form to screen
echo PaypalSimpleClass::getItem();

  Files folder image Files  
File Role Description
Plain text file PaypalSimpleClass.php Class Class File for simple paypal buttons
Plain text file sample.php Example Sample usage

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,822
This week:488Up