PHP code example of bariew / cashcow

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

    

bariew / cashcow example snippets


php composer.phar 

$cashcow = Api::instance($id, $token);
// get single Order data  
$order = $cashcow->orders(['OrderID' => $id])[0];
// update Order
$cashcow->orderUpdate($order->order_id, $order->email, [
    'order_status_type' => $cashcow::STATUS_DELIVERED,
    'order_notes' => "delivered",
]);
// update Product
$cashcow->productUpdate('9201B', ['qty' => 10]);