Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9335479

Browse filesBrowse files
authored
Added exception handling for expired code
1 parent 533d45b commit 9335479
Copy full SHA for 9335479

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ class PaymentController extends Controller
181181
*/
182182
public function redirectToGateway()
183183
{
184-
return Paystack::getAuthorizationUrl()->redirectNow();
184+
try{
185+
return Paystack::getAuthorizationUrl()->redirectNow();
186+
}catch(\Exception $e) {
187+
return Redirect::back()->withMessage(['msg'=>'The paystack token has expired. Please refresh the page and try again.', 'type'=>'error']);
188+
}
185189
}
186190

187191
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.