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

Wrong Return URL after Payment Due to this Plugin #12

Closed
jannisf opened this issue Oct 21, 2015 · 3 comments
Closed

Wrong Return URL after Payment Due to this Plugin #12

jannisf opened this issue Oct 21, 2015 · 3 comments
Assignees

Comments

@jannisf
Copy link

jannisf commented Oct 21, 2015

I am using this plugin together with the "PostFinance E-Payment Gateway for WooCommerce" by mame dev. After finalizing a payment I got to see the "Oops, this page cannot be found" every time. I went through lengthy trouble shooting sessions with the developer mame dev until he found out that it is actually this "Hyyan WooCommerce Polylang Integration" plugin causing the return URL to be:
http://www.[domain].com/en/checkout//1769/order-received/1769/?key=wc_order_56212c7e09a10&v=d1a0eba20b32
instead of
http://www.[domain].com/en/checkout/order-received/1769/?key=wc_order_56212c7e09a10&v=d1a0eba20b32
The PostFinance plugin gets its return URL through the WooCommerce function "get_return_url()", which is apparently modified by this plugin in some mysterious way.
Can you please fix this bug so that this WooCommerce Polylang Integration plugin works seamlessly with all payment gateways? Thanks very much!

@theblackhole
Copy link

Hey @jannisf ,
It's probably too late for you but for it may be useful for the others.
After a long diagnostic, I fixed this issue by commenting line 250 ($value) in blob/master/src/Hyyan/WPI/Endpoints.php :

$url = trailingslashit($permalink)
          . $endpoint
          . '/'
          //. $value
          . $query_string;

Now it generates the correct url 😄

@TeemuSuoranta
Copy link
Contributor

I made much more complicated solution because I couldn't find the exact cause. I made a pull request and my solution is working as well #25

@hyyan hyyan self-assigned this Jul 30, 2016
@hyyan
Copy link
Owner

hyyan commented Jul 30, 2016

Fixed in version 0.27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants