PHP code example of polem / mango-pay-client

1. Go to this page and download the library: Download polem/mango-pay-client 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/ */

    

polem / mango-pay-client example snippets




use MangoPay\Client;

$client = Client::factory(array(
    'partner_id'              => 'parterId',
    'url'                     => 'http://api-preprod.leetchi.com',
    'version'                 => 'v1',
    'private_key_path'        => 'file://'. __DIR__ . '/pkey.pem',
    'private_key_pass_phrase' => '',
));

$user = array(
    'FirstName'   => 'Doe',
    'LastName'    => 'John',
    'Email'       => '[email protected]',
    'Nationality' => 'FR',
    'Birthday'    => 1300186358,
    'PersonType'  => 'NATURAL_PERSON'
);


$user = $client->CreateAUser($user);
echo $user;

php composer.phar