lloricode / laravel-pandago-sdk
This is my package laravel-pandago-sdk
v1.6.10
2022-08-19 04:56 UTC
Requires
- php: ^7.4|^8.0
- firebase/php-jwt: ^6.2
- guzzlehttp/guzzle: ^7.4
- illuminate/contracts: ^8.75
- spatie/data-transfer-object: ^2.8.4
- spatie/laravel-enum: ^3.0
- spatie/laravel-package-tools: ^1.11.3
Requires (Dev)
- composer-runtime-api: ^2.0
- ext-json: *
- nunomaduro/collision: ^5.11|^6.0
- nunomaduro/larastan: ^1.0.3|^2.0.1
- orchestra/testbench: ^6.24.1|^7.0
- pestphp/pest: ^1.21.2
- pestphp/pest-plugin-faker: ^1.0
- pestphp/pest-plugin-laravel: ^1.2
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5.20
- spatie/laravel-ray: ^1.29.6
README
https://pandago.docs.apiary.io
Installation
You can install the package via composer:
composer require lloricode/laravel-pandago-sdk
You can publish the config file with:
php artisan vendor:publish --tag="laravel-pandago-sdk-config"
This is the contents of the published config file:
<?php // config for Lloricode/LaravelPandagoSdk return [ 'url' => [ 'auth' => [ 'production' => env('PANDAGO_URL_AUTH_PRODUCTION', 'https://sts.deliveryhero.io'), 'sandbox' => env('PANDAGO_URL_AUTH_SANDBOX', 'https://sts-st.deliveryhero.io'), ], 'base' => [ 'production' => env('PANDAGO_URL_BASE_PRODUCTION', 'https://pandago-api-apse.deliveryhero.io'), 'sandbox' => env('PANDAGO_URL_BASE_SANDBOX', 'https://pandago-api-sandbox.deliveryhero.io'), ] ], 'mode' => env('PANDAGO_MODE', Lloricode\LaravelPandagoSdk\PandagoClient::ENVIRONMENT_SANDBOX), 'country_code' => env('PANDAGO_COUNTRY_CODE', 'sg'), // must be `sg` when in sandbox mode 'jwt' => [ 'expire_in_minutes' => env('PANDAGO_JWT_EXPIRE_IN_MINUTES', 1), 'key_id' => env('PANDAGO_JWT_KEY_ID'), 'jti' => env('PANDAGO_JWT_JTI'), 'aud' => env('PANDAGO_JWT_AUD') ], 'auth' => [ 'grant_type' => 'client_credentials', 'client_id' => env('PANDAGO_CLIENT_ID'), 'client_assertion_type' => 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', 'scope' => env('PANDAGO_SCOPE'), ], 'key_pair_path' => env('PANDAGO_KEY_PAIR_PATH', storage_path()), 'retry' => 3, ];
Usage
# todo: # see test suite for sample
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.