LightMVC Framework Lightshop Module
Easily add an e-commerce mechanism to the LightMVC Skeleton Application!
- The LightMVC Lockdown module.
- Install and configure the LightMVC Lockdown module.
- Copy and paste (merge and replace) all of the module's files to the root directory of your LightMVC Skeleton Application installation,
- 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,
- Add the line
require 'lightshop.config.php'; at the end of the 'config/config.local.php' file.
- 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! :)