PHP code example of rdrnnr87 / moolah

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

    

rdrnnr87 / moolah example snippets

 php
$config = [
    'environment' => 'sandbox',
    'merchantId' => 'yourMerchantId',
    'publicKey' => 'yourPublicKey',
    'privateKey' => 'yourPrivateKey'
];

$moolah = new Moolah($config);
$token = $moolah->getToken();
 php
$moolah = new Moolah($config);
$moolah->charge($amount, $nonce);