# globalpayments-samples/online-payments-auth-and-delayed-capture architecture

> Architecture diagram of the GitHub repository globalpayments-samples/online-payments-auth-and-delayed-capture, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/globalpayments-samples/online-payments-auth-and-delayed-capture
- Repository: https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture
- Video tour (about a minute): https://gitdiagram.com/globalpayments-samples/online-payments-auth-and-delayed-capture/video

## Overview

This repository is a set of four language-specific web examples for tokenized Global Payments authorization and capture. Each exposes configuration for client-side tokenization, accepts payment form data, authorizes the tokenized card, then captures the authorization and formats a response. The README also identifies a simple web interface, environment-based credentials, and error handling as common capabilities. Source excerpts cover .NET, Node.js, and PHP; Java’s implementation is represented only by its README-described role, so its internal edges are omitted.

Main entry points: [`dotnet/Program.cs`](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/dotnet/Program.cs) (.NET App), [`nodejs/server.js`](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/nodejs/server.js) (Node App), [`php/process-payment.php`](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/process-payment.php) (PHP Payment), [`php/config.php`](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/config.php) (PHP Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Interfaces"]
  node_pages["Payment Pages"]
end

subgraph group_backend["Payment Backends"]
  node_dotnet_app[".NET App<br/>[Program.cs]"]
  node_node_app["Node App<br/>[server.js]"]
  node_php_config["PHP Config<br/>[config.php]"]
  node_php_payment["PHP Payment"]
  node_java_app["Java Servlet"]
  node_env["Environment Credentials"]
end

subgraph group_provider["Payment Provider"]
  node_tokenization["Tokenization Service"]
  node_payment_api["Global Payments API"]
end

node_customer(("Customer"))

node_customer -->|"submits payment"| node_pages
node_pages -.->|"posts token and billing data"| node_dotnet_app
node_pages -.->|"posts token and billing data"| node_node_app
node_pages -.->|"posts token and billing data"| node_php_payment
node_pages -.->|"posts payment"| node_java_app
node_dotnet_app -->|"loads credentials"| node_env
node_node_app -->|"loads credentials"| node_env
node_php_config -->|"loads credentials"| node_env
node_php_payment -->|"loads credentials"| node_env
node_dotnet_app -->|"generates access token"| node_tokenization
node_node_app -->|"generates access token"| node_tokenization
node_php_config -->|"generates access token"| node_tokenization
node_dotnet_app -->|"authorizes then captures"| node_payment_api
node_node_app -->|"authorizes then captures"| node_payment_api
node_php_payment -->|"authorizes then captures"| node_payment_api

click node_dotnet_app "https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/dotnet/Program.cs"
click node_node_app "https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/nodejs/server.js"
click node_php_config "https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/config.php"
click node_php_payment "https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/process-payment.php"
click node_java_app "https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/java/src/main/java/com/globalpayments/example/ProcessPaymentServlet.java"

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_pages toneBlue
class node_dotnet_app,node_node_app,node_php_config,node_php_payment,node_java_app,node_env toneAmber
class node_tokenization,node_payment_api toneMint
class node_customer toneIndigo
```

## Components

### Web Interfaces

- **Payment Pages**

### Payment Backends

- [.NET App](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/dotnet/Program.cs): `dotnet/Program.cs`
- [Node App](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/nodejs/server.js): `nodejs/server.js`
- [PHP Config](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/config.php): `php/config.php`
- [PHP Payment](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/php/process-payment.php): `php/process-payment.php`
- [Java Servlet](https://github.com/globalpayments-samples/online-payments-auth-and-delayed-capture/blob/main/java/src/main/java/com/globalpayments/example/ProcessPaymentServlet.java): `java/src/main/java/com/globalpayments/example/ProcessPaymentServlet.java`
- **Environment Credentials**

### Payment Provider

- **Tokenization Service**
- **Global Payments API**

### Other components

- **Customer**

## Connections

- Customer → Payment Pages: submits payment (evidence: `README.md`)
- Payment Pages → .NET App: posts token and billing data (evidence: `README.md`)
- Payment Pages → Node App: posts token and billing data (evidence: `README.md`)
- Payment Pages → PHP Payment: posts token and billing data (evidence: `README.md`)
- Payment Pages → Java Servlet: posts payment (evidence: `README.md`)
- .NET App → Environment Credentials: loads credentials (evidence: `dotnet/Program.cs`)
- Node App → Environment Credentials: loads credentials (evidence: `nodejs/server.js`)
- PHP Config → Environment Credentials: loads credentials (evidence: `php/config.php`)
- PHP Payment → Environment Credentials: loads credentials (evidence: `php/process-payment.php`)
- .NET App → Tokenization Service: generates access token (evidence: `dotnet/Program.cs`)
- Node App → Tokenization Service: generates access token (evidence: `nodejs/server.js`)
- PHP Config → Tokenization Service: generates access token (evidence: `php/config.php`)
- .NET App → Global Payments API: authorizes then captures (evidence: `dotnet/Program.cs`)
- Node App → Global Payments API: authorizes then captures (evidence: `nodejs/server.js`)
- PHP Payment → Global Payments API: authorizes then captures (evidence: `php/process-payment.php`)
