PHP code example of rawcreative / receiptful

1. Go to this page and download the library: Download rawcreative/receiptful 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/ */

    

rawcreative / receiptful example snippets


 
iptful = RawCreative\Receiptful\Api::factory([
    'apiKey' => 'your api key here'
]);

$result = $receiptful->receipts();

var_dump($result);

 
$receipts = $receiptful->receipts();
 
$receipt = $receiptful->receipt($receiptId);
 
$result = $receiptful->sendReceipt(array $receipt); 
 
$result = $receiptful->resendReceipt($receiptId);
 
$result = $receiptful->resend($receiptId);
 
$coupons = $receiptful->coupons();
 
$coupon = $receiptful->coupon($couponId);
 
$coupon = $receiptful->deleteCoupon($couponId);
 
$coupon = $receiptful->useCoupon($couponId, $reference, $amount, $currency);
 
$user = $receiptful->currentUser();