mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Convert some constants to enums
This commit is contained in:
parent
06425d3dd6
commit
ee7c8343dd
52 changed files with 282 additions and 268 deletions
|
@ -10,7 +10,7 @@ class Payment{
|
|||
public int $PaymentId;
|
||||
public ?int $UserId = null;
|
||||
public DateTimeImmutable $Created;
|
||||
public int $ChannelId;
|
||||
public PaymentProcessor $Processor;
|
||||
public string $TransactionId;
|
||||
public float $Amount;
|
||||
public float $Fee;
|
||||
|
@ -64,7 +64,7 @@ class Payment{
|
|||
|
||||
try{
|
||||
Db::Query('
|
||||
INSERT into Payments (UserId, Created, ChannelId, TransactionId, Amount, Fee, IsRecurring, IsMatchingDonation)
|
||||
INSERT into Payments (UserId, Created, Processor, TransactionId, Amount, Fee, IsRecurring, IsMatchingDonation)
|
||||
values(?,
|
||||
?,
|
||||
?,
|
||||
|
@ -73,7 +73,7 @@ class Payment{
|
|||
?,
|
||||
?,
|
||||
?)
|
||||
', [$this->UserId, $this->Created, $this->ChannelId, $this->TransactionId, $this->Amount, $this->Fee, $this->IsRecurring, $this->IsMatchingDonation]);
|
||||
', [$this->UserId, $this->Created, $this->Processor, $this->TransactionId, $this->Amount, $this->Fee, $this->IsRecurring, $this->IsMatchingDonation]);
|
||||
}
|
||||
catch(Exceptions\DuplicateDatabaseKeyException){
|
||||
throw new Exceptions\PaymentExistsException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue