Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-tebex-checkout maintained by useshimmer

Description
API to interact with Tebex checkout API
Author
Last update
2023/07/03 08:11 (dev-master)
Downloads
24

Comments
comments powered by Disqus

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,
                ],
            ],
        ]
    );