Project

General

Profile

Actions

Task #797

open

Epic #786: Square Payment Gateway Integration

Feature #793: Core Payment Processing

Error & Retry Handling

Added by Redmine Admin about 2 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
04/22/2026
Due date:
% Done:

0%

Estimated time:

Description

Implement centralized error handling for all Square API calls. Capture error codes/messages and map them to user-friendly responses. Add retry mechanism for transient failures (network issues, timeouts). Ensure retries do not create duplicate payments (use idempotency).

Actions #1

Updated by Deeksha Singh about 1 month ago ยท Edited

Module : Error & Retry Handling

TC_ID_ERROR_01
Title: Verify user-friendly error message for payment failure
Preconditions: Payment API integrated
Steps:

Trigger payment with invalid card
Test Data: Invalid card token
Expected Result: Clear and user-friendly error message is shown (no raw API error)

TC_ID_ERROR_02
Title: Verify system handles Square API error response properly
Preconditions: API returns error
Steps:

Trigger payment
Simulate API error (e.g., 400/500 response)
Test Data: Invalid request / server error
Expected Result: Error is captured, logged, and proper response is returned

TC_ID_ERROR_03
Title: Verify retry mechanism on network failure
Preconditions: Retry logic implemented
Steps:

Trigger payment
Simulate network timeout
Test Data: Timeout scenario
Expected Result: System retries automatically and completes payment if possible

TC_ID_ERROR_04
Title: Verify no duplicate payment during retry (idempotency check)
Preconditions: Retry mechanism active
Steps:

Trigger payment
Force retry with same request
Test Data: Same idempotency key
Expected Result: Only one payment is created, no duplicate charge

TC_ID_ERROR_05
Title: Verify retry stops after maximum attempts
Preconditions: Retry limit configured
Steps:

Simulate continuous failure
Test Data: API down scenario
Expected Result: Retry stops after defined limit and error is returned

TC_ID_ERROR_06
Title: Verify error logging for failed transactions
Preconditions: Logging enabled
Steps:

Trigger failed payment
Check logs
Test Data: Failed API response
Expected Result: Error is logged properly without exposing sensitive data

TC_ID_ERROR_07
Title: Verify handling of timeout scenarios
Preconditions: Timeout configured
Steps:

Delay API response
Test Data: Slow response
Expected Result: Timeout error handled properly and retry is triggered

TC_ID_ERROR_08
Title: Verify system stability during multiple failures
Preconditions: System running
Steps:

Trigger multiple failed payments
Test Data: Multiple failure requests
Expected Result: System remains stable and handles errors gracefully

TC_ID_ERROR_09
Title: Verify proper mapping of Square error codes to system messages
Preconditions: Error mapping implemented
Steps:

Trigger different types of errors
Test Data: Card error, validation error, server error
Expected Result: Correct user-friendly message shown for each error

TC_ID_ERROR_10
Title: Verify retry is not triggered for non-retryable errors
Preconditions: Retry logic implemented
Steps:

Trigger validation error (e.g., invalid card)
Test Data: Non-retryable error
Expected Result: No retry attempt, error shown directly

Actions

Also available in: Atom PDF