LightMVC Banner

LightMVC Framework Lightshop Module

https://lightmvcframework.net

Easily add an e-commerce mechanism to the LightMVC Skeleton Application!

INSTALLATION

Requirements

  • The LightMVC Lockdown module.

Steps

  1. Install and configure the LightMVC Lockdown module.
  2. Copy and paste (merge and replace) all of the module's files to the root directory of your LightMVC Skeleton Application installation,
  3. Add the PSR-4 namespaces and the required dependencies found in the 'lightshop_composer.json' file to the main 'composer.json' file of the Skeleton Application installation,
  4. Run composer update,
  5. Add the line require 'lightshop.config.php'; at the end of the 'config/config.local.php' file.
  6. Add your Stripe and Paypal keys in the 'config/lightshop.config.php' and 'public/js/stripe.js' files.

Once done, the Lightshop e-commerce module will be working. You will be able to attach any listener to the CartController::CART_CHARGE_PAYMENT_SUCCESSFUL or the CartController::CART_CHARGE_PAYMENT_FAILED events by using the SharedEventManager to do so. The data from the payment gateway will be stored in the properties of the event's AggregateImmutableValueObject.

Have a lot of fun! :)