mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 18:11:52 -04:00
Add logic for accepting payments from soft credits marked as 'anonymous'
This commit is contained in:
parent
7b278da43a
commit
c9e5026cf4
2 changed files with 9 additions and 4 deletions
|
@ -153,8 +153,14 @@ try{
|
|||
$payment->IsMatchingDonation = true;
|
||||
}
|
||||
|
||||
// Sometimes a soft credit is `Anonymous` or `Anonymous Anonymous`.
|
||||
// See donation `7f296e18-6492-48e1-aeca-5063c6a0bbbb`.
|
||||
if($hasSoftCredit && preg_match('/Anonymous(\s*Anonymous)*/ius', $payment->User->Name)){
|
||||
$payment->User = null;
|
||||
}
|
||||
|
||||
// We can get here via an AOGF donation that is anonymous.
|
||||
if(!$hasSoftCredit && ($payment->User->Email == 'Not provided' || $payment->User->Email == '')){
|
||||
if(!$hasSoftCredit && ($payment->User?->Email == 'Not provided' || $payment->User?->Email == '')){
|
||||
$payment->User = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue