Integrate with PHP SDK

Prerequisites

Installation and Usage

Integrating with the PHP SDK requires two steps:

  1. Install the SDK in your project

  2. 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-sdk

Include 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