BitBagCommerce / SyliusPayUPlugin

PayU payment plugin for Sylius applications.
MIT License
23 stars 18 forks source link

Redirect after successful payment. #16

Closed jarekkowol closed 1 year ago

jarekkowol commented 6 years ago

After the shopping process is completed, it is redirected to the website: www.myshop.pl/order/XXXXXXXX Although the payment was successful. It seems to me that there should be a redirection to the thank you page

How to overwrite sylius_shop_order_show?

bitbager commented 6 years ago

As long as the payment is marked as not completed, you are still able to change the payment method for your order. In our plugin (the latest stable version), the payment status changes to completed on PayU API callback handled by Payum notify action. Make sure you configured your environment properly and PayU service is sending the callback to your server. Note, that it won't work on localhost, as it's impossible for Payu to send a callback to your local server.

bitbager commented 6 years ago

Please, close this issue once you find it's solved.

patrick477 commented 6 years ago

Hi @jarekkowol, do you get a message about a successful payment after redirection and do you have the option to re-pay?

jarekkowol commented 6 years ago

I noticed double request at the same time:

First from our store:

/payment/capture/a8-lqUev4H290vErJJJ3zc9rZ3F_VxoJelgyKVVtam4 HTTP/1.1" 302 2407 "https://naszsklep.pl/checkout/complete"

Second from provider:

/payment/capture/a8-lqUev4H290vErJJJ3zc9rZ3F_VxoJelgyKVVtam4 HTTP/1.1" 500 59409 "https://www.platnosci.pl/np/pt/index.action"

End second request get 500: request.CRITICAL: Uncaught PHP Exception OpenPayU_Exception_Request: "ERROR_ORDER_NOT_UNIQUE - Order with given extOrderId already exists"

Any idea?

patrick477 commented 6 years ago

Do you have this result for every payment?

jarekkowol commented 6 years ago

No, sometime i get: redirect to: https://outshop.pl/order/Oj4wW8hsjM and message: Wystąpił nieznany problem z płatnością. and below options to re-pay

After refresh I get message: Nie możesz już zmienić metody płatności dla tego zamówienia

I remind you that the entire payment has been successful.

jarekkowol commented 6 years ago

I use REST API (Checkout) version of PayU.

patrick477 commented 6 years ago

I understand that you have the latest version of the plugin v1.7.0 ?

and you get a notification about the payment status from PayU?

jbator commented 6 years ago

Same issue here ;( After successful payment, payu redirects to payment selection page with message: Wystąpił nieznany problem z płatnością and there are options to re-pay available...

I'm using both newes sylius and this plugin version. Any clue?

rafalmal commented 1 year ago

Outdated issue.