PHP code example of mitloshuk / moneycare

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

    

mitloshuk / moneycare example snippets


$moneyCare = new \MoneyCare\MoneyCare($username, $password);

$order = new \MoneyCare\Models\OrderCreation();
$good = new \MoneyCare\Models\Good();

$good->setPrice(100)->setTitle('Good Title');
$order->addGood($good)->setPointId('point');

$response = $moneyCare->createOrder($order);

if ($response->getIsAccepted()) {
    echo $response->getFormUrl();
}

$orderId = $response->getOrderId();
$response = $moneyCare->orderDetails($orderId);
echo $response->getCreditLimit();