New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix payment api endpoint url bug #25

Merged
merged 1 commit into from Jul 30, 2016

Conversation

Projects
None yet
2 participants
@TeemuSuoranta
Copy link
Contributor

TeemuSuoranta commented Mar 14, 2016

There's a bug in the payment api that causes orders log as waiting for payment even though payment is successfully done. The bug is caused by conflicting rewrite rules that make the permalink wrong. I make a filter for checkout payment url and remove these extra parts in the url which makes the payment api to work.

My solution isn't pretty and could use some regex magic but it does what it needs to do and it works.

You can debug the url by adding this in header of your theme:
global $woocommerce;
$order = new WC_Order($order_id);
var_dump($order->get_checkout_payment_url());

Fix payment api endpoint url bug
There's a bug in the payment api that causes orders log as waiting for payment even though payment is successfully done. The bug is caused by conflicting rewrite rules that make the permalink wrong. I make a filter for checkout payment url and remove these extra parts in the url which makes the payment api to work.

My solution isn't pretty and could use some regex magic but it does what it needs to do and it works.

You can debug the url by adding this in header of your theme:
global $woocommerce;
$order = new WC_Order($order_id);
var_dump($order->get_checkout_payment_url());

@hyyan hyyan merged commit 564bb68 into hyyan:master Jul 30, 2016

@hyyan

This comment has been minimized.

Copy link
Owner

hyyan commented Jul 30, 2016

Thanks for the PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment