1. Go to this page and download the library: Download naqel/sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
naqel / sdk example snippets
$naqel = new \Naqel\Naqel([
'use_sandbox' => true,
'client_id' => '[YOUR_CLIENT_ID]',
'password' => '[YOUR_CLIENT_PASSWORD]',
'version' => '9.0',
]);
// Set your address
$clientAddress = (new \Naqel\Models\ClientAddress())
->setPhoneNumber('0555555555')
->setFirstAddress('King Abdulaziz Street')
->setCountryCode('KSA')
->setCityCode('RUH');
// Set your contact
$clientContact = (new \Naqel\Models\ClientContact())
->setName('Mohammad')
->setPhoneNumber('05xxxxxxxx');
// Attach both address and contact to Naqel instance
$naqel->setClientAddress($clientAddress);
$naqel->setClientContact($clientContact);