Skip to content

The magic method Instamojo\Instamojo::__wakeup() must have public visibility #65

@karthick003

Description

@karthick003

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
Screenshot_1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions