laravel-paymongo
laravel-paymongo copied to clipboard
[BUG]
Prerequisites
- [X] Are you using Laravel 6 and above?
- [X] Able to reproduce the behaviour outside of your code, the problem is isolated to Laravel Paymongo.
- [X] Checked that your issue isn't already filed.
- [X] Checked if no PR was submitted that fixes this problem.
- [ ] Filled in the entire issue template
Versions
- PHP version: 8.0.27
- Laravel version: 8.83.27
- Package version: 2.4.0
Description
Steps to Reproduce
Note that I am receiving the json payload from paymongo with no error.
However when I am trying to use middlewares for my webhooks specifically for payment.paid and payment.failed events, I am still receiving the json payload but then after that there's an error in the logs. So I am not sure if it is validating the signature properly.
Expected behavior: Receving the json payload from paymongo with no error.
Actual behavior: Receiving an error message in the logs:
Luigel\Paymongo\Middlewares\PaymongoValidateSignature::handle(): Return value must be of type ?Illuminate\Http\Response, Illuminate\Http\JsonResponse returned {"exception":"[object] (TypeError(code: 0): Luigel\\Paymongo\\Middlewares\\PaymongoValidateSignature::handle(): Return value must be of type ?Illuminate\\Http\\Response, Illuminate\\Http\\JsonResponse returned at /home/vagrant/code/web/others/laravel/booking-laravel-filament/vendor/luigel/laravel-paymongo/src/Middlewares/PaymongoValidateSignature.php:27)