Fix logic in payment process script

This commit is contained in:
Alex Cabal 2024-12-05 10:46:24 -06:00
parent c28cfcda9f
commit c30d79138a

View file

@ -82,7 +82,7 @@ try{
)
', [$pendingPayment->TransactionId])){
$log->Write('Donation already exists in database.');
continue 2; // `switch` is considered a "loop" by PHP.
break;
}
$driver->get('https://fundraising.fracturedatlas.org/admin/donations?query=' . $pendingPayment->TransactionId);
@ -115,7 +115,7 @@ try{
}
catch(Exception){
$log->Write('Error: Couldn\'t find donation.');
continue 2; // `switch` is considered a "loop" by PHP.
break;
}
$toggleButton->click();
@ -185,7 +185,7 @@ try{
catch(Exceptions\PaymentExistsException){
// Payment already exists, just continue.
$log->Write('Donation already in database.');
continue 2; // `switch` is considered a "loop" by PHP.
break;
}
// Does this payment create a new Patron in the Patrons Circle?
@ -290,6 +290,7 @@ try{
$em->Send();
}
}
}
Db::Query('
DELETE
@ -300,7 +301,6 @@ try{
$log->Write('Donation processed.');
}
}
}
catch(Exception $ex){
$exceptionString = vds($ex);
$log->Write('Error: Uncaught exception: ' . $exceptionString);