Jan 8, 2020
0
Level 1
Laravel Cashier 5.8 how to make 3D transaction
I'm trying to make a 3d transaction for a single charge.
public function open(Request $request) {
$user = Auth::user();
$paymentMethodId = $request->input('paymentMethod')
try {
$payment = $user->charge($price * 100, $paymentMethodId);
} catch (IncompletePayment $exception) {
return redirect()->route('cashier.payment',
[$exception->payment->id, 'redirect' => route('payment.close')]);
}
}
//this method is called on route('payment.close')
public function close(Request $request) {
//it return nothing from stripe website
return dd($request->session()->all());
}
How i can get the response back of success or draw back? for subscription there are a column in DB fot this and using
$user->hasIncompletePayment('main')
//or
$user->subscription('default')->hasIncompletePayment()
Please or to participate in this conversation.