From 3d79f8bde3b3df54085894edfefef149d1087f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Thu, 25 May 2023 16:02:35 +0200 Subject: [PATCH] refix transaction --- app/Models/Payment/Transaction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Payment/Transaction.php b/app/Models/Payment/Transaction.php index a68d640..7051e00 100644 --- a/app/Models/Payment/Transaction.php +++ b/app/Models/Payment/Transaction.php @@ -269,7 +269,7 @@ class Transaction extends Model public function assignPaymentId(string $foreign_id): void { $foreign_id = self::getPaymentForeignKeyName($this->payment_mode, $foreign_id); - if ($this->attributes['foreign_id'] === $foreign_id) { + if (($this->attributes['foreign_id'] ?? null) === $foreign_id) { return; } if (!\is_numeric($this->payment_mode->value)) { @@ -293,7 +293,7 @@ class Transaction extends Model public function assignRefundId(string $foreign_refund_id): void { $foreign_refund_id = self::getPaymentForeignKeyName($this->payment_mode, $foreign_refund_id); - if ($this->attributes['foreign_refund_id'] === $foreign_refund_id) { + if (($this->attributes['foreign_refund_id'] ?? null) === $foreign_refund_id) { return; } if (!\is_numeric($this->payment_mode->value)) {