mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 20:36:38 -04:00
Add unprocessed pending payments watchdog
This commit is contained in:
parent
1c055d3e6f
commit
2dd89c310f
3 changed files with 32 additions and 0 deletions
22
scripts/pending-payments-watchdog
Normal file
22
scripts/pending-payments-watchdog
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/php
|
||||
<?
|
||||
|
||||
require_once('/standardebooks.org/web/lib/Core.php');
|
||||
|
||||
$pendingPayments = Db::Query('
|
||||
SELECT *
|
||||
from PendingPayments
|
||||
where ProcessedOn is not null
|
||||
');
|
||||
|
||||
if(sizeof($pendingPayments) > 0){
|
||||
$em = new Email();
|
||||
$em->To = ADMIN_EMAIL_ADDRESS;
|
||||
$em->From = ADMIN_EMAIL_ADDRESS;
|
||||
$em->Subject = 'Unprocessed payment in database';
|
||||
$em->Body = Template::EmailAdminUnprocessedDonations();
|
||||
$em->TextBody = Template::EmailAdminUnprocessedDonationsText();
|
||||
$em->Send();
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue