From 06bdda15965451802ba6b6bd4b3459ef5458d433 Mon Sep 17 00:00:00 2001 From: Bob Wezelman Date: Thu, 20 Jun 2024 10:18:53 +0200 Subject: [PATCH] Fix error if other scopes are available (#20) --- src/Http/Controllers/FinishTransactionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/FinishTransactionController.php b/src/Http/Controllers/FinishTransactionController.php index fb9635c..012b6fc 100644 --- a/src/Http/Controllers/FinishTransactionController.php +++ b/src/Http/Controllers/FinishTransactionController.php @@ -45,7 +45,7 @@ public function __invoke(Request $request, Magento $magento) if (!data_get($response, 'data.paynlGetTransaction.isSuccess', false)) { // https://github.com/paynl/magento2-graphql/blob/dcc3df5efceb43f6b8ec2c26833de7c52da0e564/Model/Resolver/RestoreCart.php#L66 - config('rapidez.models.sales_order')::where('increment_id', $incrementId)->with(['quote' => fn($builder) => $builder->withoutGlobalScope(new IsActiveScope)])->first()->quote->update(['is_active' => 1]); + config('rapidez.models.sales_order')::where('increment_id', $incrementId)->with(['quote' => fn($builder) => $builder->withoutGlobalScopes()])->first()->quote->update(['is_active' => 1]); return redirect(config('rapidez.paynl.fail_url')); }