This starter template provides a customizable foundation for Global Payments SDK integration across multiple programming languages. Each implementation includes basic SDK setup, configuration management, and placeholder endpoints that you can modify for your specific payment use cases.
- .NET Core - ASP.NET Core web application
- Go - Go HTTP server application
- Java - Jakarta EE servlet-based web application
- Node.js - Express.js web application
- PHP - PHP web application
- Python - Flask web application
- SDK Configuration - Basic setup with environment variables
- Placeholder Endpoints - Ready-to-customize API endpoints
- Error Handling - Basic error handling structure
- Client Integration - HTML form with hosted fields tokenization
- Multiple Languages - Consistent structure across all implementations
Each template includes:
-
Basic SDK Setup
- Environment variable configuration
- Service URL configuration
- API key management
-
Starter Endpoints
- GET
/config- Configuration endpoint - POST
/process-payment- Payment processing template - Commented examples for additional endpoints (authorize, capture, refund, etc.)
- GET
-
Ready-to-Modify Structure
- TODO comments for customization points
- Example payment logic you can adapt
- Placeholder functions for various payment flows
- Copy the template - Copy this directory to start your new project
- Choose your language - Navigate to any implementation directory (nodejs, python, php, java, dotnet, go)
- Set up credentials - Copy
.env.sampleto.envand add your Global Payments API keys - Run the server - Execute
./run.shto install dependencies and start the server - Customize - Modify the code for your specific payment use case
This template can be adapted for various payment scenarios:
- Basic Charges - Simple one-time payments
- Authorization/Capture - Two-step payment processing
- Subscriptions - Recurring payment processing
- Refunds - Payment reversal functionality
- Multi-step Checkouts - Complex payment flows
- Payment Methods - Credit cards, ACH, alternative payments
- Global Payments account with API credentials
- Development environment for your chosen language
- Package manager (npm, pip, composer, maven, dotnet, go mod)
Each implementation includes commented examples for common payment operations:
// Authorization only
app.post('/authorize', ...)
// Capture authorized payment
app.post('/capture', ...)
// Process refund
app.post('/refund', ...)
// Get transaction details
app.get('/transaction/:id', ...)- Update the
/process-paymentendpoint for your specific flow - Add validation for your required fields
- Customize error handling and responses
- Add logging and monitoring as needed
Enhance the template for production use with:
- Input validation and sanitization
- Comprehensive error handling and logging
- Security headers and rate limiting
- PCI compliance measures
- Monitoring and alerting