Download the PHP package getloy/getloy-php without Composer
On this page you can find all versions of the php package getloy/getloy-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download getloy/getloy-php
More information about getloy/getloy-php
Files in getloy/getloy-php
Package getloy-php
Short Description PHP library for the GetLoy Payment Integration API.
License GPL-3.0-only
Homepage https://getloy.com/
Informations about the package getloy-php
GetLoy Integration Library for PHP
The GetLoy Integration Library provides an easy way to access the GetLoy API from applications written in PHP.
The library currently supports the following payment methods:
- iPay88 Cambodia (all supported payment methods)
- Pi Pay
- PayWay by ABA Bank (debit/credit card only, ABA Pay only, debit/credit card only, or both)
Requirements
PHP 5.6.0 or later.
Composer
You can install the bindings via Composer. Run the following command:
To use the bindings, use Composer's autoload:
Manual Installation
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php
file.
Getting Started
A simple usage example:
Passing additional order details
Most payment systems will display additional order details such as the order line items in the payment interface. This information can be provided in the widgetHtml()
call.
Callback validation
Getloy will make a POST request to the callback URL provided in the widgetHtml()
call once the payment was confirmed, but before the user is redirected to the success URL.
The callback content is validated against a hash value that includes the (secret) GetLoy Token.
The following example, $order
and lookupOrder()
are placeholders for objects/methods provided by your application.
If you are developing your application locally, you can use a service like ngrok to redirect callbacks from GetLoy to your local webserver.