<?php | |
use Laravel\Cashier\Exceptions\IncompletePayment; | |
try { | |
$subscription = $user->newSubscription('default', $planId)->create($paymentMethod); | |
} catch (IncompletePayment $exception) { | |
return redirect()->route( | |
'cashier.payment', | |
[$exception->payment->id, 'redirect' => route('home')] | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment