dev-master
9999999-dev https://www.rebootonline.com/php class to integrate and handle barclaycard direct link
MIT
The Requires
- php >=5.4
The Development Requires
by Ali Tonbul
barclays barclaycard rebootonline
Wallogit.com
2017 © Pedro Peláez
php class to integrate and handle barclaycard direct link
A full-featured Barclaycard Direct link payment API class for PHP, (*1)
You can clone the package directly in to your application and run bash composer dump-autoload, (*2)
git clone https://github.com/rebootonline/Reboot-barclaycard.git composer dump-autoload
Use composer to install package in to your application, (*3)
composer require rebootonline/barclaycard
use Reboot\Barclaycard;
/*
Step 1 : Instantiate/create your object
*/
$payment = new Barclaycard($pspid,$user_name, $password, $pw, $payemntUrl);
/*
Step 2 : Call the amount, card and orderId methods chaining them together in order
Step 3 : Call the customer method for additional parameters
Step 4 : Call pay method and your done
*/
$process=$payment->amount($amount, $currency)
->card($expiry_date, $card_number, $card_name, $cvc)
->orderId('abc123')
->customer($email, $phone, $address_1, $town, $postcode)
->pay();
/*
To retrieve results call the response method
*/
echo $process->response();
/*
Method 2: you can just pass parameters to pay method after instantiate class
then call response method to retrieve results.
*/
$process=$payment->pay([
'amount'=>'123',
'currency'=>'gbp',
'expiry_date'=>'10:10',
'card_number'=>'698655445',
'card_name'=>'bob',
'cvc'=>'321',
'order_id'=>'abc123',
'email'=>'ali@rebootonoline.com',
'phone'=>'079856422',
'address'=>'123 st road',
'town'=>'london',
'postcode'=>'e23 6sd'
]);
echo $process->response();
This class open-sourced software licensed under the MIT license., (*4)
php class to integrate and handle barclaycard direct link
MIT
barclays barclaycard rebootonline