yabacon / paystack-php

A PHP Wrapper for Paystack API - https://www.paystack.com
MIT License
109 stars 70 forks source link

"message": "Class 'App\\Http\\Controllers\\Yabacon\\Paystack' not found", #20

Open ishgem opened 5 years ago

ishgem commented 5 years ago

Am surely new to Laravel... I wanted to integrate this package but the error is "message": "Class 'App\Http\Controllers\Yabacon\Paystack' not found",. And I have used the namespace. I will be glad if someone could help me out. Thanks!

jgodstime commented 5 years ago

Change this
$paystack = new Yabacon\Paystack(SECRET_KEY); to this
$paystack = new \Yabacon\Paystack(SECRET_KEY);

Take not of the \ before the Yabacon indicating the root With that you are good to go.