PHP code example of medboubazine / moogold

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

    

medboubazine / moogold example snippets


$user_id = "";
$partner_id = "";
$secret_key = "";

//
// Credentials
//
$credentials = new Credentials($user_id, $partner_id, $secret_key);
//
// Main instance
//
$moogold =  new Moogold($credentials);

$user = $moogold->user();
$products = $moogold->products();
$orders = $moogold->orders();


    $user->balance();
    

        $products->list(int $categgory_id);
    

        $products->details(int $product_id);
    

        $orders->create(int $type, string $external_id, string $offer_id, int $quantity);
    

        $orders->details(int $id);