Installation

🛠 Installation

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

1. 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.

2. Check for Existing Configuration Files

If your application already has a config/crypto.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 the package.

3. Install the Package via Composer

To install the Laravel CRYPTO package, use Composer – the PHP dependency manager. Run the following command in your terminal:

composer require akira/laravel-crypto

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

4. Publishing the Configuration File

Once the package is installed via Composer, you can publish the config file. Run the following command:

php artisan vendor:publish --tag=crypto-config

This command will publish the package’s configuration file to your project, allowing you to customize the encryption settings according to your requirements.

5. Generate Encryption Keys

To ensure secure encryption and decryption, you need to generate encryption keys. Run the following Artisan command to create a new key:

php artisan crypto:generate-key

6. 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:


CRYPTO_ENCRYPTION_KEY=your_generated_key

🔑 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.