Receiptful PHP SDK
, (*1)
A PHP SDK for the Receiptful API. See the Receiptful API Docs for more information., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require rawcreative/receiptful, (*4)
## Usage
```php
<?php
require '../vendor/autoload.php';
$receiptful = RawCreative\Receiptful\Api::factory([
'apiKey' => 'your api key here'
]);
$result = $receiptful->receipts();
var_dump($result);
Use with Laravel
For easy integration with Laravel 5, install the companion package:, (*5)
$ composer require rawcreative/laravel-receiptful
Available Methods
Receipts
receipts
$receipts = $receiptful->receipts();
receipt
$receipt = $receiptful->receipt($receiptId);
sendReceipt
See API Docs for a list of required parameters, (*6)
$result = $receiptful->sendReceipt(array $receipt);
resendReceipt
$result = $receiptful->resendReceipt($receiptId);
resend
Alias for resendReceipt, (*7)
$result = $receiptful->resend($receiptId);
Coupons
coupons
$coupons = $receiptful->coupons();
coupon
$coupon = $receiptful->coupon($couponId);
deleteCoupon
$coupon = $receiptful->deleteCoupon($couponId);
useCoupon
$coupon = $receiptful->useCoupon($couponId, $reference, $amount, $currency);
Users
Retrieves info for API key, (*8)
$user = $receiptful->currentUser();
Contributing
Please see CONTRIBUTING for details., (*9)
License
The MIT License (MIT). Please see License File for more information., (*10)