Download the PHP package arcansecurity/skeerel-php without Composer
On this page you can find all versions of the php package arcansecurity/skeerel-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arcansecurity/skeerel-php
More information about arcansecurity/skeerel-php
Files in arcansecurity/skeerel-php
Package skeerel-php
Short Description Skeerel PHP Library
License MIT
Homepage https://skeerel.com/
Informations about the package skeerel-php
Skeerel PHP
A PHP library for the Skeerel API https://doc.skeerel.com
Requirements
Minimum PHP version: 5.4.0
Install
Via composer
composer require arcansecurity/skeerel-php 2.5.5
Or in your composer.json
file:
Manually
If you do not wish to use Composer, you can download the
latest release.
Then, to use the bindings, include the init.php
file.
require_once('/path/to/skeerel-php/init.php');
Usage
Generate a state token
When you display the login page to your user, you have to set a session token in order to avoid some XSRF attacks. The following line will do the job for you
Show the button
In order to connect or pay, a user must click on the Skeerel button.
It's quite simple to insert the button on your page. Just paste this code where you want the button to appear
Dealing with delivery method
When a user pays with Skeerel, it's likely that you will have to ship its order.
In that case, just set the url that Skeerel should call to get your delivery methods
in your data-delivery-methods-url
parameter. For instance:
You can personalize as you like your url, so you can send accurate shipping pricing.
Note that __USER__
(user identifier), __ZIP_CODE__
, __CITY__
, __COUNTRY__
(two letters country code) are generics values that
will be replaced automatically before calling your page.
In case of a guest checkout, __USER__
value will be set to empty string.
To format delivery methods, we recommend that you use our embedded method:
Get details on completion
When a user logs in or pays with Skeerel, the browser will redirect him
automatically to your data-redirect-url
parameter. To retrieve his data, you just have to call the
following lines
For more information about getting user information, you can look
at the classes under the Skeerel/Data
directory.
Get details of a payment
List payments
Payments are ordered by date DESC. Last payment appears first
Refund payment
Reviewing a payment
When a payment seems suspect, Skeerel hold the money but does not capture it.
This way you can review the payment manually and only capture the amount if the payment is legit (thus, avoiding dispute). If it is fraudulent you can just reject the payment. If the payment is not rejected within seven days, the payment is automatically canceled.
The following code shows how to capture or reject a payment.
Get details of a website
Sample App
If you'd like to see an example of this library in action, check out the Skeerel PHP sample application here.
Resources
Check out the API documentation.
Access your customer dashboard.
All versions of skeerel-php with dependencies
ext-json Version *