change woocommerce redirect URL after payment cancellation - woocommerce

I noticed that my Woocommerce checkout process does not return the customer to the checkout page after a payment is cancelled, instead he is redirected to the home page.
Specifics:
I use a Wordpress site where a customer can pay with Paypal, creditcard etc. Both Paypal and my creditcard setup require the website to redirect to an external site to do the payment and when the payment is complete, the customer is directed back to the order-received page. This is all working fine.
But if the customer on the external site (Paypal.com for example) decides to hit the "cancel payment" he arrives back to the home page with a URL like this: https://example.com/?cancel_order=true&order=wc_order_oEYInB5bC3mCo&order_id=225487&redirect&_wpnonce=99cfb8ef9f
I checked my site with all plugins disabled and default theme and the same thing happens. It seems to be part of Woocommerce standard setup.
I have searched for a solution but did not find anything about this. Can someone point me in the right direction?

I posted this same question on the woocommerce support forum and received assistance to fix the bug (though they did tell me that in the sandbox fresh installation this problem was not occuring).
Here is the code snippet which resolved it for me:
add_action('woocommerce_cancelled_order','lenura_redirect_to_home');
function lenura_redirect_to_home() {
wp_redirect(home_url( '/checkout/' )); // REDIRECT PATH
}
In case anyone else is running into this.

Related

ccavenue woocommerce plugin is not redirecting to ccavenue

I have an ecommerce site(woocommerce). Recently I had developed a theme by myself and had added required plugins including woocommerce. As woocommerce has not payment gateway option for ccavenue, I added another plugin ccavenue advanced and it provided ccavenue option in woocommerce. Earlier it used to work fine, before this new theme.
But now, when user try to pay, after entering billing details, when user click place order, instead of redirecting to ccavenue, a page with order details with a message appear,
"Thank you for your order, please click the button below to pay with CCAvenue."
But below there is no button. Please see the image
This is the final page appears
I have tried with other available ccavenue woocommerce plugin but the result is same. I have included woocommerce.php file also. but still same result. I tried with paypal and it is redirecting to paypal.
I searched over internet a lot but could not able to find out any solution.
Any guidance will be helpful. Thanks in advance. Sorry for my bad English.
Upgrade your PHP version to latest one. The issue happened due to the disabled condition of Soapclient extension in older version php.

WooCommerce Payment Gateway not showing on checkout page

I have enabled the PayPal standard gateway. This is currently the showing payment method on the checkout page. I have installed an SSL and have an HTTPS:// how ever when i try to enable the PayPal Pro Payment Gateway (in sandbox mode) the Checkout page only displays the Paypal standard method and does not give the familiar radio buttons to select the method. Only method available is the paypal standard.
I also tried enabling the Cheque payment gateway but that also does not display on checkout page
Is there any way to fix this so the credit card input Paypal pro payment method displays on the checkout page?
The site is https://www.dowelmax.com
I had this very same problem and found this page in researching the answer. You mentioned that it turned out to be a conflict with a currency switcher plugin. I had one of those installed, so tried disabling that and indeed my problem resolved too!
To further clarify a solution for anyone else in the same boat - it may be that you need to enable specific payment gateways for each available currency. Above and beyond the general WooCommerce enable option. (Even for your base currency)
This enabled me to fix the problem AND keep my currency switcher plugin active.
In my case, it was Aelia Currency Switcher. They have a support note on it here:
https://aelia.freshdesk.com/support/solutions/articles/158712-one-or-more-payment-methods-don-t-appear-after-installing-the-currency-switcher-how-can-i-fix-it-
Depending on what plugin you are using in WooCommerce, you need to enable force secure checkout. Once force secure checkout is enabled typically PayPal Payments Pro will show up on the checkout page.
Click on WooCommerce
Settings
Checkout
Checkout Options
Place a check mark next to force secure checkout (not force http) and then save. Also make certain that PayPal Payments Pro is enabled on the list of gateways.
This image is from the WooCommerce Documentation on Woothemes.
I resolve this problem with this instructions :
Admin > Woocommerce Settings > Payment > Manage (Your checkout) Active your API permission or information and you get solve.
Good luck
I was also face this type of problem but I was resolve with these instruction.
Enable define ( 'WP_DEBUG', true);
Goto checkout page and refresh page.
Now showing some warning and fatal error.
Solve fatal error and refresh again checkout page and now it's showing payment option and order place button.
I hope this instruction will help you.

Wordpress - Wrong Redirect URL after make any payment

I'm using WC 2.0.16, with the latest version of WP. I am testing WC with many payment gateway such as cheque payment, cash on delivery, and etc. The only issue I'm having is when the user finishes a purchase and is being redirected back to my site, they are sent to a page with an incorrect address such as "http://galerigadget.com/payment/?key=order_560bb443d3fed&order=9004" (or "http://galerigadget.com/payment/") and just got blank screen.
I already tried everything to purchase a product with all payment gateways from my website still got same error like above.
Why is WooCommerce or the payment gateways adding the 'http://galerigadget.com/payment/' to the head of the URL? And how can it be removed? Any help would be greatly appreciated, as the authors don't seem to be very helpful with support.
I can't update WC to latest version because will break my current theme.
You can reproduce this bug with try to buy a product from my website: http://galerigadget.com/product/lenovo-s60/

Express checkout is not returning to website (currently in sandbox)

I don't use paypal all the time but I have a wordpress plugin I built to handle some basic payments. I have started to implement this plugin on a new site and new paypal account and am running into some issues. I am using a technique very similar to the selected answer in this post: Easier way to integrate PayPal express checkout? (that's me, actually).
I'm not sure if there was a change with Paypal that is affecting the redirect after payment but I am setting the return, notify, etc url's in the form before passing it off to Paypal. I have tried to match up the settings with the other paypal accounts I use this plugin with but the "Profile" page on Paypal seems much different on this new account (? did it change, maybe I signed up for the wrong type of account or have a settings misaligned). I know one obvious solution would be to enable the auto return url within the profile page but my other Paypal accounts do not have this option enabled and also when I attempt this it does not help.
I am also having trouble locating the proper settings for changing the shop name (currently showing my email address) on the Paypal checkout page.
Any help would be appreciated.
Sandbox settings are not tied to account settings at all, I just needed to make the changes when logged into sandbox.paypal.com when I was making them on paypal.com only.. Maybe this will help someone else in the future. Feel free to delete.

S2Member Wordpress Plugin Configuration

Hi I am a newbie in Wordpress.
I want a registration form and paypal button in a page.
User will fill in the details and click the paypal payment button .
The user information gets saved and the url will be redirected to the paypal website for
payment.
I have installed the s2member plugin ,read the configurations but somehow unable to achieve the same.
TO ANSWER NEED YOU TO CONFIRM WHETHER you will need different access levels, will you want any free users BEFOR paying and your subscription model. no point using sledge hammer to crack a nut user registration and payment can just be setup with Gravity forms and PayPal but need to know more to answer properly.
Let us know and can then help .

Resources