Step 2 - Configure the integration method
PayTabs provides you with the backend packages that make the integrating with PayTabs payment gateway very easy by providing ready-made classes that handle the payment process.
After you have set up our Laravel package successfully, as clarified in the last step (Step 1 - Laravel Package | Setup and activate the integration method), you can now manage your integration configuration to start using our package easily. Kindly check the below steps that will walk you through how to configure the package:
Configure the integration
- First thing, you will need to generate the package config file by running the below command inside your Laravel project command line:
php artisan vendor:publish --tag=paytabs
Then, to generate the PayTabs log file, which will be essential in troubleshooting any issue, navigate to the
config/logging.php
file, and amend the channel’s array with the below:'PayTabs' => [
'driver' => 'single',
'path' => storage_path('logs/PayTabs.log'),
'level' => 'info',
],Be Aware OfThis is a MUST step to empower your team and the PayTabs technical support team to troubleshooting any issue if any technical assistance is needed.
After that, you will need to provide your
Profile ID
,Server Key
,Currency
, andRegion
in the PayTabs configuration array file located at "config/PayTabs.php".Be Aware OfFor more information about how to get your integration keys from your dashboard, got to the Integration keys and details..
Integration keys and details
Profile Id
Name | profile_id |
---|---|
Type | INT |
Description | The merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT Dashboard? solution article. To know more about this parameter please click here. |
Description | Accept only valid profile number. |
Default | - |
Required | ✔ |
Example |
|
Server Key
Name | server_key |
---|---|
Type | STRING |
Description | The merchant profile's server key which used for authentication purposes. You can get it from your dashboard. To know more about how, please check our How to get my Authentication/Integration/API Keys? solution article.. |
Description | Accept only a valid server key that is associated with the profile ID. |
Default | - |
Required | ✔ |
Example |
|
Currency
Name | currency |
---|---|
Type | STRING |
Description | Indicates the transaction currency, which the customer will be charged with. |
Description |
|
Default | - |
Required | ✔ |
Example |
|
Region
Name | region | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | STRING | ||||||||||||||||||
Description | Indicates the merchant account's country. It must be related to the profile used in the integration. Please check our What is my (Region)/(endpoint URL)? solution article. | ||||||||||||||||||
Description |
| ||||||||||||||||||
Default | - | ||||||||||||||||||
Required | ✔ | ||||||||||||||||||
Example |
|