This section will guide you on how to integrate Deposits.lk with your existing Application.
Step 1 - Clone the Repository
Visit Deposits.lk PHP GitHub Repository and clone it to your local machine. After cloning the repository, You will be able to find two files as
Step 2 - Idenitfying the files in the repository
request.php- This file is used to send the transaction request to Deposits.lk. This file contains a HTML Form which you can use to easily integrate with your exisiting application.
response.php- This files is used to receive the response from Deposits.lk
Step 3 - Identifying the input Parameters in the HTML Form
|URL that is used to redirect users when a transaction is successful|
|URL that is used to redirect users when a transaction is cancelled|
|URL that is used to send updates about a tranasaction afterwards|
|Customer's First name|
|Customer's Last name|
|Customer's E-mail Address|
|API Key received|
Step 4 - Setting up the Integration with Keys
First open up the
request.php file and change the below line with the API Key received.
$API_KEY = "PASTE_YOUR_API_KEY_HERE";
Then open up the
response.php file and change the below line with the API Key and API Secret received.
$API_KEY = "PASTE_YOUR_API_KEY_HERE"; $API_SECRET = "PASTE_YOUR_API_SECRET_HERE";
Step 5 - Testing with Sample Form
request.php file in your browser and fill the details
When you click checkout, you will be redirected to Deposits.lk Payment Gateway.
After performing the transaction, you will be redirected back to the
response.php file with the response from Deposits.lk