i am trying to integrate in laravel 9 ,php version 8.1.0.
i have installed the wrapper through composer require instamojo/instamojo-php
then in controller
public function pay(Request $request){
$api = new \Instamojo\Instamojo(
config('services.instamojo.api_key'),
config('services.instamojo.auth_token'),
config('services.instamojo.url')
);
try {
$response = $api->paymentRequestCreate(array(
"purpose" => "FIFA 16",
"amount" => $request->amount,
"buyer_name" => "$request->name",
"send_email" => true,
"email" => "$request->email",
"phone" => "$request->mobile_number",
"redirect_url" => "http://127.0.0.1:8000/pay-success"
));
header('Location: ' . $response['longurl']);
exit();
}catch (Exception $e) {
print('Error: ' . $e->getMessage());
}
}
after the running the project getting error : The magic method Instamojo\Instamojo::__wakeup() must have public visibility

i am trying to integrate in laravel 9 ,php version 8.1.0.
i have installed the wrapper through composer require instamojo/instamojo-php
then in controller
public function pay(Request $request){
}
after the running the project getting error : The magic method Instamojo\Instamojo::__wakeup() must have public visibility
