From 987f3219a90ba7e60cde389c25e436dbd19eb112 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 18 Jul 2022 10:16:17 -0500 Subject: [PATCH] Remove FA workaround code now that they fixed their bug --- www/webhooks/zoho.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/www/webhooks/zoho.php b/www/webhooks/zoho.php index 0950de9f..6bdc5c86 100644 --- a/www/webhooks/zoho.php +++ b/www/webhooks/zoho.php @@ -37,25 +37,7 @@ try{ if(sizeof($matches) == 2){ $transactionId = $matches[1]; - // FA has a bug where some anonymous donations can't be found in their search form, - // so we aren't able to get them programatically later. Therefore, store anonymous donations right now - // instead of queueing them for later retrieval. - if(preg_match('/Donor: Anonymous/u', $data->html) === 1){ - $payment = new Payment(); - $payment->ChannelId = PAYMENT_CHANNEL_FA; - $payment->TransactionId = $transactionId; - $payment->Created = new DateTime(); - $payment->IsRecurring = stripos($data->subject, 'recurring') !== false; - preg_match('/Amount: \$([\d\.]+)/u', $data->html, $matches); - if(sizeof($matches) == 2){ - $payment->Amount = $matches[1]; - $payment->Fee = $payment->Amount - ($payment->Amount / 1.087); - } - $payment->Create(); - } - else{ - Db::Query('INSERT into PendingPayments (Created, ChannelId, TransactionId) values (utc_timestamp(), ?, ?);', [PAYMENT_CHANNEL_FA, $transactionId]); - } + Db::Query('INSERT into PendingPayments (Created, ChannelId, TransactionId) values (utc_timestamp(), ?, ?);', [PAYMENT_CHANNEL_FA, $transactionId]); $log->Write('Donation ID: ' . $transactionId); }