Skip to content

Commit

Permalink
Fix error if other scopes are available (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Jun 20, 2024
1 parent 3f2d800 commit 06bdda1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/FinishTransactionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
Expand Down

0 comments on commit 06bdda1

Please sign in to comment.