Overview
The payment receipt validation logic has no test that verifies tampered or replayed receipts are rejected. Without this test, a bypass via receipt manipulation would go undetected.
Specifications
Features:
- Write tests for: valid receipt (accepted), tampered receipt (rejected), expired receipt (rejected), replayed receipt (rejected)
- Mock the App Store / Play Store validation endpoint
Tasks:
- Create test fixtures for each receipt scenario
- Mock the validation endpoint responses
- Assert correct outcome for each scenario
Impacted Files:
src/services/mobilePayments.ts
__tests__/mobilePayments.test.ts
Acceptance Criteria
- Tampered receipts are rejected in all test scenarios
- Replayed receipts are detected and rejected
- Tests run without actual App Store / Play Store connectivity
Overview
The payment receipt validation logic has no test that verifies tampered or replayed receipts are rejected. Without this test, a bypass via receipt manipulation would go undetected.
Specifications
Features:
Tasks:
Impacted Files:
src/services/mobilePayments.ts__tests__/mobilePayments.test.tsAcceptance Criteria