1. Go to this page and download the library: Download moneybag/moneybag-sdk-php 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/ */
moneybag / moneybag-sdk-php example snippets
use Moneybag\MoneybagClient;
// Using default base URL (staging)
$client = new MoneybagClient('your_merchant_api_key');
// Or with custom base URL (e.g., from environment variable)
$client = new MoneybagClient('your_merchant_api_key', [
'base_url' => $_ENV['MONEYBAG_API_URL'] ?? 'https://staging.api.moneybag.com.bd/api/v2'
]);
$client = new MoneybagClient('your_api_key', [
'base_url' => 'https://api.moneybag.com.bd/api/v2', // API base URL
'timeout' => 30, // Request timeout in seconds
'verify_ssl' => true, // SSL certificate verification
]);
// Or set base URL after initialization
$client->setBaseUrl('https://api.moneybag.com.bd/api/v2');