Secure credit card payment processing for Summit Events App using TouchNet's UPay gateway.
✅ READY FOR PRODUCTION
- Test Pass Rate: 76/76 tests (100%)
- Code Coverage: 86% org-wide (exceeds 75% requirement)
- UPayPaymentRest: 90%
- UPayPaymentController: 88.6%
- UPayCallbackController: 87%
- UPayHelper: 83.6%
- Security: AES256 encryption, token validation, duplicate prevention
- Documentation: Complete setup and deployment guides
See PRODUCTION_CHECKLIST.md for detailed readiness verification.
For Production Deployment: See DEPLOYMENT_GUIDE.md for complete production deployment instructions.
For Development/Testing:
cci flow run dev_org --org devTouchNet requires static IP addresses. Deploy a proxy server using AWS Lambda + Network Load Balancer.
- Add
SEA_SECUREcustom parameter - Set POST_LINK to your proxy server URL
- Provide your static IPs for whitelisting
Navigate to the payment page and complete a test transaction.
- ✅ Secure Payment Processing - AES256 encrypted tokens prevent fraud
- ✅ Auto-Submit Payment Forms - Seamless user experience
- ✅ Multiple Payment Sites - Support different TouchNet sites per event
- ✅ Guest User Compatible - Works with Experience Cloud
- ✅ Complete Audit Trail - Links payments to fees and registrations
- ✅ Flexible Configuration - Per-event site selection
⚠️ AWS Proxy Server - Lambda + NLB with static IPs (PROXY_SETUP.md)
- Summit Events App installed
- Summit Events Settings configured with encryption key (32+ characters)
UPay_Site__cpicklist field on Summit Events object (FIELD_SETUP.md)
- Active UPay account
- Site credentials (Site ID, Gateway URL, Validation Key)
SEA_SECUREcustom parameter configured- Static IPs whitelisted
| Document | Description |
|---|---|
| DEPLOYMENT_GUIDE.md | ⭐ Step-by-step production deployment guide |
| PRODUCTION_CHECKLIST.md | Production readiness checklist and validation |
| Document | Description |
|---|---|
| SETUP_GUIDE.md | Complete installation and configuration guide |
| PROXY_SETUP.md | AWS proxy server deployment (required) |
| FIELD_SETUP.md | Manual field creation on Summit Events |
| Document | Description |
|---|---|
| TECHNICAL_OVERVIEW.md | Architecture and technical specifications |
| PAYMENT_FLOW.md | Visual payment flow diagrams |
| SECURITY.md | Security implementation details |
┌─────────────┐
│ User Browser │
└──────┬──────┘
│
▼
┌─────────────────┐
│ Salesforce │
│ Payment Page │ → Auto-submits to TouchNet
└──────┬──────────┘
│
▼
┌─────────────────┐
│ TouchNet UPay │
│ Gateway │ → User enters payment
└──────┬──────────┘
│
├─ POST → ┌──────────────┐
│ │ AWS Proxy │ → Forwards to Salesforce REST API
│ │ (Static IPs) │
│ └──────────────┘
│ │
│ ▼
│ ┌──────────────┐
│ │ Salesforce │
│ │ REST API │ → Creates payment + links fees
│ └──────────────┘
│
└─ Redirect User → ┌──────────────┐
│ Callback Page │ → Shows confirmation
└──────────────┘
UPayHelper- Encryption, configuration, utilitiesUPayPaymentController- Payment page controllerUPayPaymentRest- REST API for TouchNet callbacksUPayCallbackController- Callback page controllerUPayHelper_TEST- Test coverage
UPayPayment- Auto-submit payment formUPayCallback- Success/cancel/error callback
TouchNet_UPay_Site__mdt- Payment site configuration
/services/apexrest/upaypaymentreceive- Payment callback handler
- AES256 encrypted passthrough parameter
- Contains: registration ID, event ID, amount, timestamp
- 24-hour expiration
- Prevents payment fraud and tampering
- REST endpoint uses
without sharingfor guest user support - All DML operations isolated to secure inner class
- Cookie encryption for registration context
- Token expiration check
- Duplicate payment prevention
- Registration and amount validation
- User registers for event in Summit Events
- Clicks payment link → UPayPayment page loads
- Page auto-submits → User goes directly to TouchNet
- User pays on TouchNet gateway
- TouchNet POSTs payment results → Proxy → Salesforce REST API
- REST API creates payment record and links fees
- TouchNet redirects user → Callback page
- Callback shows success message and redirects to confirmation
User sees: Event registration → Payment gateway → Success confirmation
Behind the scenes: Encrypted tokens, REST callbacks, payment linking
# Full deployment
cci flow run dev_org --org dev
# Or incremental
cci task run deploy --path force-app/main/default/classes --org dev
cci task run deploy --path force-app/main/default/objects --org dev
cci task run deploy --path force-app/main/default/pages --org devCreate UPay_Site__c picklist field on Summit Events object.
See: FIELD_SETUP.md
Deploy AWS Lambda + Network Load Balancer with static IPs.
See: PROXY_SETUP.md
Setup → Custom Metadata Types → TouchNet UPay Site → New
Required fields:
- Label: "Event Registration"
- UPay Site ID: Your TouchNet site ID
- Gateway URL: TouchNet gateway endpoint
- Validation Key: Your validation key
- Active: ✓
In TouchNet UPay Admin Portal:
- Add custom parameter:
SEA_SECURE(passthrough variable) - Set POST_LINK:
https://your-proxy.com/services/apexrest/upaypaymentreceive - Request IP whitelist for your proxy server IPs
Create test event, register, and complete test payment.
# All tests
cci task run run_tests --org dev
# Specific test
cci task run run_tests --org dev --test_name_match UPayHelper_TEST
# Check coverage
sf data query --query "SELECT ApexClassOrTrigger.Name, NumLinesCovered, NumLinesUncovered FROM ApexCodeCoverageAggregate WHERE ApexClassOrTrigger.Name LIKE 'UPay%'" --target-org YourOrg__dev --result-format human- Payment page loads and auto-submits
- TouchNet processes test payment
- Payment record created in Salesforce
- Fees linked to payment
- Registration status = "Registered"
- Callback page shows success
- Auto-redirect to confirmation
| Issue | Solution |
|---|---|
| Payment not created | Check proxy server is running, verify TouchNet POST_LINK |
| "Invalid security token" | Configure SEA_SECURE in TouchNet admin portal |
| Static IP required | Deploy proxy server (PROXY_SETUP.md) |
| Guest user errors | Verify without sharing in REST class |
| Fees not linked | Check fee update in PaymentCRUD inner class |
Debug Logs: Filter by UPayPaymentRest or UPayCallback
- Lambda: $0-5/month (1M requests free)
- Network Load Balancer: ~$16/month
- Elastic IPs: ~$4/month
- Total: ~$20-40/month
- No additional Salesforce costs
- Uses standard Summit Events license
Documentation Issues: Check the /docs folder
TouchNet Issues: Contact your TouchNet representative
Salesforce Issues: Review debug logs, check permissions
Proxy Issues: Check AWS CloudWatch logs
This project is maintained by Thaddaeus Dahlberg.
- Built for Summit Events App
- Integrates with TouchNet UPay Gateway
- AWS proxy architecture pattern
Version: 1.0
Released: February 2026
Salesforce API: 65.0