Open samieaji opened 6 years ago
Check that you have the right namespace
example use Unicodeveloper\Paystack\Paystack;
I am getting the class 'Paystack' not found error, and this is happening in the form: The code snippet is seen below:
Specify the full paystack class path in the form input value
better still return it as a variable while returning your view
On Sun, Jun 24, 2018 at 1:59 AM, Nwakwoke Patrick Nnaemeka < notifications@github.com> wrote:
Specify the full paystack class path in the form input value
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/unicodeveloper/laravel-paystack/issues/52#issuecomment-399720966, or mute the thread https://github.com/notifications/unsubscribe-auth/AFF21IYf0g3HO2Dlb8m3JzeOQSedEQJlks5t_uRXgaJpZM4T9vmN .
I had the same problem, all you need to do is go to config/app.php under providers add Unicodeveloper\Paystack\PaystackServiceProvider::class,
add 'Paystack' => Unicodeveloper\Paystack\Facades\Paystack::class,
to aliases
then run php artisan vendor:publish --provider="Unicodeveloper\Paystack\PaystackServiceProvider"
again.
I had same issue too, my problem was that paystack did not fully download to my project. Make sure its there and that the unicodeveloper folder is in the vendor's folder after installing the paystack from composer.
In Laravel 5.6 publish does not work, you'll have to add the provider and the alias in the config.app file manually.
On laravel 5.6 you have to manually add the service to config and if after adding the service provider class and alias you still get the error,hit the config:cache artisan command it should work
Client error: POST http://localhost/infyom-paystack/public/payment/transaction/initialize
resulted in a 404 Not Found
response:\n
transaction/initialize`
Test webhock URL -> is set to payement url
Am getting the same error Class 'Paystack' not found
in PaymentController.php (line 23)
I have tried @UmarAbdullahi's suggestion but still getting the same error. I am using laravel 5.4. Please any fix for this?
So I just dropped a respone to @jgodstime Here
On laravel 5.6 you have to manually add the service to config and if after adding the service provider class and alias you still get the error,hit the config:cache artisan command it should work
wow thumb up sir, config:cache artisan command worked for my laravel 5.4
Try to run php artisan cache:clear
Hi,
I followed the instructions for installation, but each time I try to pay, I get the error "Class 'Paystack' not found".
Also when I try to publish the configuration file, it doesn't publish it but says "Publishing complete."
I'm running Laravel 5.6.