-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example of getting a subscription by ID.
- Loading branch information
Keith Palmer Jr
authored and
Keith Palmer Jr
committed
Dec 21, 2016
1 parent
e3313aa
commit dff7dac
Showing
7 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
header('Content-Type: text/plain'); | ||
|
||
require '../ChargeOverAPI.php'; | ||
|
||
//This url should be specific to your ChargeOver instance | ||
$url = 'https://dev.chargeover.com/api/v3'; | ||
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3'; | ||
|
||
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC; | ||
$username = '7sutWFEO2zKVYIGmZMJ3Nij5hfLxDRb8'; | ||
$password = '9vCJbmdZKSieVchyrRItFQw8MBN4lOH3'; | ||
|
||
$API = new ChargeOverAPI($url, $authmode, $username, $password); | ||
|
||
// Find a subscription by subscription ID # | ||
$resp = $API->findById('package', 1234); | ||
|
||
if (!$API->isError($resp)) | ||
{ | ||
$Package = $resp->response; | ||
print_r($Package); | ||
|
||
} | ||
else | ||
{ | ||
print('There was an error looking up the subscription!' . "\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters