Download the PHP package lipad/lipad-sdk without Composer
On this page you can find all versions of the php package lipad/lipad-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lipad/lipad-sdk
More information about lipad/lipad-sdk
Files in lipad/lipad-sdk
Package lipad-sdk
Short Description Secure and user-friendly checkout and direct charge API SDK for PHP applications for Lipad Transactions.
License MIT
Informations about the package lipad-sdk
Lipad SDK Usage Guide
Introduction
The Lipad SDK for PHP facilitates the integration of Lipad's payment and checkout features into your PHP applications. This comprehensive guide will assist you in the setup and utilization of the Lipad SDK.
Prerequisites
Before getting started, ensure you have the following:
- PHP installed on your server or development environment.
- Lipad API credentials, including the IV Key, Consumer Secret, Consumer Key.
Installation
-
Download the Lipad SDK: Download the Lipad SDK and include it in your project.
bash require_once 'vendor/autoload.php';
-
Instantiate the Lipad class with your credentials:
bash $lipad = new Lipad($IVKey, $consumerKey, $consumerSecret, $environment);
-
Validate Payload
bash $encryptedPayload = $lipad->encrypt($payload);
-
Get Checkout Status
bash try { $checkoutUrl = 'https://checkout2.dev.lipad.io/?access_key=' . urlencode($accessKey) . '&payload=' . urlencode($encryptedPayload); echo 'Checkout URL: ' . $checkoutUrl . "\n"; } catch (Exception $error) { echo 'Error: ' . $error->getMessage() . "\n"; }
Direct API Usage
-
To initialize the Lipad class, provide the $IVKey, $consumerSecret, and $environment parameters. The $environment should be one of the following: 'production' or 'sandbox'.
bash try { $lipad->DirectCharge($payload); } catch (Exception $error) { echo 'Error: ' . $error->getMessage() . "\n"; }
-
Get Charge Request Status
try { $lipad->getChargeRequestStatus($chargeRequestId); } catch (Exception $error) { echo 'Error: ' . $error->getMessage() . PHP_EOL; }