Task #813
openEpic #786: Square Payment Gateway Integration
Feature #811: Customer Management
Store Customer Mapping
0%
Description
Store Square Customer ID in local database against the application user. This mapping will be reused for future transactions.
Updated by Deeksha Singh about 1 month ago
Module: Store Customer Mapping (Square payment )
TC_ID_CUSTOMER_MAP_01
Title: Verify Square customer ID is stored after customer creation
Preconditions: Customer created in Square
Steps:
Create customer via API
Check database
Test Data: Valid customer_id
Expected Result: Customer ID is stored against correct user
TC_ID_CUSTOMER_MAP_02
Title: Verify correct mapping between user and customer ID
Preconditions: Customer exists in Square
Steps:
Fetch user record from DB
Compare with Square data
Test Data: user_id, customer_id
Expected Result: Correct mapping is maintained
TC_ID_CUSTOMER_MAP_03
Title: Verify existing customer ID is reused for future payments
Preconditions: Customer ID already stored
Steps:
Perform another payment
Check API request
Test Data: Same user
Expected Result: Existing customer_id is used
TC_ID_CUSTOMER_MAP_04
Title: Verify no duplicate customer mapping is created
Preconditions: Customer mapping already exists
Steps:
Trigger customer creation again
Test Data: Same user
Expected Result: No duplicate entry in DB
TC_ID_CUSTOMER_MAP_05
Title: Verify new customer is created if mapping is missing
Preconditions: User exists but no customer ID stored
Steps:
Initiate payment
Test Data: User without mapping
Expected Result: New customer is created and stored
TC_ID_CUSTOMER_MAP_06
Title: Verify mapping is not stored if customer creation fails
Preconditions: Simulate API failure
Steps:
Attempt to create customer
Test Data: API failure
Expected Result: No customer ID stored in DB
TC_ID_CUSTOMER_MAP_07
Title: Verify mapping persists across sessions
Preconditions: Customer mapping exists
Steps:
Logout and login
Perform payment
Test Data: Same user
Expected Result: Same customer_id is reused
TC_ID_CUSTOMER_MAP_08
Title: Verify handling of invalid customer ID
Preconditions: Invalid customer ID stored
Steps:
Attempt payment
Test Data: Invalid customer_id
Expected Result: Error handled or new valid customer created
Updated by Deeksha Singh about 1 month ago
- Status changed from New to Ready for Client