jamesnuttall / omnipay-barclays-dl
Barclays ePDQ Direct Link driver for the Omnipay payment processing library.
Installs: 2 884
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- omnipay/common: ~2.5
Requires (Dev)
- omnipay/tests: ~2.0
- squizlabs/php_codesniffer: ~1.5
This package is auto-updated.
Last update: 2024-04-17 00:29:45 UTC
README
Omnipay: Barclays ePDQ DirectLink
Barclays ePDQ DirectLink driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.
This package implements Barclays ePDQ Direct Link support, and supports PHP 5.5+ on Omnipay 2.x. For use of Omnipay 3.x please see the master branch.
NOTICE
This gateway currently only supports the following:
- Purchase Request
- Purchase Response
ROADMAP
Below are features/changes I have planned to work on in the future:
- Cleanup Branches
- Refund Requests
- Maintenance Requests
- Pre-Authorization Requests (Pretty sure they aren't possible in the current state of package??)
- Potentially Improving response parsing/reporting
- Order Query Requests
Installation
Using composer, the master branch can be installed like this:
composer require league/omnipay jamesnuttall/omnipay-barclays-dl:~2.0
Basic Usage
The following gateways are provided by this package:
- Barclays ePDQ DirectLink
For general usage instructions, please see the main Omnipay repository.
Basic purchase example
// Gateway initialization $gateway = \Omnipay\Omnipay::create('BarclaysEpdqDl'); $gateway->setClientId('xxxxxx'); $gateway->setUserId('xxxx'); $gateway->setPassword('xxxxxxx'); $gateway->setShaIn('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'); $gateway->setTestMode(true); // Card data $card = [ 'number' => 'xxxxxxxxxxxxxxxx', 'expiryMonth' => 'xx', 'expiryYear' => 'xxxx', 'cvv' => 'xxx' ]; // Try to send purchase request try { $response = $gateway->purchase( [ 'transactionId' => 'xxxxxxxxxx', 'amount' => '25.00', 'currency' => 'GBP', 'card' => $card ] )->send(); if ($response->isSuccessful()) { // Payment successful print($response->getTransactionReference()); } else { // Payment failed print($response->getMessage()); } } catch (\Exception $e) { // Internal error, log exception and display a generic message to the customer exit("Error processing your payment. Please try again later."); }