How globalpayments-samples/php-payments-and-reporting works
This PHP application provides card verification, payment processing, and transaction reporting through browser interfaces and API endpoints. The principal workflow is a user submitting a verification or payment request, the server invoking Global Payments, and transaction records becoming available in the dashboard. The README documents the interfaces and capabilities; sampled endpoint and reporter code confirms key integrations and local storage. Frontend request wiring and some endpoint internals were not sampled, so those links are documented or marked unverified.
Main entry points: TransactionReporter.php Transaction reporter · process-payment.php Payment processing · card-verification.html Verification form · payment.html Payment form
Components 16
User interfaces
- Navigation
public/index.html - Verification form
public/card-verification.html - Payment form
public/payment.html - Transaction dashboard
public/dashboard.html
API operations
- Public configuration
api/config.php - Access token
api/get-access-token.php - Card verification
api/verify-card.php - Payment processing
api/process-payment.php - Transaction queries
api/transactions-api.php - Global Payments SDK
Transaction reporting
- Transaction reporter
src/TransactionReporter.php - Local transaction files
src/TransactionReporter.php - Gateway reporting
Shared services
- Structured logging
src/Logger.php - Error handling
src/ErrorHandler.php
Other components
- User
Connections 20
- User → Navigation: opens
README.md - User → Verification form: submits verification
README.md - User → Payment form: submits payment
README.md - User → Transaction dashboard: views activity
README.md - Verification form → Public configuration: loads settings
- Payment form → Access token: requests token
- Payment form → Payment processing: submits payment
README.md - Verification form → Card verification: submits card
README.md - Transaction dashboard → Transaction queries: requests records
README.md - Access token → Global Payments SDK: generates token
api/get-access-token.php - Card verification → Global Payments SDK: verifies card
api/verify-card.php - Payment processing → Global Payments SDK: executes charge
api/process-payment.php - Card verification → Transaction reporter: records result
api/verify-card.php - Payment processing → Transaction reporter: records result
api/process-payment.php - Transaction queries → Transaction reporter: queries records
api/transactions-api.php - Transaction reporter → Local transaction files: reads and writes
src/TransactionReporter.php - Transaction reporter → Gateway reporting: queries gateway
src/TransactionReporter.php - Transaction reporter → Structured logging: logs events
src/TransactionReporter.php - Error handling → Structured logging: logs errors
src/ErrorHandler.php - Payment processing → Structured logging: logs payment
api/process-payment.php