Skip to content

feat: Smart Checkout con múltiples métodos de pago#3

Open
mateogs wants to merge 2 commits intomainfrom
feature/smart-checkout-payment-methods
Open

feat: Smart Checkout con múltiples métodos de pago#3
mateogs wants to merge 2 commits intomainfrom
feature/smart-checkout-payment-methods

Conversation

@mateogs
Copy link
Copy Markdown
Collaborator

@mateogs mateogs commented Apr 2, 2026

Resumen

  • Agrega soporte para Smart Checkout de Fintoc, permitiendo ofrecer múltiples métodos de pago (transferencia bancaria, tarjeta de crédito/débito y BNPL) en una sola sesión de checkout.
  • Nuevo campo multiselect en la configuración de admin para que el comerciante elija qué métodos de pago habilitar.
  • Se envía payment_method_types en el payload de creación de checkout sessions hacia la API de Fintoc.

Cambios

  • Model/Config/Source/PaymentMethodTypes.php — Nuevo source model con las opciones: bank_transfer, card, installments_payment.
  • etc/adminhtml/config/payment_methods/redirect.xml — Campo multiselect "Payment Methods" en la sección Payment Initiation del admin.
  • etc/config.xml — Valor por defecto bank_transfer para compatibilidad hacia atrás.
  • Api/ConfigurationServiceInterface.php / Service/ConfigurationService.php — Nuevo método getPaymentMethodTypes().
  • Service/Checkout/RequestBuilder.php — Inyecta ConfigurationService y agrega payment_method_types al payload del checkout session.

Notas

  • No requiere cambios en el frontend: el flujo de redirect ya maneja la selección de método de pago en la página hosted de Fintoc.
  • No requiere cambios en webhooks: los handlers existentes (payment_intent.succeeded, checkout_session.finished, etc.) ya cubren todos los eventos.
  • Por defecto solo queda habilitado bank_transfer, por lo que no hay cambio de comportamiento para comerciantes existentes.

Plan de pruebas

  • Verificar que con la config por defecto (bank_transfer) el comportamiento es idéntico al actual
  • Habilitar card en el admin y verificar que el checkout de Fintoc muestra la opción de tarjeta
  • Habilitar installments_payment y verificar que aparece la opción BNPL (requiere monto entre CLP 20.000 y 400.000)
  • Verificar que los webhooks procesan correctamente pagos realizados con tarjeta
  • Confirmar que el campo multiselect se guarda y lee correctamente a nivel website scope

🤖 Generated with Claude Code

mateogs and others added 2 commits April 2, 2026 12:20
Adds a new admin multiselect field allowing merchants to choose which
payment methods (bank_transfer, card, installments_payment) to offer
at checkout. Defaults to bank_transfer for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Injects ConfigurationService into RequestBuilder to pass the configured
payment method types to the Fintoc API, enabling Smart Checkout with
multiple payment methods (bank transfer, card, BNPL).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant