PHP code example of sudiptochoudhury / php-zoho-subscriptions
1. Go to this page and download the library: Download sudiptochoudhury/php-zoho-subscriptions 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/ */
sudiptochoudhury / php-zoho-subscriptions example snippets
use SudiptoChoudhury\Zoho\Subscriptions\Api;
...
$subscriptions = new Api([
'oauthtoken' => '<<Zoho Subscriptions OAuth Token>>', // https://www.zoho.com/subscriptions/api/v1/#oauth
'zohoOrgId' => '<<Zoho Organization ID>>',
]);
$resultJson = $subscriptions->addCustomer($data); // create a customer
$resultJson = $subscriptions->addSubscription($data); // create a subscription
use SudiptoChoudhury\Zoho\Subscriptions\Api;
...
$subscriptions = new Api([
'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create
'zohoOrgId' => '<<Zoho Organization ID>>',
]);
$resultJson = $subscriptions->addCustomer($data); // create a customer
$resultJson = $subscriptions->addSubscription($data); // create a subscription
use SudiptoChoudhury\Zoho\Subscriptions\Api;
new Api([
'oauthtoken' => '<<Zoho Subscriptions OAuth Token>>', // https://www.zoho.com/subscriptions/api/v1/#oauth
'zohoOrgId' => '<<Zoho Organization ID>>',
]);
use SudiptoChoudhury\Zoho\Subscriptions\Api;
new Api([
'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create
'zohoOrgId' => '<<Zoho Organization ID>>',
]);
$resultJson = $subscriptions->getOrganizations();
$resultJson = $subscriptions->addCustomer(['display_name'=> 'Sudipto Choudhury', 'email'=> '[email protected]']); // create a customer
"sudiptochoudhury/php-zoho-subscriptions": "dev-master"
composer