PHP code example of mah-shamim / city-bank-api
1. Go to this page and download the library: Download mah-shamim/city-bank-api 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/ */
mah-shamim / city-bank-api example snippets
$config = [
'mode' => 'sandbox',
'username' => 'CITY_BANK_API_USERNAME',
'password' => 'CITY_BANK_API_PASSWORD',
'company' => 'CITY_BANK_EXCHANGE_COMPANY',
'base_url' => 'https://nrbms.thecitybank.com',
'api_url' => '/nrb_api_test/dynamicApi.php?wsdl',
];
$cityBank = new \MahShamim\CityBank($config);
return [
'mode' => env('CITY_BANK_API_MODE', \MahShamim\CityBank\Config::MODE_SANDBOX), //sandbox, live
'sandbox' => [
'mode' => \MahShamim\CityBank\Config::MODE_SANDBOX,
'username' => env('CITY_BANK_API_USERNAME'),
'password' => env('CITY_BANK_API_PASSWORD'),
'company' => env('CITY_BANK_EXCHANGE_COMPANY'),
'base_url' => 'https://nrbms.thecitybank.com/nrb_api_test',
'api_url' => '/dynamicApi.php?wsdl',
],
'live' => [
'mode' => \MahShamim\CityBank\Config::MODE_LIVE,
'username' => env('CITY_BANK_API_USERNAME'),
'password' => env('CITY_BANK_API_PASSWORD'),
'company' => env('CITY_BANK_EXCHANGE_COMPANY'),
'base_url' => 'https://nrbms.thecitybank.com',
'api_url' => '/dynamicApi.php?wsdl',
],
];
bash
php artisan city-bank:install
bash
php artisan vendor:publish --tag="city-bank-config"