PHP code example of lloricode / laravel-pandago-sdk
1. Go to this page and download the library: Download lloricode/laravel-pandago-sdk 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/ */
lloricode / laravel-pandago-sdk example snippets
// 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,
];
# todo:
# see test suite for sample
bash
php artisan vendor:publish --tag="laravel-pandago-sdk-config"