From 3bf2a1d6c7943859537fbf8796a10118894dced6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 18 Jul 2025 10:10:16 -0700 Subject: handle external square payments --- routes/square.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/square.ts b/routes/square.ts index f7902e11..8ac559a9 100644 --- a/routes/square.ts +++ b/routes/square.ts @@ -64,7 +64,10 @@ export default { const { data, type, merchant_id } = body; const { payment } = data.object; - if (type === "payment.created" && payment.source_type === "CASH") { + if ( + type === "payment.created" && + (payment.source_type === "CASH" || payment.source_type === "EXTERNAL") + ) { const { amount_money: { amount, currency }, } = payment; -- cgit v1.2.3