Installation

Follow the steps below to seamlessly integrate the Laravel SISP package into your Laravel project.

Pre-Installation Considerations

Before you begin, ensure you consult the Prerequisites page to check for important requirements and considerations.

This step will help you avoid any potential configuration issues during the installation process.

Check for Existing Configuration Files

If your application already has a config/sisp.php file, you must rename or remove it to avoid conflicts.

This package will publish its own default configuration file, which is essential for customizing your SISP integration.

Install the Package via Composer

To install the Laravel SISP package, use Composer – the PHP dependency manager and run the following command in your terminal:

composer require akira/laravel-sisp

This command will download and install the package into your Laravel project.

Setup the Package Using Artisan

Once the package is installed via Composer, you can use Laravel’s Artisan command to set it up.

Run the following Artisan command:

php artisan laravel-sisp:install

This will automatically set up essential configurations and resources.

Configure Your Environment Variables

The next step is to configure the environment variables in your .env file. These variables ensure your application is correctly set up to communicate with the SISP Payment Gateway. Add the following lines to your .env file:


SISP_URL=your_sisp_url
SISP_POS_ID=your_sisp_pos_id
SISP_POS_AUT_CODE=your_sisp_pos_aut_code
SISP_MERCHANT_ID=your_sisp_merchant_id
SISP_REDIRECT_URL=your_sisp_redirect_url

Replace your_sisp_url, your_sisp_pos_id, your_sisp_pos_aut_code, your_sisp_merchant_id, and your_sisp_redirect_url with the actual values you receive from the SISP service provider.

Update Tailwind CSS Configuration

To ensure that the package’s views and assets are properly compiled with Tailwind CSS, you’ll need to modify your tailwind.config.js file. Add the following to the content array of the configuration:

 
export default {
  //  ...
    content: [
       //...
        './vendor/akira/laravel-sisp/resources/views/**/*.blade.php',
    ],
  //...
}
 

This tells Tailwind to watch the package’s view files for any CSS classes, ensuring they are properly included in your final build.

Build Your Assets

After updating the tailwind.config.js, you will need to compile your assets. Run the following command to build your assets:

 
npm run build
 

This will process and compile the assets needed for your application to function correctly with the package.

Service Provider Registration (Optional)

The service provider for this package will be automatically registered in Laravel. However, if you wish to register it manually for any reason, add the following line to the providers array in your bootstrap/providers.php file:

 
return[
    // ...
    Akira\Sisp\SispServiceProvider::class,
    // ...
];
 

Publishing Views and Assets (Optional)

To fully customize the views and assets provided by the Laravel SISP package, you can publish them to your project. Run the following Artisan command to do this:

 
php artisan vendor:publish --provider="Akira\Sisp\SispServiceProvider"
 

This command will publish all the package’s views, configuration files, and other resources to your project, allowing you to modify them to suit your needs.

Default Configuration File

Once the package is installed, you can view the default configuration file contents by visiting the Config file section. In this section, you'll find all the parameters you need to customize according to your SISP credentials and specific business requirements.