| Current Path : /home/happyrenas/old/huissier-express.fr/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/pre_auth2.php |
<?
session_start();
error_reporting(E_ALL);
ini_set('display_errors','On');
include("config.php");
$page="pre_auth.php";
////////////////////////////////////////////
require_once 'administration/panel/mangopay/vendor/autoload.php';
$Api = new \MangoPay\MangoPayApi();
$Api->Config->ClientId = 'ofyc2017';
$Api->Config->ClientPassword = 'iqkhQK591cWzu3Ept5Z4niNiaCaw8Ctpa9ixa68ZvXrP9BEpbJ';
$Api->Config->TemporaryFolder = 'temp';
$Api->Config->BaseUrl = 'https://api.sandbox.mangopay.com';
// CREATION WALLET
/*
try
{
$Wallet = new \MangoPay\Wallet();
$Wallet->Tag = "custom meta";
$Wallet->Owners = array ("19056567");
$Wallet->Description = "My big project";
$Wallet->Currency = "EUR";
$Result = $Api->Wallets->Create($Wallet);
echo "<pre>";print_r ($Result);echo "</pre>";
}
catch(MangoPay\Libraries\ResponseException $e)
{
echo $e->GetCode();
echo $e->GetMessage();
echo $e->GetErrorDetails();
}
catch(MangoPay\Libraries\Exception $e)
{
echo $e->GetMessage();
}
*/
$payIn = new \MangoPay\PayIn();
$payIn->CreditedWalletId = 19059374;
$payIn->AuthorId = 19056567;
$payIn->DebitedFunds = new \MangoPay\Money();
$payIn->DebitedFunds->Amount = 150;
$payIn->DebitedFunds->Currency = "EUR";
$payIn->Fees = new \MangoPay\Money();
$payIn->Fees->Amount = 0;
$payIn->Fees->Currency = "EUR";
// payment type as CARD
$payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard();
$payIn->PaymentDetails->CardType = "CB_VISA_MASTERCARD";
$payIn->PaymentDetails->CardId = 19059743;
// execution type as DIRECT
$payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect();
$payIn->ExecutionDetails->SecureModeReturnURL = 'http://test.com';
// create Pay-In
$createdPayIn = $Api->PayIns->Create($payIn);
?>