mardi 22 juin 2021

Call to private Instamojo\Instamojo::__construct() from context

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());
  }
}

Error after submitting form on $api = new \Instamojo\Instamojo( line.

Error:- Call to private Instamojo\Instamojo::__construct()



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3x13FBO
via IFTTT

Aucun commentaire:

Enregistrer un commentaire