diff options
| author | Adam Soltys <[email protected]> | 2025-07-18 10:10:16 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-18 10:10:16 -0700 |
| commit | 3bf2a1d6c7943859537fbf8796a10118894dced6 (patch) | |
| tree | d1baa07b4899c1e9df1860e7a0be71256a8f633a | |
| parent | 8fae698d9ce0f318481ab739a63ea0a580372f86 (diff) | |
| download | coinos-server-3bf2a1d6c7943859537fbf8796a10118894dced6.tar.gz coinos-server-3bf2a1d6c7943859537fbf8796a10118894dced6.zip | |
handle external square payments
| -rw-r--r-- | routes/square.ts | 5 |
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; |
