diff --git a/src/Mollie/UpdateMolliePayment.php b/src/Mollie/UpdateMolliePayment.php index a4eb9a1..4bf6c39 100644 --- a/src/Mollie/UpdateMolliePayment.php +++ b/src/Mollie/UpdateMolliePayment.php @@ -13,8 +13,8 @@ class UpdateMolliePayment extends BaseMollieInteraction implements Contract public function execute(Payment $dirtyPayment, ?ProvidesOauthInformation $model = null): Payment { $this->setAccessToken($model); - - if ($model->isMollieTestmode()) { + + if ($model?->isMollieTestmode()) { $dirtyPayment->mode = 'test'; }