# alvindcaesar/billplz-for-contact-form-7 architecture

> Architecture diagram of the GitHub repository alvindcaesar/billplz-for-contact-form-7, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alvindcaesar/billplz-for-contact-form-7
- Repository: https://github.com/alvindcaesar/billplz-for-contact-form-7

## Overview

This WordPress plugin connects Contact Form 7 submissions to Billplz: selected forms create pending payment records and bills, the payer is redirected offsite, and signed return/callback requests update payment state. Administrators configure credentials, forms, redirects, and email; they can review and manage payment records. Activation seeds a sample form and confirmation page. The map includes documented admin and confirmation capabilities; links for unsampled settings and redirect internals are limited to documented or indexed wiring.

Main entry points: [`app/Init.php`](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Init.php) (Service Registration), [`app/Payment/FormSubmission.php`](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/FormSubmission.php) (Form Submission), [`app/Payment/CallbackHandler.php`](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/CallbackHandler.php) (Callback Handler), [`app/Base/Activate.php`](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Base/Activate.php) (Activation Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Payment Runtime"]
  node_bootstrap["Service Registration<br/>[Init.php]"]
  node_submission["Form Submission<br/>[FormSubmission.php]"]
  node_helpers["Mode and Credentials<br/>[Functions.php]"]
  node_redirect["Payment Redirect"]
  node_callback["Callback Handler"]
  node_confirmation["Confirmation Page<br/>[page-callback.php]"]
  node_email_sender["Confirmation Email"]
  node_activation["Activation Setup<br/>[Activate.php]"]
end

subgraph group_admin["Administration"]
  node_payment_table["Payments Admin Table<br/>[PaymentTable.php]"]
  node_menu["Admin Menu<br/>[Menu.php]"]
  node_bar_menu["Admin Bar<br/>[BarMenu.php]"]
  node_action_link["Plugin Action Link<br/>[ActionLink.php]"]
  node_enqueue["Admin Scripts<br/>[EnqueueScripts.php]"]
end

subgraph group_config["Settings"]
  node_api_settings["API Settings<br/>[API.php]"]
  node_general_settings["General Settings<br/>[General.php]"]
  node_email_settings["Email Settings<br/>[Email.php]"]
  node_validation["Settings Validation<br/>[Validation.php]"]
end

subgraph group_state["Payment State"]
  node_payment_db[("Payment Records")]
end

node_customer(("Payer"))
node_cf7["Contact Form 7"]
node_billplz["Billplz Gateway"]
node_email_service["Mail Service"]

node_bootstrap -->|"registers"| node_menu
node_bootstrap -->|"registers"| node_bar_menu
node_bootstrap -->|"registers"| node_action_link
node_bootstrap -->|"registers"| node_enqueue
node_bootstrap -->|"registers"| node_api_settings
node_bootstrap -->|"registers"| node_general_settings
node_bootstrap -->|"registers"| node_email_settings
node_bootstrap -->|"registers"| node_validation
node_bootstrap -->|"registers"| node_redirect
node_bootstrap -->|"registers"| node_callback
node_bootstrap -->|"registers"| node_submission
node_cf7 -->|"submits form"| node_submission
node_submission -->|"reads credentials"| node_helpers
node_submission -->|"records payment"| node_payment_db
node_submission -->|"creates bill"| node_billplz
node_billplz -.->|"hosts payment"| node_customer
node_submission -->|"returns redirect"| node_customer
node_customer -.->|"returns to site"| node_redirect
node_billplz -.->|"posts callback"| node_callback
node_redirect -.->|"checks signature"| node_helpers
node_callback -->|"checks signature"| node_helpers
node_callback -->|"updates status"| node_payment_db
node_callback -->|"triggers confirmation"| node_email_sender
node_email_sender -->|"sends email"| node_email_service
node_payment_table -->|"reads and manages"| node_payment_db
node_menu -.->|"shows payments"| node_payment_table
node_activation -.->|"creates table"| node_payment_db
node_activation -->|"creates page"| node_confirmation
node_activation -->|"seeds example form"| node_cf7
node_general_settings -->|"stores form selection"| node_activation
node_bar_menu -->|"reads mode"| node_helpers
node_callback -.->|"serves confirmation"| node_confirmation

click node_bootstrap "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Init.php"
click node_submission "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/FormSubmission.php"
click node_helpers "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Helpers/Functions.php"
click node_redirect "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/ProcessRedirect.php"
click node_callback "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/CallbackHandler.php"
click node_confirmation "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/views/page-callback.php"
click node_email_sender "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Helpers/EmailConfirmation.php"
click node_payment_db "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Model/PaymentDatabase.php"
click node_payment_table "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/PaymentTable.php"
click node_menu "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/Menu.php"
click node_bar_menu "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/BarMenu.php"
click node_action_link "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/ActionLink.php"
click node_enqueue "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/EnqueueScripts.php"
click node_api_settings "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/API.php"
click node_general_settings "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/General.php"
click node_email_settings "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/Email.php"
click node_validation "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/Validation.php"
click node_activation "https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Base/Activate.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bootstrap,node_submission,node_helpers,node_redirect,node_callback,node_confirmation,node_email_sender,node_activation toneBlue
class node_payment_table,node_menu,node_bar_menu,node_action_link,node_enqueue toneAmber
class node_api_settings,node_general_settings,node_email_settings,node_validation toneMint
class node_payment_db toneRose
class node_customer,node_cf7,node_billplz,node_email_service toneIndigo
```

## Components

### Payment Runtime

- [Service Registration](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Init.php): `app/Init.php`
- [Form Submission](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/FormSubmission.php): `app/Payment/FormSubmission.php`
- [Mode and Credentials](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Helpers/Functions.php): `app/Helpers/Functions.php`
- [Payment Redirect](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/ProcessRedirect.php): `app/Payment/ProcessRedirect.php`
- [Callback Handler](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Payment/CallbackHandler.php): `app/Payment/CallbackHandler.php`
- [Confirmation Page](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/views/page-callback.php): `app/views/page-callback.php`
- [Confirmation Email](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Helpers/EmailConfirmation.php): `app/Helpers/EmailConfirmation.php`
- [Activation Setup](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Base/Activate.php): `app/Base/Activate.php`

### Administration

- [Payments Admin Table](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/PaymentTable.php): `app/Admin/PaymentTable.php`
- [Admin Menu](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/Menu.php): `app/Admin/Menu.php`
- [Admin Bar](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/BarMenu.php): `app/Admin/BarMenu.php`
- [Plugin Action Link](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/ActionLink.php): `app/Admin/ActionLink.php`
- [Admin Scripts](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Admin/EnqueueScripts.php): `app/Admin/EnqueueScripts.php`

### Settings

- [API Settings](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/API.php): `app/Settings/API.php`
- [General Settings](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/General.php): `app/Settings/General.php`
- [Email Settings](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/Email.php): `app/Settings/Email.php`
- [Settings Validation](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Settings/Validation.php): `app/Settings/Validation.php`

### Payment State

- [Payment Records](https://github.com/alvindcaesar/billplz-for-contact-form-7/blob/master/app/Model/PaymentDatabase.php): `app/Model/PaymentDatabase.php`

### Other components

- **Payer**
- **Contact Form 7**
- **Billplz Gateway**
- **Mail Service**

## Connections

- Service Registration → Admin Menu: registers (evidence: `app/Init.php`)
- Service Registration → Admin Bar: registers (evidence: `app/Init.php`)
- Service Registration → Plugin Action Link: registers (evidence: `app/Init.php`)
- Service Registration → Admin Scripts: registers (evidence: `app/Init.php`)
- Service Registration → API Settings: registers (evidence: `app/Init.php`)
- Service Registration → General Settings: registers (evidence: `app/Init.php`)
- Service Registration → Email Settings: registers (evidence: `app/Init.php`)
- Service Registration → Settings Validation: registers (evidence: `app/Init.php`)
- Service Registration → Payment Redirect: registers (evidence: `app/Init.php`)
- Service Registration → Callback Handler: registers (evidence: `app/Init.php`)
- Service Registration → Form Submission: registers (evidence: `app/Init.php`)
- Contact Form 7 → Form Submission: submits form (evidence: `app/Payment/FormSubmission.php`)
- Form Submission → Mode and Credentials: reads credentials (evidence: `app/Payment/FormSubmission.php`)
- Form Submission → Payment Records: records payment (evidence: `app/Payment/FormSubmission.php`)
- Form Submission → Billplz Gateway: creates bill (evidence: `app/Payment/FormSubmission.php`)
- Billplz Gateway → Payer: hosts payment
- Form Submission → Payer: returns redirect (evidence: `app/Payment/FormSubmission.php`)
- Payer → Payment Redirect: returns to site (evidence: `README.md`)
- Billplz Gateway → Callback Handler: posts callback (evidence: `README.md`)
- Payment Redirect → Mode and Credentials: checks signature (evidence: `app/Payment/ProcessRedirect.php`)
- Callback Handler → Mode and Credentials: checks signature (evidence: `app/Payment/CallbackHandler.php`)
- Callback Handler → Payment Records: updates status (evidence: `app/Payment/CallbackHandler.php`)
- Callback Handler → Confirmation Email: triggers confirmation (evidence: `app/Payment/CallbackHandler.php`)
- Confirmation Email → Mail Service: sends email (evidence: `app/Helpers/EmailConfirmation.php`)
- Payments Admin Table → Payment Records: reads and manages (evidence: `app/Admin/PaymentTable.php`)
- Admin Menu → Payments Admin Table: shows payments
- Activation Setup → Payment Records: creates table (evidence: `app/Base/Activate.php`)
- Activation Setup → Confirmation Page: creates page (evidence: `app/Base/Activate.php`)
- Activation Setup → Contact Form 7: seeds example form (evidence: `app/Base/Activate.php`)
- General Settings → Activation Setup: stores form selection (evidence: `app/Settings/General.php`)
- Admin Bar → Mode and Credentials: reads mode (evidence: `app/Admin/BarMenu.php`)
- Callback Handler → Confirmation Page: serves confirmation (evidence: `app/views/page-callback.php`)
