https://github.com/shahariaazam/zoho-subscription
Integrate Zoho Subscription in your PHP application.
https://github.com/shahariaazam/zoho-subscription
subscription zoho
Last synced: 2 months ago
JSON representation
Integrate Zoho Subscription in your PHP application.
- Host: GitHub
- URL: https://github.com/shahariaazam/zoho-subscription
- Owner: shahariaazam
- License: mit
- Created: 2020-06-20T11:29:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T21:58:52.000Z (about 6 years ago)
- Last Synced: 2025-12-31T13:14:41.079Z (6 months ago)
- Topics: subscription, zoho
- Language: PHP
- Homepage: https://github.com/shahariaazam/zoho-subscription
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Library Templates
[](https://github.com/shahariaazam/zoho-subscription/actions?query=workflow%3ACode-Checks)
[](https://scrutinizer-ci.com/g/shahariaazam/zoho-subscription)
[](https://scrutinizer-ci.com/g/shahariaazam/zoho-subscription)
[](https://scrutinizer-ci.com/g/shahariaazam/zoho-subscription)
[](https://scrutinizer-ci.com/g/shahariaazam/zoho-subscription)
Integrate Zoho Subscription in your PHP application.
## Usage
```
';
$authToken = '';
$httpClient = new Client();
$apiClient = new ApiClient($authToken, $orgId, $httpClient);
$customer = new Customer();
$customer->setFirstName('John')
->setLastName('Doe')
->setDisplayName("JohnD")
->setEmail('demo@example.com');
$plan = new Plan();
$plan->setPlanCode('TS-DP1');
$subscription = new Subscription();
$subscription->setCustomer($customer);
$subscription->setPlan($plan);
try {
$zohoSubscription = new ZohoSubscription($apiClient);
$subscriptionResult = $zohoSubscription->create($subscription);
echo $subscriptionResult->getSubscriptionId();
} catch (SubscriptionException $e) {
echo $e->getMessage() . PHP_EOL;
echo $e->getCode();
}
```