PHP code example of monetah / monetah-checkout

1. Go to this page and download the library: Download monetah/monetah-checkout 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/ */

    

monetah / monetah-checkout example snippets







use Monetah\checkout\Monetah;

$clientId = "<votre client id>";
$clientSecret = "<votre client secret>";

$monetah = new Monetah($clientId, $clientSecret);



//Effectuer un paiement

$orderId = 93; //Une identification unique pour le paiement
$amount = 120; //Le montant du paiement
$currency = "usd" //Devise à facturer

$payToken = $monetah->checkout($amount, $currency, $orderId);


$monetah = new Monetah($id, $secret);

$payDetails = $monetah->retrievePayment(466987);

var_dump($payDetails);