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)) {