Skip to main content

Agnostic SDK for payments like cybersource, Paypal and local payments

Project description

Sincpro Payments SDK

SDK para integración con pasarelas de pago y servicios bancarios, construido sobre el Sincpro Framework con arquitectura hexagonal.


Bounded Contexts

cybersource — Pagos con tarjeta (Cybersource)

Proveedor: Cybersource / Linkser

Use case Command
Tokenizar tarjeta CommandCreatePaymentMethod
Tokenizar tarjeta + cliente CommandCreateCustomerPaymentMethod
Pago tarjeta nueva (enrollment) CommandPayNewCardEnrollment
Pago tarjeta nueva (validación) CommandPayNewCardValidation
Pago tarjeta guardada (enrollment) CommandPaySavedCardEnrollment
Pago tarjeta guardada (validación) CommandPaySavedCardValidation
Pago recurrente CommandRecurringPayment
Cancelar / reembolso CommandCancelOrRefund
Pre-pago: setup auth CommandSetupAuth
Pre-pago: iniciar monitor CommandStartMonitorAuth
Pre-pago: verificar 3DS CommandCheckRequireAuth
Pre-pago: validar auth CommandValidateAuth
from sincpro_payments_sdk.apps.cybersource import cybersource, tokenization

result = cybersource(
    tokenization.CommandCreatePaymentMethod(...),
    tokenization.ResponseCreatePaymentMethod,
)

qr — Pagos QR

Tres proveedores bajo el mismo bounded context:

BNB

Use case Command
Autenticar CommandAuthenticateBNB
Crear QR CommandCreateQR
Verificar estado CommandCheckQRStatus
Listar QRs CommandListQRs
Cancelar QR CommandCancelQR

Banco Económico

Use case Command
Autenticar CommandAuthenticateEconomico
Crear QR CommandCreateQR
Verificar estado CommandCheckQRStatus
QRs cobrados CommandGetPaidQRs
Cancelar QR CommandCancelQR

Linkser

Use case Command
Crear QR CommandCreateQR
Verificar estado CommandCheckQRStatus
from sincpro_payments_sdk.apps.qr import qr, economico, bnb, linkser

auth = qr(
    economico.CommandAuthenticateEconomico(user_name="...", password="...", aes_key="..."),
    economico.ResponseAuthenticateEconomico,
)
qr_image = qr(economico.CommandCreateQR(...), economico.ResponseCreateQR)

bank_account — Extractos bancarios (Banco Económico)

Use case Command
Autenticar CommandAuthenticateEconomico
Consultar movimientos CommandGetMovements
from sincpro_payments_sdk.apps.bank_account import bank_account, economico

auth = bank_account(
    economico.CommandAuthenticateEconomico(user_name="...", password="...", aes_key="..."),
    economico.ResponseAuthenticateEconomico,
)
movements = bank_account(
    economico.CommandGetMovements(account_code="...", start_date=..., end_date=...),
    economico.ResponseGetMovements,
)

Documentación

Documentación detallada de DTOs, Features y Application Services disponible en generated_docs/site/index.html.

Para regenerar:

make docs

Desarrollo

make install          # instalar dependencias
make format           # formatear código (obligatorio antes de commit)
make test             # ejecutar tests
make test_one t=<archivo>  # test específico

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sincpro_payments_sdk-5.0.0.tar.gz (70.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sincpro_payments_sdk-5.0.0-py3-none-any.whl (108.5 kB view details)

Uploaded Python 3

File details

Details for the file sincpro_payments_sdk-5.0.0.tar.gz.

File metadata

  • Download URL: sincpro_payments_sdk-5.0.0.tar.gz
  • Upload date:
  • Size: 70.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for sincpro_payments_sdk-5.0.0.tar.gz
Algorithm Hash digest
SHA256 8946adaa0539c1a28cdac82e72b3c66a48eb4ced2530bbb9fcd37400760e047a
MD5 c69aead862df8b73a7734096e358d17e
BLAKE2b-256 1673239997d3f0a373c1544305ba8abccea8e6bf9434f0e64bf2dc36a64b48f7

See more details on using hashes here.

File details

Details for the file sincpro_payments_sdk-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: sincpro_payments_sdk-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 108.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.3 Linux/6.14.0-1017-azure

File hashes

Hashes for sincpro_payments_sdk-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 defaa460d3f987acd6d52b5753d352c94d737c13e9889b84d86b314268d538d3
MD5 e99bea2802cba0e085f68cd1eef8549c
BLAKE2b-256 6a7a1045ecc5faf62dad522110c0d5cfa82a19fa8b996dd0a673d00af0c379b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page