| Current Path : /home/happyrenas/old/huissier-express.fr/old/old/ |
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/huissier-express.fr/old/old/creation_wallet_mangopay.php |
<?
session_start();
error_reporting(E_ALL);
$page="creation_wallet";
$dev="non";
ini_set('display_errors','On');
include("../../config.php");
require_once 'mangopay/vendor/autoload.php';
$MangopayApi = new \MangoPay\MangoPayApi();
if ($dev=="oui")
{
$MangopayApi->Config->ClientId = 'ofyc2017';
$MangopayApi->Config->ClientPassword = 'iqkhQK591cWzu3Ept5Z4niNiaCaw8Ctpa9ixa68ZvXrP9BEpbJ';
$MangopayApi->Config->TemporaryFolder = 'temp_sandbox';
$MangopayApi->Config->BaseUrl = 'https://api.sandbox.mangopay.com';
}
else
{
$MangopayApi->Config->ClientId = 'philippe2015';
$MangopayApi->Config->ClientPassword = 'hK15oQKQig9N2UFEXQpCoirptU4VTeU28p0CTyiprt0fQuwFPP';
$MangopayApi->Config->TemporaryFolder = 'temp';
$MangopayApi->Config->BaseUrl = 'https://api.mangopay.com';
}
$user_id = $_REQUEST['user_id'];
///////////////////////////////////////////
//CREATE WALLET
///////////////////////////////////////////
try
{
$Wallet = new MangoPay\Wallet();
$Wallet->Owners = array($user_id);
$Wallet->Description = "Wallet";
$Wallet->Currency = "EUR";
$createdWallet = $MangopayApi->Wallets->Create($Wallet);
echo "<pre>";print_r ($createdWallet);echo "</pre>";
mail('philippe-jean@outlook.fr;resa@huissier-express.fr', 'createdWallet', '<pre>'.print_r($createdWallet, true).'</pre>');
}
catch(MangoPay\Libraries\ResponseException $e)
{
echo $e->GetCode();
echo $e->GetMessage();
echo $e->GetErrorDetails();
}
catch(MangoPay\Libraries\Exception $e)
{
echo $e->GetMessage();
}
?>
*