| Current Path : /home/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/happyrenas/old/happy-and-pay.fr/administration/templates/admin3/test_create_user.php |
<?
session_start();
error_reporting(E_ALL);
ini_set('display_errors','On');
////////////////////////////////////////////
////////////////////////////////////////////
require_once 'mangopay/vendor/autoload.php';
$MangopayApi = new \MangoPay\MangoPayApi();
$MangopayApi->Config->ClientId = 'philippe2015';
$MangopayApi->Config->ClientPassword = 'hK15oQKQig9N2UFEXQpCoirptU4VTeU28p0CTyiprt0fQuwFPP';
$MangopayApi->Config->TemporaryFolder = 'temp';
$MangopayApi->Config->BaseUrl = 'https://api.mangopay.com';
////////////////////////////////////////////
////////////////////////////////////////////
try {
$UserNatural = new MangoPay\UserNatural();
$UserNatural->Tag = "custom meta";
$UserNatural->FirstName = "Joe";
$UserNatural->LastName = "Blogs";
$UserNatural->Address = new MangoPay\Address();
$UserNatural->Address->AddressLine1 = "1 Mangopay Street";
$UserNatural->Address->AddressLine2 = "The Loop";
$UserNatural->Address->City = "Paris";
$UserNatural->Address->Region = "Ile de France";
$UserNatural->Address->PostalCode = "75001";
$UserNatural->Address->Country = "FR";
$UserNatural->Birthday = 1463496101;
$UserNatural->Nationality = "GB";
$UserNatural->CountryOfResidence = "FR";
$UserNatural->Occupation = "Carpenter";
$UserNatural->IncomeRange = 2;
$UserNatural->Email = "support@mangopay.com";
$Result = $MangopayApi->Users->Create($UserNatural);
echo "<pre>"; print_r($UserNatural);echo "</pre>";
} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()
} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()
}?>