antonis0490 / paysec
Paysec driver for the Omnipay payment processing library
Installs: 75
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/antonis0490/paysec
Requires
- omnipay/common: ~2.0
This package is not auto-updated.
Last update: 2025-10-04 01:14:35 UTC
README
Paysec driver for the Paysec PHP payment processing library
Installation
Paysec is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "Paysec/paysec": "dev-master" } }
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Basic Usage
To make a request:
use Omnipay\Omnipay;
use Omnipay\Paysec\Message\StatusCallback;
$gateway = Omnipay::create('Paysec');
$gateway->initialize(array(
'clientId' => "your client id",
'secret' => "your secret,
'testMode' => // Or false when you are ready for live transactions
));
$options = array
(
"header" => "3",
"clientId" => "",
"channelCode" => "BANK_TRANSFER",
"notifyURL" => "",
"returnURL" => "",
"amount" => "",
"orderTime" => (string)round(microtime(true) * 1000),
"cartId" => "",
"currency" => "",
"email" => "",
"name" => "",
"lname" => ""
);
$transaction = $gateway->purchase($options);
$response = $transaction->send();
$resData = $response->getData();
Notify function:
$status = new StatusCallback($_REQUEST);
$secret = "";
$wallet = "";
$validSignature = "";
if ($validSignature && $status->isSuccessful()) {
//sucess
} else if ($validSignature && $status->isPending()) {
//pending
} else if ($validSignature) {
//failed
} else {
//error
}
The following gateways are provided by this package:
- Paysec
For general usage instructions, please see the main Omnipay site.