1. Go to this page and download the library: Download celtyvsk/cashier-connect 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/ */
if ($user->subscribedToPlan('monthly', 'main')) {
//
}
if ($user->subscription('main')->recurring()) {
//
}
if ($user->subscription('main')->cancelled()) {
//
}
if ($user->subscription('main')->onGracePeriod()) {
//
}
if ($user->subscription('main')->ended()) {
//
}
$user->subscription('main')->incrementQuantity();
// Add five to the subscription's current quantity...
$user->subscription('main')->incrementQuantity(5);
$user->subscription('main')->decrementQuantity();
// Subtract five to the subscription's current quantity...
$user->subscription('main')->decrementQuantity(5);
$user->newSubscription('main', 'premium')
->anchorBillingCycleOn( Carbon::parse('first day of next month'))
->create($token);