PHP code example of joao-pedro-alves / hotmart-php-sdk
1. Go to this page and download the library: Download joao-pedro-alves/hotmart-php-sdk 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/ */
joao-pedro-alves / hotmart-php-sdk example snippets
use Hotmart;
$hotmart = new Hotmart\Client(
'a60ea46d-fd4a-48b6-a10b-823a9c3c1a35',
'5e7ab2d7-6cd3-2da5-bc6b-45e10ab15021',
'LTawYmU4NmQtZmQ0YS00OGI2LWGxMGItODkzYTljM2MxZTM1OjJlN7FhMmQ1LTZkZDctNJRmNS1iZTliLTk1ZTIwYmIxNTB1MX'
);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->get($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->summary($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->purchases($subscriberCode, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->cancel($subscriberCode, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->cancelList($subscriberCodeArray, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->reactivate($subscriberCode, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->reactivateList($subscriberCodeArray, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->subscriptions()->changeChargeDay($subscriberCode, $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->history($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->summary($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->participants($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->commissions($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->priceDetails($paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->transactions()->refund($transactionCode);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->club()->modules('NOME_DO_SUBDOMINIO', $paramsArray);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->club()->modulePages($subDomain, $moduleId);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->club()->users($subDomain);
$hotmart = new Hotmart\Client('CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_BASIC');
$hotmart->club()->userLessons($subDomain, $userId);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.