How r-martins/pagbank-woocommerce works
PagBank Connect is a WooCommerce payment plugin for Pix, boleto, and credit-card checkout. The main path starts with a shopper choosing a method, proceeds through WooCommerce gateway and payment processing, calls PagBank, and updates the order. Separate branches cover recurring subscriptions, payment splits, and EnvioFácil shipping. The graph includes documented capabilities whose implementation was not sampled; those links are dashed where source-level wiring was not shown. Component relationships are limited to README statements and SOURCE INDEX references or excerpts.
Main entry points: Gateway.php Payment gateway · Connect.php Plugin bootstrap · ProcessPayment.php Payment processing · Recurring.php Subscription lifecycle
Components 22
Checkout and payments
- Payment gateway
src/Connect/Gateway.php - Payment methods
src/Connect/Payments - Block checkout
src/Connect/Blocks - Standalone checkout
src/Connect/Standalone - Payment processing
src/Traits/ProcessPayment.php - Order processing
src/Connect/OrderProcessor.php
PagBank integration
- API client
src/Helpers/Api.php - Payment data objects
src/Object/Charge.php - Checkout parameters
src/Helpers/Params.php - Plugin bootstrap
src/Connect.php - Order status jobs
src/Cron/ForceOrderUpdate.php
Recurring commerce
- Subscription lifecycle
src/Connect/Recurring.php - Recurring orders
src/Connect/Recurring/RecurringOrder.php - Subscription account
src/Connect/Recurring/RecurringDashboard.php
Store extensions
- Payment splits
src/Integrations/GeneralSplitManager.php - Dokan split
src/Integrations/Dokan/DokanSplitManager.php - EnvioFácil shipping
src/EnvioFacil.php
Administration
- Gateway settings
admin/views/html-settings-page.php - Integration settings
admin/views/html-integrations-settings.php
Other components
- Shopper
- WooCommerce
- PagBank API
Connections 24
- Shopper → Payment gateway: chooses method
- Payment gateway → WooCommerce: registers gateway
- Plugin bootstrap → Payment gateway: registers
src/Connect.php - Payment gateway → Payment processing: uses processing
src/Connect/Gateway.php - Payment gateway → Payment methods: dispatches payments
- Plugin bootstrap → Block checkout: registers checkout
src/Connect.php - Plugin bootstrap → Standalone checkout: registers checkout
src/Connect.php - Payment methods → API client: calls API
src/Connect/Payments/CreditCard.php - Payment processing → API client: sends requests
src/Traits/ProcessPayment.php - Payment processing → Payment data objects: builds charge
src/Traits/ProcessPayment.php - Payment processing → Order processing: updates order
src/Connect/OrderProcessor.php - API client → PagBank API: sends requests
src/Helpers/Api.php - Payment gateway → Checkout parameters: reads settings
src/Connect/Gateway.php - Plugin bootstrap → Subscription lifecycle: initializes
src/Connect.php - Payment processing → Subscription lifecycle: processes subscription
src/Traits/ProcessPayment.php - Subscription lifecycle → Recurring orders: creates orders
src/Connect/Recurring.php - Subscription lifecycle → Subscription account: loads dashboard
src/Connect/Recurring.php - Payment gateway → Payment splits: configures splits
src/Integrations/GeneralSplitManager.php - Payment gateway → Dokan split: configures vendor splits
src/Integrations/Dokan/DokanSplitManager.php - Plugin bootstrap → EnvioFácil shipping: registers shipping
src/EnvioFacil.php - Gateway settings → Payment gateway: configures
- Integration settings → Payment splits: configures
admin/views/html-integrations-settings.php - Order status jobs → API client: checks status
src/Cron/ForceOrderUpdate.php - Order status jobs → Order processing: updates orders
src/Cron/ForceOrderUpdate.php