Project

General

Profile

Actions

Task #818

open

Epic #786: Square Payment Gateway Integration

Feature #816: Tokenized Card Handling

Save Token in DB

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

Status:
Ready for Client
Priority:
Normal
Assignee:
-
Start date:
04/22/2026
Due date:
% Done:

0%

Estimated time:

Description

Store only the token/reference returned by Square in the database. Do not store raw card data. Ensure compliance with PCI standards.

Actions #1

Updated by Deeksha Singh about 1 month ago

Module: Save Token in DB (Square)

TC_ID_TOKEN_DB_01
Title: Verify token is stored in database after successful tokenization
Preconditions: Token generated from Square SDK
Steps:

Complete tokenization
Check database
Test Data: Valid token (nonce)
Expected Result: Token is stored correctly in DB

TC_ID_TOKEN_DB_02
Title: Verify raw card details are not stored in database
Preconditions: Tokenization completed
Steps:

Inspect database Record
Test Data: Card number, CVV
Expected Result: No raw card data stored in DB

TC_ID_TOKEN_DB_03
Title: Verify token is linked to correct user
Preconditions: User logged in
Steps:

Generate token
Check DB mapping
Test Data: user_id, token
Expected Result: Token stored against correct user

TC_ID_TOKEN_DB_04
Title: Verify duplicate tokens are not stored unnecessarily
Preconditions: Same token used multiple times
Steps:

Save token again
Test Data: Same token value
Expected Result: No duplicate entries or handled properly

TC_ID_TOKEN_DB_05
Title: Verify handling of invalid or null token
Preconditions: Token missing or invalid
Steps:

Attempt to save token
Test Data: Null/invalid token
Expected Result: Error shown, token not stored

TC_ID_TOKEN_DB_06
Title: Verify token is securely stored (encrypted/masked if required)
Preconditions: Security rules applied
Steps:

Check DB values
Test Data: Stored token
Expected Result: Token stored securely (not in plain sensitive format if required)

TC_ID_TOKEN_DB_07
Title: Verify token persistence for future transactions
Preconditions: Token already stored
Steps:

Perform payment using saved token
Test Data: Stored token
Expected Result: Token retrieved and used successfully

TC_ID_TOKEN_DB_08
Title: Verify database consistency for token storage
Preconditions: Multiple tokens saved
Steps:

Check DB
Test Data: Multiple user tokens
Expected Result: No null/incorrect entries, proper structure maintained

TC_ID_TOKEN_DB_09
Title: Verify token is not exposed in logs
Preconditions: Logging enabled
Steps:

Save token
Check logs
Test Data: Token value
Expected Result: Token not visible in logs

TC_ID_TOKEN_DB_10
Title: Verify error handling when DB save fails
Preconditions: Simulate DB failure
Steps:

Attempt to save token
Test Data: DB error
Expected Result: Error handled properly, no data corruption

Actions #2

Updated by Abhishek Thakur about 1 month ago

  • Status changed from New to Ready for Client
Actions

Also available in: Atom PDF