Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Order keeps on Payment Review #12

Open
Julen10 opened this issue May 6, 2019 · 7 comments
Open

Order keeps on Payment Review #12

Julen10 opened this issue May 6, 2019 · 7 comments
Assignees

Comments

@Julen10
Copy link

Julen10 commented May 6, 2019

I activated the logs and I got the following output:

[2019-05-06 08:22:02] codeko_redsys.INFO: Esperando Notificación ..... [] []
[2019-05-06 08:22:49] codeko_redsys.INFO: Success: Entrada [] []
[2019-05-06 08:22:49] codeko_redsys.INFO: Success: Redsys Without Response:  [] []

I see that "Redsys Without Response" is not on Notify.php even if the Redsys callback URL is /redsys/index/notify

@Julen10
Copy link
Author

Julen10 commented May 6, 2019

I have tried to enable and disable "Send Parameters on URL", putting urlok and urlko in both redsys and magento configuration...

It´s executing Success.php

@Julen10
Copy link
Author

Julen10 commented May 6, 2019

Update:

Changing UrlOK and UrlKO to notify I get the following log:

codeko_redsys.INFO: XLIrGTt9B9eFrlzXm7In - Código de respuesta: 104 
codeko_redsys.INFO: XLIrGTt9B9eFrlzXm7In - Pago no aceptado 
codeko_redsys.INFO: XLIrGTt9B9eFrlzXm7In - Redsys ha actualizado el estado del pedido con el valor CANCELED [] []

But the order still on Payment Review

@boris-burgos boris-burgos self-assigned this May 6, 2019
@Julen10
Copy link
Author

Julen10 commented May 6, 2019

Update:

With URLOK and URLKO (in module) changed to $urltienda (/notify) and redsys TPV configured to "Send Parameters in URL" I got this exception: Please provide payment for the order

@Julen10
Copy link
Author

Julen10 commented May 7, 2019

Using new redsys login in test enviroment i got the following output:

codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - Código de respuesta: 0 [] [] 
codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - Pago aceptado. [] [] 
codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - Order increment id 0000000294 [] [] 
codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - El importe total no coincide. [] [] 
codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - El pedido con ID de carrito 0000000294 es inválido. [] []
codeko_redsys.INFO: ObLkyNvMDsXz4Luir3ML - Redsys ha actualizado el estado del pedido con el valor CANCELED [] []

@boris-burgos
Copy link
Member

The problem is defined and resolved here:
https://magento.stackexchange.com/questions/253414/magento-2-3-upgrade-breaks-http-post-requests-to-custom-module-endpoint

Is a Magento 2.3 change that breaks HTTP POST requests.

Thanks to Joan Massey for the information!.

The fix for Magento 2.3 is simple, but make it backwards compatible has some dirty multiple class version implementation.

@Julen10
Copy link
Author

Julen10 commented May 8, 2019

@valerocompsa
Copy link

On Notify.php add:

use Magento\Framework\App\Request\InvalidRequestException;
use Magento\Framework\App\RequestInterface;

class Notify extends \Codeko\Redsys\Controller\Index implements \Magento\Framework\App\CsrfAwareActionInterface
{
	public function createCsrfValidationException(
		RequestInterface $request
	): ?InvalidRequestException {
		return null;
	}

	public function validateForCsrf(RequestInterface $request): ?bool
	{
		return true;
	}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants