Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 51 | All time: 10,692 This week: 524![]() |
Version | License | PHP version | Categories | |||
paypal_payment_proce 1.0.0 | BSD License | 5 | PHP 5, E-Commerce, Web services |
Description | Author | |
This package process payment with Paypal adaptive payments. |
|
Process payment with paypal Adaptive Payments API GPP SITE
instantiate
$pay = payment(PAYMETN_TYPE, 'paypal business or personal email address', 'homeless kids funding', PP_SUCCESS, PP_CANCELED, 'string');
user defined datas
$pay->info('currency type', 'ammount', 'first name', 'last name', 'email address', 'address 1', 'address 2 (optional: null)', 'city name', 'state name (2 letters abbreviation)',
'zip code', 'country name (2 letters abbreviation)', 'phone 1 Area code', 'phone 1 number ', 'phone 2 Area code', 'phone 2 number');
data handler
$pay->save(SAVE_USER_DATA, SAVE_PROD_DATA, array('id' => 'lid', 'class' => 'lclas', 'data_id' => 'ldi', 'link' => 'donate to me :(', 'target' => '_black'));
process stats
if(!$pay->error)
echo($pay->success);
else
echo($pay->error)
index prototype
require_once('funcs.php');
$pay = payment(PAYMETN_TYPE, 'paypal business or personal email address', 'homeless kids funding', PP_SUCCESS, PP_CANCELED, 'string');
$pay->info('currency type', 'ammount', 'first name', 'last name', 'email address', 'address 1', 'address 2 (optional: null)', 'city name', 'state name (2 letters abbreviation)',
'zip code', 'country name (2 letters abbreviation)', 'phone 1 Area code', 'phone 1 number ', 'phone 2 Area code', 'phone 2 number');
$pay->save(SAVE_USER_DATA, SAVE_PROD_DATA, array('id' => 'lid', 'class' => 'lclas', 'data_id' => 'ldi', 'link' => 'donate to me :(', 'target' => '_black'));
if(!$pay->error)
echo($pay->success);
else
echo($pay->error);
instantiate
#instance
//$new[] = _new('name', 'amount', 'id', 'quantity', 'tax', no shipping, 'shipping charge', 'discount amount', discount rate, Optional label);
$new[] = _new('green shirt', '39.99', '18495371', null, '0.5%', '1', '2.44', null, null, 'The padded insole for your comfortable wear');
/*
for more than one product
$new[] = _new('white shirt', '32.79', '14s755596', '4', '0.5', '1', '2.44', '2.00', null, null, 'classic-style pumps feature'); -2.00 discount and 0.5 tax
$new[] = _new('blue shirt', '82.79', '147D5596', '1', '0.5%', '1', '2.44', null, '50', null); 50% discount and 0.5% tax
$new[] = _new('myebook resale', '32.79', '14755596', null, null, null, null, null, 10%, null);
$new[] = _new('software product key', '32.79', '14755596');//no ship, tax, discount, label, and quantity is 1
*/
$pay = payment(PAYMETN_TYPE, 'paypal business or personal email address', $new, PP_SUCCESS, PP_CANCELED, 'string', 'sale');
user defined datas
#data as array
$pay->info('currency type', 'first name', 'last name', 'email address', 'address 1', 'address 2 (optional: null)', 'city name', 'state name (2 letters abbreviation)',
'zip code', 'country name (2 letters abbreviation)', 'phone 1 Area code', 'phone 1 number ', 'phone 2 Area code', 'phone 2 number');
data handler
$pay->save(SAVE_USER_DATA, SAVE_PROD_DATA, 'redirect');
process stats
if(!$pay->error)
echo($pay->success);
else
echo($pay->error);
index prototype
require_once('funcs.php');
$new[] = _new('green shirt', '39.99', '18495371', null, '0.5%', '1', '2.44', null, null, 'The padded insole for your comfortable wear');
$new[] = _new('myebook resale', '32.79', '14755596', null, null, null, null, null, 10%, null);
$pay = payment(PAYMETN_TYPE, 'paypal business or personal email address', $new, PP_SUCCESS, PP_CANCELED, 'string', 'sale');
$pay->info('currency type', 'first name', 'last name', 'email address', 'address 1', 'address 2 (optional: null)', 'city name', 'state name (2 letters abbreviation)',
'zip code', 'country name (2 letters abbreviation)', 'phone 1 Area code', 'phone 1 number ', 'phone 2 Area code', 'phone 2 number');
$pay->save(SAVE_USER_DATA, SAVE_PROD_DATA, 'redirect');
if(!$pay->error)
echo($pay->success);
else
echo($pay->error);
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | paypal_payment_proce-2023-01-31.zip 51KB |
![]() | paypal_payment_proce-2023-01-31.tar.gz 46KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.