rebootonline / barclaycard
php class to integrate and handle barclaycard direct link
Installs: 195
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.4
Requires (Dev)
- guzzle/guzzle: ^3.9
- guzzlehttp/guzzle: ^6.3
- phpunit/phpunit: 5.2.*
This package is not auto-updated.
Last update: 2024-04-14 02:13:28 UTC
README
A full-featured Barclaycard Direct link payment API class for PHP
Class Features
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
- Easy to use to any framework or even a plain php file
- Open Source
- Allows processing of optional Fields
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- Compatible with PHP 5.5 and later
- Namespaced to prevent name clashes
- Simple and minimal
Installation & loading
You can clone the package directly in to your application and run bash composer dump-autoload
git clone https://github.com/rebootonline/Reboot-barclaycard.git composer dump-autoload
Use composer to install package in to your application
composer require rebootonline/barclaycard
A Simple Example
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();
License
This class open-sourced software licensed under the MIT license.