mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 21:04:49 -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
9
templates/EmailAdminUnprocessedDonations.php
Normal file
9
templates/EmailAdminUnprocessedDonations.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Unprocessed donations in database</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>There are unprocessed donations in the database.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
1
templates/EmailAdminUnprocessedDonationsText.php
Normal file
1
templates/EmailAdminUnprocessedDonationsText.php
Normal file
|
@ -0,0 +1 @@
|
||||||
|
There are unprocessed donations in the database.
|
Loading…
Add table
Add a link
Reference in a new issue