How improntus/module-powerpay works
PowerPay is a Magento payment module that lets shoppers initiate installment financing, sends transaction requests to PowerPay, and handles subsequent status updates and order invoicing or cancellation. Its runtime also stores transaction state, expires pending orders, and can show financing widgets on product, header, and banner areas. The graph follows relationships visible in the excerpts and source index; Magento configuration and layout wiring is not sampled, so those connections are not asserted.
Main entry points: PowerPay.php Payment orchestration · Data.php Payment settings helper · TransactionRepository.php Transaction repository · CancelOrder.php Pending order expiry
Components 19
Checkout and payment
- Payment UI
view/frontend/web/js/view/payment/method.js - Create order flow
Controller/Order/Create.php - Order response flow
Controller/Order/Response.php - Payment orchestration
Model/PowerPay.php - Currency validation
Gateway/Validator/CurrencyValidator.php - Checkout result views
Block/Onepage
Transaction lifecycle
- Status callback endpoint
Model/Api/Callback.php - Transaction repository
Model/TransactionRepository.php - Transaction database resource
Model/ResourceModel/Transaction.php - Pending order expiry
Cron/CancelOrder.php
Settings and widgets
- Payment settings helper
Helper/Data.php - Admin payment settings
etc/adminhtml/system.xml - Financing widgets
ViewModel/Widgets.php - Product widget template
view/frontend/templates/productWidget.phtml - Checkout payment config
Model/ConfigProvider.php
PowerPay integration
- REST client
Model/Rest/WebService.php
Other components
- Shopper
- PowerPay service
- External widget library
Connections 22
- Shopper → Payment UI: selects payment
- Payment UI → Create order flow: starts checkout
- Create order flow → Payment orchestration: creates transaction
Controller/Order/Create.php - Order response flow → Payment orchestration: handles response
Controller/Order/Response.php - Payment orchestration → REST client: sends request
Model/PowerPay.php - REST client → Payment settings helper: gets API settings
Model/Rest/WebService.php - REST client → PowerPay service: calls REST API
Model/Rest/WebService.php - Payment orchestration → Transaction repository: saves transaction
Model/PowerPay.php - Transaction repository → Transaction database resource: loads and saves
Model/TransactionRepository.php - Status callback endpoint → Payment orchestration: processes status
Model/Api/Callback.php - Status callback endpoint → Payment settings helper: checks signature
Model/Api/Callback.php - Pending order expiry → Transaction repository: finds pending
Cron/CancelOrder.php - Pending order expiry → Payment orchestration: cancels order
Cron/CancelOrder.php - Pending order expiry → Transaction repository: updates expiry status
Cron/CancelOrder.php - Financing widgets → Payment settings helper: reads widget settings
ViewModel/Widgets.php - Product widget template → Financing widgets: renders widget
- Financing widgets → External widget library: loads widget library
README.md - Checkout payment config → Payment settings helper: reads payment settings
Model/ConfigProvider.php - Payment orchestration → Payment settings helper: reads credentials
Model/PowerPay.php - Payment orchestration → Currency validation: validates currency
Gateway/Validator/CurrencyValidator.php - Payment orchestration → Checkout result views: provides order result
Block/Onepage/Success.php - Admin payment settings → Payment settings helper: configures payment