-
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add 3DS auth with token sale #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…plement secure session management, and add detailed logging for transaction processing
- Create FastAPI webapp to demonstrate card tokenization - Implement web interface for step-by-step flow (token → payment → result) - Add full 3DS support (method and challenge) - Resolve session persistence issue between HTTP requests - Optimize error handling and result display
6b6d530 to
93774b6
Compare
gustavovalverde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but need another PR to standardize to English, and fix the examples.
| @@ -0,0 +1,415 @@ | |||
| """ | |||
| Mini aplicación FastAPI para demostrar el flujo completo de pagos con token y 3DS: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate it to English
| return response | ||
|
|
||
| except AzulError as e: | ||
| logger.error(f"Error en Azul al procesar pago: {str(e)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logs, comments and responses in English
| showResult({ message: "Iniciando proceso de pago..." }, 'processing'); | ||
|
|
||
| const response = await fetch('/process-payment', { | ||
| const response = await fetch('/process-hold', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it indicate is a process-hold, but above and below it indicate it's a payment not a hold
| client = Mock() | ||
| client._async_request = AsyncMock() | ||
| client.settings = Mock() | ||
| client.settings.MERCHANT_ID = "39038540035" # Using the MERCHANT_ID from .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use a hardcoded value here, it should use an environment variable
| return DataVaultCreateModel( | ||
| CardNumber="4111111111111111", # Test Visa card | ||
| Expiration="202812", | ||
| store="39038540035" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use a hardcoded value here, it should use an environment variable
New Features
1. Payment Processing with Token + 3DS
2. Hold Authorization Processing
Test Coverage
We created a robust test suite that verifies:
SecureTokenSale: Verification of all 3DS scenariosprocess_token_sale: Token sales processingprocess_hold: Hold authorization processing