Skip to content

Commit 63b97bf

Browse files
committed
Added config for success fail redirect path
1 parent a554a07 commit 63b97bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config/rapidez/system.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
'standalone_checkout' => [
3232
// What cache store should be used to store temporary standalone checkout credentials
3333
'cache_store' => env('STANDALONE_CHECKOUT_CACHE_STORE', config('cache.default')),
34+
'success_fail_redirect_path' => 'cart',
3435
],
3536
];

src/Http/Controllers/CheckoutSuccessController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function __invoke(Request $request)
1313
$success = Eventy::filter('checkout.checksuccess', true, $request);
1414

1515
if (! $success) {
16-
return redirect('cart');
16+
return redirect(config('rapidez.standalone_checkout.success_fail_redirect_path', 'cart'));
1717
}
1818

1919
if (is_object($success) && $success instanceof \Symfony\Component\HttpFoundation\Response) {

0 commit comments

Comments
 (0)