mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 12:54:48 -04:00
Correctly process matching donations from funds
This commit is contained in:
parent
daee86b919
commit
06096fa7dd
4 changed files with 19 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/php
|
||||
<?
|
||||
// Note: This script must be run as a user with a $HOME directory, otherwise Firefox won't be able to start with a profile.
|
||||
// Note: This script must be run as a user with a `$HOME` directory, otherwise Firefox won't be able to start with a profile.
|
||||
|
||||
/**
|
||||
* FA is unreliable in the email notifications it sends. They are often missing.
|
||||
|
@ -50,8 +50,8 @@ $transactionIds = [];
|
|||
$today = NOW->format('n/j/Y');
|
||||
$faItemsPerPage = 20; // How many items are on a full page of FA results?
|
||||
|
||||
// General plan: Read /tmp/last-fa-donation to see what the last transaction ID was that we processed.
|
||||
// If /tmp/last-fa-donation doesn't exist, get all transactions from today and create the file.
|
||||
// General plan: Read `/tmp/last-fa-donation` to see what the last transaction ID was that we processed.
|
||||
// If `/tmp/last-fa-donation` doesn't exist, get all transactions from today and create the file.
|
||||
|
||||
function InsertTransaction(string $transactionId): bool{
|
||||
$exists = Db::QueryBool('SELECT exists(
|
||||
|
@ -222,7 +222,7 @@ catch(Exception $ex){
|
|||
$em->Send();
|
||||
}
|
||||
finally{
|
||||
// `$driver` may be unintialized if we ctrl + c during Selenium initialization.
|
||||
// `$driver` may be unintialized if we `ctrl + c` during Selenium initialization.
|
||||
/** @phpstan-ignore nullsafe.neverNull */
|
||||
$driver?->quit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue