laravel-tradesafe maintained by saythanks
laravel-tradesafe
A Laravel SDK for the TradeSafe escrow GraphQL API.
[!WARNING] This package is in active early development. The public API may change before
1.0.
Installation
composer require saythanks/laravel-tradesafe
Publish the config:
php artisan vendor:publish --tag=tradesafe-config
Add to .env:
TRADESAFE_ENV=sandbox
TRADESAFE_CLIENT_ID=
TRADESAFE_CLIENT_SECRET=
TRADESAFE_CALLBACK_SECRET=
Quick start
use SayThanks\TradeSafe\Facades\TradeSafe;
$introspected = TradeSafe::schema()->enum('Role');
// → ['BUYER', 'SELLER', 'AGENT', 'BENEFICIARY_SUB_AGENT', ...]
$raw = TradeSafe::query('query { apiProfile { organizations { name token } } }');
Resource methods (tokens(), transactions(), allocations(), checkout(), profile()) and the typed event-based webhook handler are added in subsequent releases.
License
TODO
Update this readme