Laravel payhere integration return url not working
-
payment gateway eka wadakaranawa sandbox eke. payment ekat acc eke pennawa. e unata return_url , cancel_url, notify_url mokut wada karanne nane. checkout page ekatama tamai apahu enne. payment complete unama alert eka nam pennawa pahala script eken
payhere.onCompleted = function onCompleted(orderId) {
alert("Payment completed. OrderID:" + orderId);
// Note: validate the payment and show success or failure page to the customer
};notify url route eke Route::post('/payhere-notify', [HomeController::class, 'payhereNotify']);
me wediyata dumy data tikak dala baluwa notify ekata data aot save wenawada balanna. e unata notify, return url mokut wada na. man live server ekaka test karanne. domain ekat sandbox acc ekata dala thinne. redirect eka wada karanne natte mokada kiyala kiyanawada
-
<input type="hidden" name="return_url" value="{{ url('dashboard_attendee_order_details', { 'reference': paymentDetails.orderReference }) }}">
<input type="hidden" name="cancel_url" value="{{ url('dashboard_attendee_checkout_payhere_failure') }}">
<input type="hidden" name="notify_url" value="{{ url('dashboard_attendee_checkout_payhere_done') }}">you can put the url as this or
<input type="hidden" name="return_url" value="https://<your-domain>/en/dashboard/attendee/my-tickets/568944414af3b06?order_id=568944414af3b06">
-