dominicwatts / sagepay-sdk-php
Sagepay wrapper and mordernization for SDK that supports server, form and direct payments
Installs: 1 456
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=5.6.4
- ext-dom: *
- phpseclib/mcrypt_compat: 1.0.8
Requires (Dev)
- php-coveralls/php-coveralls: ^2.2
- phpunit/phpunit: 9.3.7
- symfony/var-dumper: v4.4.11
This package is auto-updated.
Last update: 2024-12-16 06:28:30 UTC
README
Sage Pay PHP SDK for server, frame and direct integrations based on the official Sage Pay SDK. This is a composer compatible Sage Pay V3 PHP SDK. This is not an official Sage Pay package.
Install Instructions
composer require dominicwatts/sagepay-sdk-php
There is a composer archive at:
https://packagist.org/packages/dominicwatts/sagepay-sdk-php
Usage
require 'vendor/autoload.php';
use Xigen\Library\Sagepay\Payment;
use Xigen\Library\Sagepay\Classes\SagepayCustomer;
use Xigen\Library\Sagepay\Classes\SagepayCustomerDetails;
$config = [
'vendorName' => 'testing'
];
$payment = new Payment(
Payment::FORM,
$config
);
$customer = new SagepayCustomer();
$customerDetails = new SagepayCustomerDetails();
$customerDetails->__set('firstname', 'Dave');
$customerDetails->setLastname('Smith');
$api = $payment->getApi();
$api->setCustomer($customer);
$api->setCustomerDetails($customerDetails);
var_dump($api);
$api->createRequest();
Update
Check ./tests
for more comprehensive usage
Copyright
The original SDK belongs to SagePay and is their intellectual property. No license information is available but this is based on their publicly accessible source code.