Skip to content

Conversation

@joel-pcg
Copy link
Contributor

@joel-pcg joel-pcg commented Apr 9, 2025

New Features

1. Payment Processing with Token + 3DS

  • We implemented full payment processing flow using card tokens with 3DS authentication
  • Support for all 3DS authentication scenarios:
  • Direct authentication (frictionless)
  • 3DS Method (method notification)
  • 3DS Challenge (redirection for cardholder authentication)
  • Automatic secure session management to maintain state during 3DS flow

2. Hold Authorization Processing

  • Implemented hold flow with support for 3DS
  • Allows separation of authorization process from capture process
  • Fully integrated functionality with 3DS to meet regulatory requirements

Test Coverage

We created a robust test suite that verifies:

  • Unit tests for SecureTokenSale: Verification of all 3DS scenarios
  • Full flow tests: Tokenization → Secure Sale → 3DS Authentication
  • Individual method tests:
  • process_token_sale: Token sales processing
  • process_hold: Hold authorization processing

@joel-pcg joel-pcg marked this pull request as draft April 9, 2025 18:10
@joel-pcg joel-pcg marked this pull request as ready for review April 9, 2025 18:10
@joel-pcg joel-pcg marked this pull request as draft April 9, 2025 18:15
@joel-pcg joel-pcg marked this pull request as ready for review April 9, 2025 18:15
…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
Copy link
Member

@gustavovalverde gustavovalverde left a 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:
Copy link
Member

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)}")
Copy link
Member

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', {
Copy link
Member

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
Copy link
Member

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"
Copy link
Member

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

@gustavovalverde gustavovalverde changed the title Implementation of Payment with Token + 3DS and Hold Authorization feat: add 3DS auth with token sale May 6, 2025
@gustavovalverde gustavovalverde merged commit f313e28 into indexa-git:main May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants