# buckaroo-it/magento2 architecture

> Architecture diagram of the GitHub repository buckaroo-it/magento2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/buckaroo-it/magento2
- Repository: https://github.com/buckaroo-it/magento2

## Overview

Buckaroo Magento 2 is a payment-gateway extension for Magento stores. Its main workflow is a shopper selecting a supported method, Magento creating a payment request, and Buckaroo processing it; the extension then handles responses and later push notifications to update order state. Separate capabilities include express wallets, giftcards, Second Chance reminders, analytics, and merchant administration. Paths identify the relevant subsystems from the tree; sampled excerpts are incomplete, so uncertain internal call wiring is omitted.

Main entry points: [`Model/Adapter/BuckarooAdapter.php`](https://github.com/buckaroo-it/magento2/blob/master/Model/Adapter/BuckarooAdapter.php) (Gateway adapter), [`Model/Push`](https://github.com/buckaroo-it/magento2/tree/master/Model/Push) (Push processing), [`Model/PaymentInformationManagement.php`](https://github.com/buckaroo-it/magento2/blob/master/Model/PaymentInformationManagement.php) (Payment services), [`Controller/Applepay`](https://github.com/buckaroo-it/magento2/tree/master/Controller/Applepay) (Express payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_checkout["Checkout payments"]
  node_payment_api["Payment services"]
  node_method_config["Method configuration"]
  node_express["Express payments"]
end

subgraph group_gateway["Gateway processing"]
  node_request["Request builders"]
  node_adapter["Gateway adapter"]
  node_response["Response handlers"]
end

subgraph group_operations["Order operations"]
  node_push["Push processing"]
  node_push_service["Order lookup"]
  node_order_state["Order management"]
end

subgraph group_extras["Additional features"]
  node_giftcards["Giftcard payments"]
  node_second_chance["Second Chance<br/>[SecondChance.php]"]
  node_reminders["Reminder schedule<br/>[SecondChance.php]"]
  node_analytics["Payment analytics"]
  node_analytics_store[("Analytics storage<br/>[Analytics.php]")]
end

subgraph group_management["Merchant management"]
  node_merchant_admin["Merchant administration"]
  node_logs[("Payment logs<br/>[Log.php]")]
end

node_shopper(("Shopper"))
node_magento["Magento store"]
node_buckaroo["Buckaroo gateway"]

node_shopper -->|"starts checkout"| node_magento
node_magento -->|"offers methods"| node_method_config
node_magento -->|"submits payment"| node_payment_api
node_payment_api -->|"builds request"| node_request
node_request -->|"provides data"| node_adapter
node_adapter -->|"sends payment"| node_buckaroo
node_buckaroo -->|"returns result"| node_adapter
node_adapter -->|"provides response"| node_response
node_response -->|"updates payment"| node_magento
node_shopper -->|"uses wallet"| node_express
node_express -->|"creates order"| node_magento
node_magento -->|"receives notification"| node_push
node_push -->|"resolves order"| node_push_service
node_push -->|"dispatches processing"| node_order_state
node_shopper -->|"pays with giftcard"| node_giftcards
node_shopper -->|"resumes payment"| node_second_chance
node_second_chance -->|"schedules reminders"| node_reminders
node_magento -->|"tracks payments"| node_analytics
node_analytics -->|"persists analytics"| node_analytics_store
node_merchant_admin -->|"manages logs"| node_logs

click node_payment_api "https://github.com/buckaroo-it/magento2/blob/master/Model/PaymentInformationManagement.php"
click node_method_config "https://github.com/buckaroo-it/magento2/tree/master/Model/ConfigProvider/Method"
click node_express "https://github.com/buckaroo-it/magento2/tree/master/Controller/Applepay"
click node_request "https://github.com/buckaroo-it/magento2/tree/master/Gateway/Request"
click node_adapter "https://github.com/buckaroo-it/magento2/blob/master/Model/Adapter/BuckarooAdapter.php"
click node_response "https://github.com/buckaroo-it/magento2/tree/master/Gateway/Response"
click node_push "https://github.com/buckaroo-it/magento2/tree/master/Model/Push"
click node_push_service "https://github.com/buckaroo-it/magento2/blob/master/Service/Push/OrderRequestService.php"
click node_order_state "https://github.com/buckaroo-it/magento2/tree/master/Model/Service"
click node_giftcards "https://github.com/buckaroo-it/magento2/tree/master/Model/Giftcard"
click node_second_chance "https://github.com/buckaroo-it/magento2/blob/master/Model/SecondChance.php"
click node_reminders "https://github.com/buckaroo-it/magento2/blob/master/Cron/SecondChance.php"
click node_analytics "https://github.com/buckaroo-it/magento2/tree/master/Model/Analytics"
click node_analytics_store "https://github.com/buckaroo-it/magento2/blob/master/Model/Analytics/ResourceModel/Analytics.php"
click node_merchant_admin "https://github.com/buckaroo-it/magento2/tree/master/Controller/Adminhtml"
click node_logs "https://github.com/buckaroo-it/magento2/blob/master/Model/ResourceModel/Log.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_payment_api,node_method_config,node_express toneBlue
class node_request,node_adapter,node_response toneAmber
class node_push,node_push_service,node_order_state toneMint
class node_giftcards,node_second_chance,node_reminders,node_analytics,node_analytics_store toneRose
class node_merchant_admin,node_logs,node_shopper,node_magento,node_buckaroo toneIndigo
```

## Components

### Checkout payments

- [Payment services](https://github.com/buckaroo-it/magento2/blob/master/Model/PaymentInformationManagement.php): `Model/PaymentInformationManagement.php`
- [Method configuration](https://github.com/buckaroo-it/magento2/tree/master/Model/ConfigProvider/Method): `Model/ConfigProvider/Method`
- [Express payments](https://github.com/buckaroo-it/magento2/tree/master/Controller/Applepay): `Controller/Applepay`

### Gateway processing

- [Request builders](https://github.com/buckaroo-it/magento2/tree/master/Gateway/Request): `Gateway/Request`
- [Gateway adapter](https://github.com/buckaroo-it/magento2/blob/master/Model/Adapter/BuckarooAdapter.php): `Model/Adapter/BuckarooAdapter.php`
- [Response handlers](https://github.com/buckaroo-it/magento2/tree/master/Gateway/Response): `Gateway/Response`

### Order operations

- [Push processing](https://github.com/buckaroo-it/magento2/tree/master/Model/Push): `Model/Push`
- [Order lookup](https://github.com/buckaroo-it/magento2/blob/master/Service/Push/OrderRequestService.php): `Service/Push/OrderRequestService.php`
- [Order management](https://github.com/buckaroo-it/magento2/tree/master/Model/Service): `Model/Service`

### Additional features

- [Giftcard payments](https://github.com/buckaroo-it/magento2/tree/master/Model/Giftcard): `Model/Giftcard`
- [Second Chance](https://github.com/buckaroo-it/magento2/blob/master/Model/SecondChance.php): `Model/SecondChance.php`
- [Reminder schedule](https://github.com/buckaroo-it/magento2/blob/master/Cron/SecondChance.php): `Cron/SecondChance.php`
- [Payment analytics](https://github.com/buckaroo-it/magento2/tree/master/Model/Analytics): `Model/Analytics`
- [Analytics storage](https://github.com/buckaroo-it/magento2/blob/master/Model/Analytics/ResourceModel/Analytics.php): `Model/Analytics/ResourceModel/Analytics.php`

### Merchant management

- [Merchant administration](https://github.com/buckaroo-it/magento2/tree/master/Controller/Adminhtml): `Controller/Adminhtml`
- [Payment logs](https://github.com/buckaroo-it/magento2/blob/master/Model/ResourceModel/Log.php): `Model/ResourceModel/Log.php`

### Other components

- **Shopper**
- **Magento store**
- **Buckaroo gateway**

## Connections

- Shopper → Magento store: starts checkout
- Magento store → Method configuration: offers methods
- Magento store → Payment services: submits payment
- Payment services → Request builders: builds request
- Request builders → Gateway adapter: provides data
- Gateway adapter → Buckaroo gateway: sends payment
- Buckaroo gateway → Gateway adapter: returns result
- Gateway adapter → Response handlers: provides response
- Response handlers → Magento store: updates payment
- Shopper → Express payments: uses wallet
- Express payments → Magento store: creates order
- Magento store → Push processing: receives notification
- Push processing → Order lookup: resolves order
- Push processing → Order management: dispatches processing
- Shopper → Giftcard payments: pays with giftcard
- Shopper → Second Chance: resumes payment
- Second Chance → Reminder schedule: schedules reminders
- Magento store → Payment analytics: tracks payments
- Payment analytics → Analytics storage: persists analytics
- Merchant administration → Payment logs: manages logs
