crevillo / payum-redsys Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Imagine the following situation: on my website, a customer is sent to Redsys to pay for an order, but once there they click on the Cancel button because they want to pay later. The next time they want to pay for this (same) order, it will be impossible. No redirection to Redsys will be done.
When the Cancel button is clicked in Redsys:
Payum handles Redsys' notification with its $gateway->execute(new Notify($token))
process. In payum-redsys' NotifyAction
, Redsys notification details are added to the order's details
fields, and later persisted in database. One of those details is Ds_Signature
.
When the customer comes back to pay for the (same) order, there's no way for them to be redirected to the Redsys gateway, because payum-redsys' CaptureAction
only redirects when Ds_Signature
is falsy:
if (false == $postData['Ds_Signature']) {
$details['Ds_Signature'] = $this->api->sign($postData->toUnsafeArray());
throw new HttpPostRedirect($this->api->getRedsysUrl(), $details);
}
Am I missing something or is there a problem here?
I have patched what @h3llr4iser made for completing the payments.
After that, I´m able to complete the paymet via Redsys and it´s registered as authorized, but on Sylius the order still Pending for payment.
On Redsys panel I can see this:
Error (Server returned HTTP response code: 500 for URL: https://myshopurl.com/payment/notify/zmM6iWVwriknz4d-MU0Ht8xQnKIjzzHfJ1O_G3ixVTY
And Ds_SignatureVersion, Ds_MerchantParameters and Ds_Signature correctly created.
What could be the problem?
Thanks,
Cuando un pago es rechazado o se cancela desde el boton de cancelar, redsys no redirecciona nuevamente al sitio sino que redirecciona a la url de capture y esta nuevamente lleva al pago de redsys pero indicando el error numero de pedido repetido. Esto es asi o es un error?
Just a little question
In the NotifyAction, you just check if the signature is valid. The problem I see is that in fact in this siguation you could verfy if the payment was realized (credit card was accepted) by executing a GetStatus.
At now, if after I entered the credit card, in the next step, if I close the window instead of pressing the "Continue" button, I would have my payment as pending when in reality I payed,
Hola,
Cuando se hace un pago, Redsys envía inmediatamente una notificación. Yo necesito inspeccionar esta notificación y ejecutar operaciones en funcion de si me informa de un éxito o de un fallo. Pero también quiero que Payum se encargue de la validación de la notificación (token correcto, url correcta, etc.). Si dejo que Payum recepcione la notificación con su NotifyController
, dichas validaciones se hacen, pero el tratamiento de la petición se termina sin que yo haya podido tomar ninguna accion.
¿Cómo puedo yo intervenir aquí? (uso Symfony)
Gracias
In the documentation of the payum-redsys package (found here: https://github.com/crevillo/payum-redsys/blob/master/Resources/docs/get-it-started.md ) talks about a config.php
file mentioned in the payum documentation (found here: https://github.com/Payum/Payum/blob/master/docs/symfony/get-it-started.md ). But the payum documentation doesn't use a config.php
file. Perhaps it comes from a previous version of Symfony?
Could you update the documentation?
In this lines:
payum-redsys/Action/CaptureAction.php
Lines 57 to 64 in b7544bd
The capture action sets as defaults for the merchant_urlko and merchant_urlok the value of targetUrl. The targetUrl value is the one that redirects to the Redsys platform. It should use the afterUrl, as it contains the url configured for the done action on the prepare.
If the code linked is executed, it creates a loop where the user is redirected again to the payment after doing the payment and this fails as the number ID has been already used.
Hi, I do not have much experience in Payum. But I need Redsys gateway in Payum 0.12 to implement in Sylius. Not if you could tell me what changes are needed. Thank You.
Hola, No tengo mucha experiencia en Payum. Pero necesito redsys gateway en Payum 0.12 para implementar en Sylius. No se si podrías indicarme que cambios son necesarios. Gracias.
Haciendo un pago en productión he recibido el siguiente notice:
[Thu Aug 25 10:12:59.034192 2016] [client xxxx:39630] PHP Notice: Undefined index: Ds_Signature in /var/www/html/vendor/crevillo/payum-redsys/Crevillo/Payum/Redsys/Action/NotifyAction.php on line 46
He visto todas las notificaciones todas tiene Ds_Signature salvo esta:
25-08-2016 10:57:41 Autorización 3216 HTTP Asíncrona 9915 Correcto https://www.xxxxxx.yyyy/payment/notify/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Que al darle a detalles pone:
No existen datos enviados o no se han podido recuperar
Parece que redsys en algunos casos puede enviar notificaciones vacías, no se en que caso, porque tengo otra realizada igual al cancelar un pedido que devuelve datos.
Sería conveniente controlar por código este caso?
Gracias
Codigo de error: SIS0042 La firma enviada no es correcta
Esto ocurre al enviar al cliente al TPV.
La secret_key y el merchant_code estan correctamente puestos.
Puede deberse a un bug?
Hi,
I have just installed your bundle and I had implemented successfully with sylius, but I had done making a Gateway configuration form to edit configuration options in syluis admin. I am thinking to implement a refund action in this bundle and create a sylius bridge for this bundle. Before doing it i want to know if you are agree to accept PR.
@makasim What do you think is the best aproach?
Thank you!
Hi,
The payum link in the readme file is not working.
Regards,
Samuel
The function mcrypt_encrypt is deprecated in PHP7.1.
It is used in Crevillo/Payum/Redsys/Api.php line 171. I'm not sure how it should be replaced.
I think it should be replaced by openssl_encrypt()
. But I'm not sure if it will affect in the Bundle working in some way.
More info:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.