- Step 1: Download the compressed file (RAR) from the link
- Step 2 : Extract files to a folder.
- Step 3 : You will see this files
- Step 4: Explain (DB_Info.php) file contents: This file contains basic info credentials for database connection , as explained in the below code lines:
$servername = "write your server host here";
$username = "write your database username here";
$password = "write your database password here";
$dbname = "write your database name here";
$servername = "xx.xx.xx.xx";
$username = "myuser";
$password = "123456780";
$dbname = "mydatabase";
- Explain (User_Info.php) file contents: This file contains the main credentials for API process , as following code lines:
$Api_Secret = 'write your API secret key';
$MERCHANT_ID = 'write your merchant ID';
$msisdn=write your MSISDN number;
$redirectUrl='URL after the end of payment process;
$serviceType='write you product type';
$Api_Secret = 'd48ch625srwgdwi827201hu';
$MERCHANT_ID = 'JORJO849384XJ';
- Explain (Select_product.php) file contents , this file contains the main lines codes for product select from database and pass them to payment page . so we'll explain the query code line:
According to your database table change the table name (item_tbl) and columns (Order_ID,Item_Description,Item_Price) And filtering item (Item_ID=$item_ID).
$sql = "SELECT Order_ID, Item_Description, Item_Price FROM item_tbl WHERE Item_ID =$Item_ID";
- Explain (h-test.php) file contents , this file contains the code for (Payment Button) script ,we will explain the action code:
You only change the name and value of (Item_ID=1) , this is value of database table items filtering . Note: Type=db , set this option as it is , if you have a dynamic database website , if not write this line: Type=static;
- Finally , both files (Final_API.php) and (JWT.php) keep their contents as it is.
Good Luck , for more technical info , please contact us.