Loading...
Loading...
Use whenever creating, modifying, or debugging payment modules in QloApps — offline methods and online payment gateways. Covers PaymentModule class, payment hooks, checkout integration, validateOrder flow, API credentials, webhook handling, transaction logging, and refunds.
npx skill4agent add qloapps/agent-skills payment-module-developmentPaymentModule# Payment module structure
modules/qlopaymentname/
├── qlopaymentname.php # Main PaymentModule class
├── controllers/front/
│ ├── payment.php # Payment confirmation page
│ ├── validation.php # Order processing (offline)
│ ├── callback.php # Payment callback (online)
│ └── webhook.php # Payment webhook (online)
├── classes/ # Helper/Service classes
├── views/templates/
│ ├── front/payment.tpl # Payment option display
│ └── hook/payment_return.tpl # Success/failure message
└── LICENSE.mdmodule-developmentstats-module-development| Type | Example | Controllers | API | Order State |
|---|---|---|---|---|
| Offline | Bankwire, Cheque | payment, validation | No | Awaiting Payment |
| Online | PayPal, Credit Card Gateways | payment, callback, webhook | Yes | Payment Accepted |
OrderPaymentPAYMENT_TYPE_ONLINE = 1PAYMENT_TYPE_PAY_AT_HOTEL = 2PAYMENT_TYPE_REMOTE_PAYMENT = 3PaymentModule$validateOrderAmounttruevalidateOrder()payment_type = REMOTE_PAYMENTpayment_type = ONLINE$cart->is_advance_paymentCart::ADVANCE_PAYMENT| Module | Type | Key Concepts |
|---|---|---|
| Offline | Simple config, email instructions, basic pattern |
| Offline | Minimal setup example |
| Online | OAuth, webhooks, refunds, API integration |
classes/PaymentModule.phpclasses/order/Order.phpclasses/order/OrderPayment.phphookPaymentsecure_keyvalidateOrder()validateOrder()