Open azadvarun opened 4 years ago
try adding the routes to Csrf exception list
u can also look at the example project i linked in the readme https://github.com/riazXrazor/riazXrazor-payumoey-example
app/Http/Middleware/VerifyCsrfToken.php
protected $except = [
'payumoney-test/return'
];
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined function App\Http\Controllers\isSuccess()
public function payment_return(Request $request){ $result = \Payumoney::completePay($_POST);
if ($result->checksumIsValid() AND isSuccess()) {
print 'Payment was successful.'; } else { print 'Payment was not successful.'; }
// dd($result->getParams());
}
if ($result->checksumIsValid() and $result->isSuccess()) {
print 'Payment was successful.';
} else {
print 'Payment was not successful.';
}
Here We only able to pay using card can we costomize it for netbanking and upi payment.
I am thankful to you sir If we provide me suggestion.
you can check check their documentation once, if its available in paid services
This is my code
$result = \Payumoney::pay([ 'txnid' => uniqid(), 'amount' => $payable, 'productinfo' => 'A book', 'firstname' => $user_info->name, 'email' => $user_info->email, 'phone' => '750XXXXXX', 'surl' => url('books/order-success'), 'furl' =>url('books/failure-order'), ])->send();
// $result = \Payumoney::completePay($_POST);
if ($result->checksumIsValid() AND isSuccess()) { print 'Payment was successful.'; } else { print 'Payment was not successful.'; }