aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-07-18 10:10:16 -0700
committerAdam Soltys <[email protected]>2025-07-18 10:10:16 -0700
commit3bf2a1d6c7943859537fbf8796a10118894dced6 (patch)
treed1baa07b4899c1e9df1860e7a0be71256a8f633a
parent8fae698d9ce0f318481ab739a63ea0a580372f86 (diff)
downloadcoinos-server-3bf2a1d6c7943859537fbf8796a10118894dced6.tar.gz
coinos-server-3bf2a1d6c7943859537fbf8796a10118894dced6.zip
handle external square payments
-rw-r--r--routes/square.ts5
1 files changed, 4 insertions, 1 deletions
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;