purchased-at / sdk-php
There is no license information available for the latest version (v1.3) of this package.
purchased.at PHP SDK
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.3
2016-07-27 12:58 UTC
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>