added Mercado Pago integration with new payment handling functions and updated app routing

This commit is contained in:
Lucas Tettamanti
2026-01-15 13:06:37 -03:00
parent 29fa2d127e
commit eedd16afdb
13 changed files with 1652 additions and 5 deletions

View File

@@ -0,0 +1,19 @@
-- migrate:up
create table if not exists mp_payments (
tenant_id uuid not null references tenants(id) on delete cascade,
woo_order_id bigint null,
preference_id text null,
payment_id text null,
status text null,
paid_at timestamptz null,
raw jsonb not null default '{}'::jsonb,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
primary key (tenant_id, payment_id)
);
create index if not exists mp_payments_tenant_order_idx
on mp_payments (tenant_id, woo_order_id);
-- migrate:down
drop table if exists mp_payments;