refactor!: reorganize models by business domain and improve 3DS handling #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a comprehensive refactoring that delivers two major architectural improvements:
Changes Made
Model Organization Restructure
schemas.py,secure.py) mixing different business domainspayment/- Core payment processing (Sale, Hold, Refund, Void, Post)datavault/- Card tokenization and token managementthree_ds/- 3D Secure authentication and challenge flowspayment_page/- Hosted payment page integrationverification/- Transaction status and verificationSaleinstead ofSaleTransactionModel,Holdinstead ofHoldTransactionModel3D Secure Flow Enhancements
Unified Callback Handling
Enhanced Session Management
Improved Response Processing
_process_3ds_response()with better 3DS requirement detectionTransaction Processing Consolidation
_process_secure_transaction()method eliminates code duplicationTest Structure Improvements
e2e/directory for accurate categorizationDevelopment Experience Improvements
Key Technical Improvements
3DS Session Management
Automatic 3DS Flow Detection
Transaction Status Management
Benefits
For Developers
payment/, 3DS models inthree_ds/, etc.For Production Use
For Maintenance