Skip to content

Giftcard version v2.0.0

Compare
Choose a tag to compare
@kishankananibrainstream kishankananibrainstream released this 07 Aug 10:20
· 23 commits to master since this release
eb9ddc8

This tag is compatible with the Bagisto version v2.0.0

Requirements:

  • Bagisto: v2.0.0
  • PHP: 8.1 or higher
  • Composer 2.6.3 or higher

Installation :

Unzip the Brainstream.zip file and move the extracted folder to the bagisto/packages directory.

  • Goto config/app.php file and add following line under 'providers'
Brainstream\Giftcard\Providers\GiftcardServiceProvider::class
  • Goto composer.json file and add following line under 'psr-4'
"Brainstream\\Giftcard\\": "packages/Brainstream/Giftcard/src"
  • Run these below commands to complete the setup:
composer dump-autoload
php artisan migrate
php artisan optimize:clear
  • Run the below command and select the Giftcard Service provider from the selection :
php artisan vendor:publish --force
  • Include the PayPal credentials in the loadPayPalScript method. Additionally, ensure that the credentials are entered in the PayPal payment gateway section within the Bagisto admin panel.

  • Add the mail credentials in the .env file to receive the giftcard via email.

  • Add the below code in the CartResource File after the payment_method_title :

$this->mergeWhen($this->giftcard_number, [
    'giftcard_number'           => $this->giftcard_number,
    'giftcard_amount'           => $this->giftcard_amount,
    'remaining_giftcard_amount' => $this->remaining_giftcard_amount,
]),

That's it, now just execute the project on your specified domain.