PHP Classes
elePHPant
Icontem

Spay: Process SimplePay payments with CodeIgniter

Recommend this page to a friend!
  Info   View files Documentation   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-10-07 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 70 All time: 8,558 This week: 978Up
Version License PHP version Categories
spay 1.0.1MIT/X Consortium ...5PHP 5, E-Commerce, Web services
Description Author

This package can Process SimplePay payments with CodeIgniter.

The main class can generate HTML for payment buttons of many types that can send the users to pay in the real SimplePay site or the sandbox site.

A sample CodeIgniter controller class is provided to demonstrate how to integrate the payment buttons with applications that use this framework, as well to verify if the transactions succeeded.

Example view scripts are provided for when the transaction processing fails or succeeds.


library to integrate Simplepay Payment Gateway API on codeigniter

Picture of jimie josh
  Performance   Level  
Name: jimie josh <contact>
Classes: 2 packages by
Country: Nigeria Nigeria

Details

Spay - Codeigniter - SimplePay Payment Library

library to integrate Simplepay Payment Gateway API on codeigniter

Class Features

  • Pay with Simplepay!
  • Add auto generated items
  • Light weight
  • Need no instal and has no database, just copy files to the right folder
  • Can be integrated to any Codeigniter application
  • Tested with codeigniter version 3.0 but backward compactible with version 2.0
  • Compatible with PHP 5.0 and later
  • Much more!

Why you might need it

To manually integrate simplepay into your website. When you're done, you will have added a SimplePay button and supporting code to your website so that customers can click to place orders through simplepay.

License

This software is distributed under the MIT license. Please read LICENSE.txt for information on the software availability and distribution.

Installation & loading

Drop the provided files into the CodeIgniter project
Configure your simplepay details inside the application/config/simplepay.php file. refer to http://simplepay.com/developer.php
Modify the controller example supplied (application/controller/simplepay.php) to fit your needs


A Simple Example

To use library Spay first edit your config file setting at application/config/simplepay.php, load the library in your controller

  $this->load->library('spay');

To use library populate the param array with your values or you can view http://simplepay.com/developer.php for more details on the fields (array elements)

 $param = array(
							"customid" => '1255634',
							"freeclient" => 'N',
							"demo" => 'Y', // if you are testing the application [ Y / N ]
							"price" => '1000',
							"quantity" => '3',
							"period" => '',
							"trial" => '',
							"escrow" => '',
							"action" => 'payment', // action product/donation/subscription/payment
							"pname" => 'Gucci Shoes',
							"desc" => 'Imported Classic Gucci Shoes',
							"setupfee" => '',
							"tax" => '',
							"shipping" => '',
							"comments" => '',
							"button" => 'accepted'  // pay / subscribe / escrow / accepted / donation 
							);
							$form = $this->spay->spay_form( $param );
							echo $form;
it auto close the form variable

	View sample controller code below
class Simplepay extends CI_Controller {
	function __construct()
	{
		parent::__construct();
		$this->load->library('spay');  
		 
	}
	
	function index()
	{
			 $param = array(
							"customid" => '1255634',
							"freeclient" => 'N',
							"demo" => 'Y', // if you are testing the application [ Y / N ]
							"price" => '1000',
							"quantity" => '3',
							"period" => '',
							"trial" => '',
							"escrow" => '',
							"action" => 'payment', // action product/donation/subscription/payment
							"pname" => 'Gucci Shoes',
							"desc" => 'Imported Classic Gucci Shoes',
							"setupfee" => '',
							"tax" => '',
							"shipping" => '',
							"comments" => '',
							"button" => 'accepted'  // pay / subscribe / escrow / accepted / donation 
							);
							$form = $this->spay->spay_form( $param );
							echo $form;
	}
}	
	

You'll find it easy to implement.

That's it. You should now be ready to use Spay!

Localization

Spay defaults to English

  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagecontrollers (1 file)
Files folder imagelibraries (1 file)
Files folder imageviews (1 directory)
Accessible without login Plain text file LICENSE Lic. license
Accessible without login Plain text file README.md Doc. readme file

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file simplepay.php Conf. configuration file

  Files folder image Files  /  controllers  
File Role Description
  Plain text file simplepay.php Class main controller (sample)

  Files folder image Files  /  libraries  
File Role Description
  Plain text file spay.php Class Simple pay library

  Files folder image Files  /  views  
File Role Description
Files folder imagespay (2 files)

  Files folder image Files  /  views  /  spay  
File Role Description
  Accessible without login Plain text file failed.php Aux. failure view file
  Accessible without login Plain text file success.php Aux. success view file

 Version Control Unique User Downloads Download Rankings  
 100%
Total:70
This week:0
All time:8,558
This week:978Up