mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -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
|
@ -64,12 +64,12 @@ class Payment{
|
|||
if($this->UserId === null){
|
||||
// Check if we have to create a new `User` in the database.
|
||||
|
||||
// If the `User` isn't **null**, then check if we already have this user in our system.
|
||||
// If the `User` isn't `null`, then check if we already have this `User` in our system.
|
||||
if($this->User !== null && $this->User->Email !== null){
|
||||
try{
|
||||
$user = User::GetByEmail($this->User->Email);
|
||||
|
||||
// `User` exists, use their data
|
||||
// `User` exists, use their data.
|
||||
$user->Name = $this->User->Name;
|
||||
$this->User = $user;
|
||||
|
||||
|
@ -82,7 +82,6 @@ class Payment{
|
|||
}
|
||||
catch(Exceptions\UserNotFoundException){
|
||||
// User doesn't exist, create it now.
|
||||
|
||||
try{
|
||||
$this->User->Create();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue