1. Go to this page and download the library: Download hridoy/telr 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/ */
return [
// The current mode is live|production or test
'test_mode' => env('TELR_TEST_MODE', true),
// The currency of store
'currency' => 'SAR',
// The sale endpoint that receive the params
// @see https://telr.com/support/knowledge-base/hosted-payment-page-integration-guide
'sale' => [
'endpoint' => 'https://secure.telr.com/gateway/order.json',
],
// The hosted payment page use the following params as it explained in the integration guide
// @see https://telr.com/support/knowledge-base/hosted-payment-page-integration-guide/#request-method-and-format
'create' => [
'ivp_method' => "create",
'ivp_store' => env('TELR_STORE_ID', null),
'ivp_authkey' => env('TELR_STORE_AUTH_KEY', null),
'return_auth' => '/handle-payment/success',
'return_can' => '/handle-payment/cancel',
'return_decl' => '/handle-payment/declined',
]
];