The PowerTranz gateway includes comprehensive logging to help diagnose payment issues. This guide explains how to enable debug mode and interpret log files.
Enabling Debug Mode
To enable detailed logging for the PowerTranz gateway:
- Go to WooCommerce → Settings → Payments
- Click Manage next to PowerTranz
- Scroll to the Debug Log option (“Advanced” Tab)
- Check the box to Enable logging
- Click Save changes
Important: Only enable debug mode when troubleshooting. Disable it in production to avoid filling up your server with log files.
Accessing Log Files
WooCommerce stores all gateway logs in a central location:
- Go to WooCommerce → Status → Logs
- From the dropdown, select files starting with
powertranz- - Click View to see the log contents
Log files are named with the date, for example: powertranz-2024-01-15-abc123.log
What Gets Logged
When debug mode is enabled, the gateway logs:
- API Requests – Data sent to PowerTranz (card details are masked)
- API Responses – Full responses from PowerTranz servers
- 3D Secure Events – Authentication requests and results
- Error Messages – Detailed error information with response codes
- Webhook/Callback Data – Incoming notifications from PowerTranz
- Token Operations – Card tokenization and saved card transactions
Understanding Log Entries
A typical log entry looks like this:
2024-01-15T10:30:45+00:00 INFO PowerTranz Auth Request: Order #1234
2024-01-15T10:30:46+00:00 INFO PowerTranz Response: Approved (ResponseCode: 00)
2024-01-15T10:30:46+00:00 INFO Transaction ID: PTZ-987654321
Key elements to look for:
- Timestamp – When the event occurred
- Log Level – INFO, WARNING, or ERROR
- Message – Description of what happened
- ResponseCode – The code returned by PowerTranz
- Transaction ID – Unique identifier for the transaction
Common Log Patterns
Successful Transaction
INFO PowerTranz Auth Request: Order #1234
INFO PowerTranz Response: Approved (ResponseCode: 00)
INFO Order #1234 payment complete. Transaction ID: PTZ-987654321
Declined Transaction
INFO PowerTranz Auth Request: Order #1234
WARNING PowerTranz Response: Declined (ResponseCode: 05)
WARNING Order #1234 payment failed: Do Not Honour
3D Secure Flow
INFO 3DS Authentication Required for Order #1234
INFO 3DS Challenge URL received, redirecting customer
INFO 3DS Callback received for Order #1234
INFO 3DS Authentication successful (ECI: 05)
INFO PowerTranz Auth Request: Order #1234 (3DS Authenticated)
API Connection Error
ERROR PowerTranz API Request Failed: Order #1234
ERROR cURL error 28: Connection timed out after 30000 milliseconds
Troubleshooting with Logs
When diagnosing issues:
- Find the order number – Search the log for the specific order ID
- Check the ResponseCode – Cross-reference with the error codes documentation
- Look for ERROR entries – These indicate problems that need attention
- Review the sequence – Ensure all expected steps occurred in order
- Check timestamps – Long gaps may indicate timeout issues
Log File Location on Server
If you need to access logs directly via FTP or SSH, they are stored at:
wp-content/uploads/wc-logs/powertranz-YYYY-MM-DD-hash.log
Security Considerations
- Sensitive data is masked – Full card numbers are never logged
- Disable in production – Only enable when actively troubleshooting
- Clear old logs – Periodically delete old log files
- Protect the logs folder – Ensure your
wc-logsfolder is not publicly accessible
Sharing Logs with Support
When contacting support, include relevant log entries. Before sharing:
- Copy only the entries related to the problematic transaction
- Include the full timestamp range
- Note the order number and approximate time of the issue
- Verify no sensitive customer data is included
Next: FAQ – Answers to frequently asked questions about the gateway.