️ Config File
The configuration file is provided by the Laravel SISP package. You can publish this file to your application by following the instructions in the Installation section.
Here’s the configuration file:
<?php
return [
/*
|--------------------------------------------------------------------------
| SISP URL
|--------------------------------------------------------------------------
|
| The URL for the SISP payment gateway. This URL is used to communicate
| with the SISP payment system to handle all payment requests and responses.
|
*/
'url' => env('SISP_URL'),
/*
|--------------------------------------------------------------------------
| Generators Configuration
|--------------------------------------------------------------------------
|
| This section configures the various generators used in the payment
| processing flow. These generators create specific values required for
| the payment request, ensuring that the session, reference, and timestamp
| values are dynamically generated as needed.
|
| Each generator is associated with an action class responsible for
| creating the respective value. You can customize or extend these
| actions as necessary to fit your business logic.
|
| The generators are as follows:
|
| - 'merchantSession': Generates a unique session identifier for each
| payment request, helping to track and differentiate between sessions.
| - 'merchantReference': Generates a unique merchant reference for each
| transaction, enabling easy identification of the payment in logs or
| backend systems.
| - 'timeStamp': Generates a timestamp value representing the exact time
| the payment request was created, which is essential for tracking and
| ensuring the timing of transactions.
|
| You can add more generators or modify the existing ones to meet your
| specific requirements.
|
*/
'generators' => [
'merchantSession' => Akira\Sisp\Actions\Generators\MerchantSessionGeneratorAction::class,
'merchantReference' => Akira\Sisp\Actions\Generators\MerchantReferenceGeneratorAction::class,
'timeStamp' => Akira\Sisp\Actions\Generators\TimeStampGeneratorAction::class,
],
/*
|--------------------------------------------------------------------------
| Merchant Virtual POS Terminal Identification
|--------------------------------------------------------------------------
|
| This unique identifier is generated by SISP and assigned to the merchant.
| It identifies the merchant’s virtual POS terminal and is required
| for all payment processing.
|
*/
'posID' => env('SISP_POS_ID'),
/*
|--------------------------------------------------------------------------
| Merchant Virtual POS Terminal Password
|--------------------------------------------------------------------------
|
| The password generated by SISP and assigned to the merchant. This is used
| to authenticate the merchant during the payment process.
|
*/
'posAutCode' => env('SISP_POS_AUT_CODE'),
/*
|--------------------------------------------------------------------------
| Currency Code for the Transaction
|--------------------------------------------------------------------------
|
| This is a three-digit ISO 4217 currency code for the transaction.
| For payments in Cape Verde, this should always be '132' (Cape Verde Escudo - CVE).
|
*/
'currency' => env('SISP_CURRENCY', '132'),
/*
|--------------------------------------------------------------------------
| Language for Transaction Response Messages
|--------------------------------------------------------------------------
|
| Defines the language for transaction response messages.
| By default, it is set to 'en' for English. You can change it to 'pt' for Portuguese.
|
*/
'languageMessages' => env('SISP_LANGUAGE_MESSAGES', 'en'),
/*
|--------------------------------------------------------------------------
| Fingerprint Algorithm Version
|--------------------------------------------------------------------------
|
| This specifies the version of the fingerprint algorithm used for transaction
| authentication. The default version is '1'.
|
*/
'fingerPrintVersion' => env('SISP_FINGERPRINT_VERSION', '1'),
/*
|--------------------------------------------------------------------------
| URL for Merchant's Server Response
|--------------------------------------------------------------------------
|
| The URL where the merchant will receive the response from SISP after the
| transaction is processed (success or failure).
|
*/
'urlMerchantResponse' => config('app.url').'/sisp-payment-response',
/*
|--------------------------------------------------------------------------
| 3D Secure Transaction Indicator
|--------------------------------------------------------------------------
|
| Indicates if the transaction should use 3D Secure. Default is '1' for
| 3D Secure transactions.
|
*/
'is3DSec' => env('SISP_IS_3D_SEC', '1'),
/*
|--------------------------------------------------------------------------
| Transaction Code
|--------------------------------------------------------------------------
|
| Defines the type of transaction, such as purchase, refund, etc.
| This can be customized according to your business needs.
|
*/
'transactionCode' => env('SISP_DEFAULT_TRANSACTION_CODE', '1'),
/*
|--------------------------------------------------------------------------
| Merchant Identification
|--------------------------------------------------------------------------
|
| The unique merchant ID provided by SISP, required for transaction identification.
|
*/
'merchantId' => env('SISP_MERCHANT_ID'),
/*
|--------------------------------------------------------------------------
| Transaction Table Name
|--------------------------------------------------------------------------
|
| The name of the table in the database where transaction records will be stored.
| You can change the default value if needed.
|
*/
'table_name' => 'sisp_transactions',
/*
|--------------------------------------------------------------------------
| Redirect URL After Payment or Cancellation
|--------------------------------------------------------------------------
|
| The URL to which users will be redirected after a successful payment or cancellation.
| Ensure this matches the flow of your application.
|
*/
'redirect_url' => env('SISP_REDIRECT_URL', '/'),
/*
|--------------------------------------------------------------------------
| Theme for the Payment Page
|--------------------------------------------------------------------------
|
| This setting defines the theme of the payment page. It can be either 'dark' or 'light'.
| The default theme is 'dark'.
|
*/
'theme' => env('SISP_THEME', 'dark'),
];
With this configuration in place, your application is ready to communicate with the SISP payment system. You can modify the configuration settings to suit your specific needs.