How wallace-stev/selcom-push-wp works
This WordPress/WooCommerce plugin adds Selcom USSD wallet payments to checkout. A customer submits checkout; the gateway creates a minimal Selcom order, requests a mobile push, and updates the WooCommerce order while payment is pending. Selcom’s callback later drives the final order status and stock update. The source excerpts support the payment, signing/transport, and callback paths; some gateway code is omitted, so further checkout details are not mapped.
Main entry points: epush.php Payment gateway · apiController.php Order status handling · apiconnect.php Request signing
Components 12
Checkout
- Payment gateway
epush.php - WooCommerce
Selcom API
- Minimal order request
apiController.php - USSD push request
apiController.php - Request signing
apiconnect.php - HTTP transport
apiconnect.php
Orders and callbacks
- Callback endpoint
apiController.php - Order status handling
apiController.php - Stock updates
apiController.php
Other components
- Customer
- Merchant admin
- Selcom service
Connections 15
- Customer → Payment gateway: submits checkout
- Merchant admin → Payment gateway: configures credentials
- Payment gateway → WooCommerce: creates and updates orders
- Payment gateway → Minimal order request: requests order creation
- Payment gateway → USSD push request: requests payment push
- Minimal order request → Request signing: signs request
- USSD push request → Request signing: signs request
- Request signing → HTTP transport: provides digest
- HTTP transport → Selcom service: sends API request
- Selcom service → HTTP transport: returns response
- Selcom service → Callback endpoint: posts payment callback
- Callback endpoint → Order status handling: handles callback
- Order status handling → WooCommerce: loads and updates order
- Order status handling → Stock updates: reduces stock on success
- Stock updates → WooCommerce: updates inventory