REST_Controller ekak ekak athule idan payhere site ekata data pass karanne kohomada.. php project ekak curl use karanna puluwanda postman use karana puluwanda
Posts made by SI
-
RE: Laravel payhere integration
-
RE: Laravel payhere integration
@alwismt me hadala thiyena widiyata notify funtion ekak hadala thiyenne. live server ekedi calle wenne ne me funtion eka.. eka thamai awla.. notify calle wenne nethi hethuwak thiyenawada?
-
RE: Laravel payhere integration
@dev_lak ow ehema karama nam prashne hari.. eeth mage notify funtion eka calle wenne ne.. eke thamai mn database update karala thiyenne. ai a?
-
RE: Laravel payhere integration
@alwismt mn live eke thamai me dewal karanne. domain eke nama test kiyala thiyenne. live eke notify funtion eka athule database update query ekak gahala thiyenawa. eeth update wenne ne..
-
RE: Laravel payhere integration
@alwismt ow oi tika wenawa. mage site ekata payhere eken ewanne GET ekak widiyata.. eeth mn hadala thiyenne POST URL ekak.pahala thiyenen mn hadapu URL 3
$app->POST('/payment/notif', PublicJobs::class . ':notify');
$app->POST('/payment/cancel', PublicJobs::class . ':cancel');
$app->POST('/payment/return', PublicJobs::class . ':return'); -
RE: Laravel payhere integration
@dev_lak ow payhere ekata yanawa payment okkoma update wenawa.. eeta passe apassata mage site ekata enakota mama dila thiyena POST URL ekata enawa.. eeth payhere eken ewanne GET url ekak a nisa "Method not allowed. Must be one of: POST" kiyanawa. anika mage notify funtion ekata calle wenneth ne
-
RE: Laravel payhere integration
@alwismt pass wenawa eeth return karanne get ekak mn pahala ewannam return karana URL eka.. mage notify funtion eka call wenneth ne
-
RE: Laravel payhere integration
@root
mama controller eken view ekata pahala thiyena widiyata data tika pass karanawa.controller
$payhere_currency = 'LKR'; $payhere_secret='***'; $merchant_id= '***'; $this->data = [ 'order' => $order, 'total' => $grand_total, 'merchant'=> $merchant_id, ]; return $this->view($response, 'payhere.twig');
view
<form action="https://sandbox.payhere.lk/pay/checkout" method="POST">
<input type="hidden" name="merchant_id" value="{{merchant}}"> <!-- Replace your Merchant ID -->
<input type="hidden" name="notify_url" value="{{'/payment/notify'|page}}">
<input type="hidden" name="cancel_url" value="{{'/payment/cancel'|page}}">
<input type="hidden" name="return_url" value="{{'/payment/return'|page}}">
<input type="text" name="order_id" value="{{order}}">
<input type="text" name="items" value="Door bell wireless"><br>
<input type="text" name="currency" value="LKR">
<input type="text" name="amount" value="{{grand_total}}">
<input type="submit" value="Continue to checkout" class="btn">
</form>payhere site ekata gihilla payhere eken ewanne "retutn" ekak.. "notify" ekak nemei
$app->POST('/payment/notif', PublicJobs::class . ':notify');
$app->POST('/payment/cancel', PublicJobs::class . ':cancel');
$app->POST('/payment/return', PublicJobs::class . ':return');mn me widiyata POST routes hadala thibunata payhere eken return karanne GET ekak.. notify funtion ekata calle wenneth ne.ai ehema wenne