Download the PHP package sirumobile/siru-php-sdk without Composer
On this page you can find all versions of the php package sirumobile/siru-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sirumobile/siru-php-sdk
More information about sirumobile/siru-php-sdk
Files in sirumobile/siru-php-sdk
Package siru-php-sdk
Short Description PHP Software Development Kit for Siru Payment Gateway.
License MIT
Homepage https://github.com/Sirumachinery/siru-php-sdk
Informations about the package siru-php-sdk
Siru Payment Gateway PHP SDK
Siru Payment Gateway Software development kit for PHP 7.1+.
Requirements
- PHP 7.1+
- HTTP client supported by one of the transports or your own transport. Built-in transports support Guzzle, Symfony HTTP client and Wordpress HTTP API.
Installation
Easiest way to include the SDK is to use composer. Open a command console, enter your project directory and execute:
or by adding the following lines to your composer.json file:
Usage
To get started, you need your merchantId and merchant secret. If you don't have your credentials, contact Siru Mobile to discuss which payment methods are available to you and we will send you your sandbox credentials.
Then go through our API documentation to learn more about each API and message payloads.
Example
Here is a simple example on how to create new transaction and redirect user to Siru payment flow:
On your redirectAfter* URLs you will need to verify that user has actually arrived from Siru Mobile payment flow and all parameters are authentic:
It is recommended that you also setup a callback URL using notifyAfterSuccess, notifyAfterFailure and notifyAfterCancel fields where Siru will automatically send notification when payment status changes. This allows you to complete the transaction even if user fails to return to your checkout page for example due to a network failure.
You can also use \Siru\Signature
as standalone to create signature for your own code.
API documentation
API documentation is available here.
All versions of siru-php-sdk with dependencies
ext-json Version *