Closed edu27 closed 8 months ago
Can you execute composer dump-autoload
and try again? It seems your application can't find the RedsysNotificationController
package class.
if (! $this->requestParameters->merchantUrl) {
$this->requestParameters->merchantUrl = action(RedsysNotificationController::class);
}
If it continues to fail, can you provide a way to reproduce the problem with a fresh Laravel installation? I wasn't able to reproduce it.
I already done that and the issue still persist.
I've tried with this piece of code and I almost got it working. I can see the payment verification and the succcessful view but the OK and KO url should have the request UUID but if I do not set them I have the same error as before with the Notification Controller.
$redsysRequest = RequestBuilder::newRequest(
new \Creagia\Redsys\Support\RequestParameters(
transactionType: \Creagia\Redsys\Enums\TransactionType::Autorizacion,
productDescription: $payment->paymentConcept->name,
amountInCents: $payment->getTotalAmount(),
currency: Currency::EUR,
payMethods: \Creagia\Redsys\Enums\PayMethod::Card,
merchantUrl: 'http://devmysuite.test/redsys/notification',
urlOk: 'http://devmysuite.test/redsys/successful-payment/{uuid}',
urlKo: 'http://devmysuite.test/redsys/unsuccessful-payment/{uuid}'
)
)->associateWithModel($payment);
return $redsysRequest->redirect();
Also, I'll try fresh Laravel installation and see if it works.
Tested on a fresh Laravel installation without problems. I have to figure out why isn't working in my current project.
I'm closing the issue for now. Feel free to reopen it if you find anything.
Finally found the problem. I replaced my current "app/Providers/RouteServicesProvider.php" with the content of the default Laravel 10 new project one. The project started in Laravel 5, a lot have changed since then.
Hi!,
I'm getting this error while making the request, and I can't figure out what is the cause. I don't know if I missing something after following the instructions. Using Laravel 10 the error happens in both local with local environment and production server using test environment.
This is the code generating the request.
Thanks!