rawcreative/receiptful

Receiptful PHP Integration

0.2.0 2015-05-13 17:10 UTC

This package is not auto-updated.

Last update: 2024-04-27 14:28:10 UTC


README

Latest Version Software License Total Downloads

A PHP SDK for the Receiptful API. See the Receiptful API Docs for more information.

Install

Via Composer

$ composer require rawcreative/receiptful

Usage

<?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:

$ 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

$result = $receiptful->sendReceipt(array $receipt); 
resendReceipt
$result = $receiptful->resendReceipt($receiptId);
resend

Alias for resendReceipt

$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

$user = $receiptful->currentUser();

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.