Using Larval middleware to redirect user to seperate domain

hope someone can assist me with this. so am trying to tackle an issue on my website just to summarize it. I want to add a feature when a user tries to make a payment from my website or subscribe to a plan I want them to be redirected to my company website where they will have payment captured and then redirected back to the main site and have their balance updated or subscription active on main site I was told to use middleware since am using the latest version of laravel but don’t know how to go about this I found this reply from @willstumpf

and I saw someone with something similar and on inspecting their website found them to be using middleware code sample

<input type="hidden" id="pay_auth" name="auth" value="randomvalue">
<input type="hidden" id="middleware" name="middleware" value="">
<input type="hidden" id="account" name="account" value="paypal_3">
<p class="btnpay" style="cursor: pointer;" uid="14428721" mid="3" family="0">Pay $5.99</p>

in other words, I want my payment to be captured on a separate site but redirected to where the product is being sold after payment completion with success status.
Pretty new to laravel but will appreciate some guidance from the community.

Source: Laravel

Leave a Reply