Integrate with PHP SDK
Prerequisites
PHP 5.6 or above
Installation and Usage
Integrating with the PHP SDK requires two steps:
Install the SDK in your project
Initialize the SDK in your application
Step 1: Install the SDK
Install via Composer
To install the SDK, use composer:
$ composer require indodana-finance/indodana-paylater-sdkInclude the SDK into your PHP file using the autoloader:
<?php
require('<YOUR_PROJECT_DIRECTORY>/vendor/autoload.php');Step 2: Initialize the SDK
Usage:
Use Case
Get Installment Options
Example:
The array inside getInstallmentOptions method follows Get Installment Options request body format.
The value of $installmentOptions follows Get Installment Options response body format.
Checkout
Example:
The array inside checkout method follows Checkout request body format.
The value of $result follows Checkout response body format.
Check Transaction Status
Example:
The array inside checkTransactionStatus method follows Check Transaction Status query params format.
The value of $result follows Check Transaction Status response body format.
Order Cancellation / Refund
Example:
The array inside refund method follows Order Cancellation / Refund request body format.
The value of $result follows Order Cancellation / Refund response body format.
Last updated