useshimmer / laravel-tebex-checkout
API to interact with Tebex checkout API
v0.2
2023-03-31 00:51 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- sammyjo20/saloon: ^2.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-11-09 09:03:35 UTC
README
This package is currently for internal use, do not expect support.
composer require useshimmer/laravel-tebex-checkout
Create a checkout with sdk:
$connector = new TebexCheckout('foo', 'bar'); $request = new CreateCheckoutRequest( basket: [ 'return_url' => 'http://foo.com', 'complete_url' => 'http://bar.com', 'custom' => [ 'baz' => 'buzz', ], ], items: [ [ 'package' => [ 'name' => 'foobar', 'price' => 12.34, ], ], ] ); $response = $connector->send($request);
Create a checkout with resource api:
$connector = new TebexCheckout('foo', 'bar'); $response = $connector->checkout()->create( basket: [ 'return_url' => 'http://foo.com', 'complete_url' => 'http://bar.com', 'custom' => [ 'baz' => 'buzz', ], ], items: [ [ 'package' => [ 'name' => 'foobar', 'price' => 12.34, ], ], ] );