PHP code example of shamsuddeen / sudo-php
1. Go to this page and download the library: Download shamsuddeen/sudo-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/ */
shamsuddeen / sudo-php example snippets
udoAfrica\Sudo;
$sudo = new Sudo\Sudo('13337b87ee76gew87fg87gfweugf87w7ge78f229c', true); // true for Sandbox; false for Live
$client_data = [
"type" => "individual",
"status" => "active",
"name" => "Shamsuddeen Omacy",
"phoneNumber" => "07012345678",
"emailAddress" => "[email protected] ",
"individual" => [
"firstName" => "Shamsuddeen",
"lastName" => "Omacy",
"otherNames" => "",
"dob" => "1988/12/23",
"identity" => [
"type" => "BVN",
"number" => "12345678901"
],
"documents" => [
"idFrontUrl" => "link",
"idBackUrl" => "link",
"addressVerificationUrl" => "link"
]
],
"billingAddress" => [
"line1" => "4 Barnawa Close",
"line2" => "Off Challawa Crescent",
"city" => "Barnawa",
"state" => "Kaduna",
"country" => "NG",
"postalCode" => "800001"
]
];
$sudo->addCustomer($client_data);
$sudo->getCustomers();
$data = [
"customerId" => "64771cdfce4b094addfcba4a",
"fundingSourceId" => "61e5655b1e32bc4c04dea28b",
"debitAccountId" => "61e5747a1e32bc4c04dea85c",
"brand" => "MasterCard",
"type" => "virtual",
"currency" => "USD",
"issuerCountry" => "USA",
"status" => "active",
"spendingControls" => [
"allowedCategories" => [],
"blockedCategories" => [],
"channels" => [
"atm" => true,
"pos" => true,
"web" => true,
"mobile" => true
],
"spendingLimits" => [
[
"interval" => "daily",
"amount" => 20000
],
[
"interval" => "weekly",
"amount" => 1000000
],
[
"interval" => "monthly",
"amount" => 100000000
]
]
],
"sendPINSMS" => false
];
$result = $sudo->createCard($data);
bash
composer
php
$sudo->addCustomer()