purchased-at / sdk-php
purchased.at PHP SDK
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Installs: 1 918
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 5
Forks: 0
pkg:composer/purchased-at/sdk-php
Requires
- php: ~5.4 || ^7.0
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^5.4
README
Installation
Quick and Simple
Download the bundled SDK from purchasedat_sdk.php and save it into your source directory.
Alternative: Composer
Add the following dependency (and repository) to your composer.json
{ "require": { "purchased-at/sdk-php": "*" } }
Quick Start
<?php // make sure you place the purchasedat_sdk.php file is present on your server require_once 'purchasedat_sdk.php'; $apiKey = 'REPLACE_WITH_API_KEY'; // be sure to specify the customer's e-mail address (mandatory!) $options = new \PurchasedAt\PurchaseOptions('test-customer@purchased.at'); // test mode $options->setTestEnabled(true); ?> <html> <body> <button data-purchasedat-widget-open>Buy!</button> <?= \PurchasedAt\renderScript($apiKey, $options) ?> </body> </html>