Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

KalimeroMK's avatar

Pass data to payment controller

hi I integrateing stripe on my page now after client fill the form ( select dates room flor and .....) on post i process all data in a methot to see id room is free calculate price discounts ... now my question is how to pass amount and email to the stripe billing form in view and to the controller to make payment amount dynamic

0 likes
1 reply
KalimeroMK's avatar
 $data = ['amount' => $amount,'email'=>$email];
        return redirect()->route('stripe')->with($data);

a will send data too stripe view method

public function stripe(Request $request)
    {
        return view('stripe');
    }

so I can show amount in form and then on post to send to the stripe controller or my logic is bed

Please or to participate in this conversation.