6.9 KiB
🚀 Production Deployment Checklist
Before Going Live with PayPal Merchant Onboarding
✅ Configuration
-
Update
config.phpwith LIVE credentials'env' => 'live', // Change from 'sandbox' 'client_id' => 'YOUR_LIVE_CLIENT_ID', 'client_secret' => 'YOUR_LIVE_CLIENT_SECRET', 'partner_merchant_id' => 'YOUR_LIVE_PARTNER_ID', -
Verify partner merchant ID
- Go to: https://www.paypal.com/businessprofile/settings
- Account IDs section
- Copy your Merchant ID (Payer ID)
- Paste into
config.php
-
Update base_url
'base_url' => 'https://yourdomain.com/payp', // Your actual domain -
Enable HTTPS
- PayPal requires HTTPS in production
- Install SSL certificate
- Force HTTPS in Apache/Nginx
🔒 Security
-
Secure storage directory
# Add to .htaccess in /data folder Deny from all -
File permissions
chmod 700 data/ chmod 600 data/*.json -
Environment variables (recommended)
- Move sensitive config to environment variables
- Don't commit credentials to Git
-
Add CSRF protection
- Add tokens to forms
- Validate on submission
-
Rate limiting
- Limit onboarding requests per IP
- Prevent abuse
📝 User Communication
-
Onboarding instructions page
- Clear step-by-step guide
- Screenshots of PayPal flow
- What to expect at each step
- Troubleshooting tips
-
Email templates
- Welcome email after successful connection
- Reminder email for incomplete onboarding
- Support contact information
-
Help documentation
- FAQ about merchant onboarding
- Common issues and solutions
- How to reconnect if needed
🧪 Testing
-
Test with LIVE PayPal sandbox first
- Use PayPal sandbox with production code
- Verify all flows work
-
Test complete onboarding
- Full business account creation
- Email verification
- Bank account linking (if required)
- Return to your app
-
Test incomplete onboarding
- Verify warning messages show
- Verify no bad data is saved
- Test retry flow
-
Test sync functionality
- Manually trigger sync
- Verify it finds completed merchants
- Verify it marks incomplete ones
-
Test payment creation
- Create orders with connected merchants
- Verify proper merchant_id routing
- Test capture flow
📊 Monitoring
-
Log monitoring
- Set up alerts for errors
- Monitor
return_debug.json - Monitor
sync_debug.json
-
Merchant status tracking
- Dashboard for admin to view all merchants
- Filter by status (connected, incomplete, pending)
- Export functionality
-
Automated sync
- Cron job to run sync_merchants.php
- Schedule: Every 5-10 minutes
- Alert on repeated failures
-
Metrics tracking
- Onboarding completion rate
- Average time to complete
- Common drop-off points
- Failed onboarding reasons
🔄 Ongoing Maintenance
-
Weekly review
- Check incomplete onboardings
- Follow up with merchants
- Resolve issues
-
Monthly cleanup
- Archive old completed entries
- Remove abandoned onboardings (>30 days old)
- Backup data files
-
Quarterly updates
- Check for PayPal API changes
- Update partner integration if needed
- Review and update documentation
🆘 Support Process
-
Support email/form
- Dedicated support for onboarding issues
- Quick response time (<24 hours)
-
Troubleshooting guide for support team
- How to check merchant status
- How to trigger manual sync
- How to view debug logs
- When to escalate to PayPal
-
Partner support contact
- PayPal Partner Support phone/email
- Your Partner Manager contact
- Escalation process
📋 Pre-Launch Test Cases
Test Case 1: Happy Path ✅
- Merchant clicks "Connect with PayPal"
- Completes entire onboarding at PayPal
- Returns to your app
- Sees success message
- Merchant ID saved correctly
- Can create and capture payments
Test Case 2: Incomplete Onboarding ⚠️
- Merchant clicks "Connect with PayPal"
- Closes browser without completing
- Returns to your app (manually)
- Sees warning message
- NO merchant ID saved
- Can retry onboarding
Test Case 3: Delayed Propagation ⏳
- Merchant completes onboarding
- Returns to your app
- Merchant ID not immediately available
- Clicks "Sync Now"
- System retrieves merchant ID
- Status updated to connected
Test Case 4: Multiple Merchants 👥
- Connect merchant A (complete)
- Connect merchant B (incomplete)
- Connect merchant C (complete)
- Dashboard shows correct status for each
- Can create orders ONLY for A and C
Test Case 5: Reconnection 🔄
- Merchant was incomplete
- Clicks "Connect with PayPal" again
- Completes full onboarding
- Returns successfully
- Status updated from incomplete to connected
🔍 Production Readiness Checklist
Code Quality
- Error handling for all API calls
- Input validation on all forms
- SQL injection protection (if using DB)
- XSS protection
- Proper logging (not echo/print_r)
Performance
- Response times < 2 seconds
- Optimize database queries (if using DB)
- Cache frequently accessed data
- CDN for static assets
Scalability
- Can handle 100+ merchants
- Concurrent onboarding requests
- File storage vs. database decision
- Backup strategy
🎯 Launch Day
- Deploy to production
- Verify configuration
- Test one complete onboarding
- Monitor logs for 24 hours
- Have support team ready
- Gradual rollout (if possible)
📞 Emergency Contacts
- PayPal Partner Support: _________________
- PayPal Technical Issues: _________________
- Your DevOps Team: _________________
- Your Manager: _________________
🎉 Post-Launch (First Week)
- Day 1: Monitor every hour
- Day 2-3: Monitor every 4 hours
- Day 4-7: Monitor twice daily
- Review all incomplete onboardings
- Gather user feedback
- Document any issues found
- Plan improvements
📌 Remember
The fix ensures that incomplete onboardings are properly detected and handled. Your main job now is to help merchants complete the full PayPal business account setup process. Communication is key! 🗝️
Need Help?
Refer back to:
SOLUTION_SUMMARY.md- Understanding the fixFLOW_DIAGRAM.md- Visual representationREADME_ONBOARDING_FIX.md- Detailed technical docsQUICK_START.md- Testing guide
Good luck with your launch! 🚀