Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Intermittent revert to default PayPal
Tagged: payment gateway
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by prodrenalin.
-
AuthorPosts
-
November 20, 2014 at 5:37 pm #11812prodrenalinMember
Background:
We are using WP eStore with the payment gateway bundle. We have the checkbox set for using multiple gateways. The two enabled gateways are “PayPal Payments Pro” and “PayPal Payments Advanced” from inside the bundle (page=wp-payment-gateway&action=gateway). The PayPal gateway shown in the main plugin’s settings (page=wp_eStore_settings&settings_action=gateway) is not enabled.
Payments Pro is labeled “Pay with Credit Card”. Advanced is labeled “Pay with PayPal”.
During development, we did test the PayPal gateway from the main plugin, but as I’ve said, it is not enabled.
Example product page: [https://www.prodrenalin.com/prodrenalin/] The green button is the eStore buy button. Cart page: [https://www.prodrenalin.com/cart/]
We are using eStore 7.1.6, gateway bundle 1.9.6 on WP 3.9.2.
Behavior:
When it works as expected, “Pay with Credit Card” shows the form as a page of our site, and “Pay with PayPal” sends the user to PayPal with the ProDrenalin logo as we configured in the hosted forms.
Intermittently, regardless of payment type selected, users will land on the public PayPal page showing a payment to be made to the email address we can configured as our main WP admin email for notifications. Despite PayPal in the main plugin settings being disabled, the email address field for this method resets to the main admin email if we erase it.
Replicating:
We have not figured out how to make this bug happen reliably. When it happens, it’s nothing more complicated than adding a product to the cart and clicking the red checkout button. The “Pay with Credit Card” type is shown as the default, but as I’ve said, the user incorrectly lands at a generic PayPal page (not the customized advanced one).
It seems like changing the payment type to “Pay with PayPal” and the back to “Pay with Credit Card” prevents this. That suggests that despite the form showing a default value, it’s not really honoring that first payment type and falling back to generic PayPal. But once you touch the dropdown, it seems to save your choice.
One theory we had was stale configuration, and we’ve tried making trivial changes to the payment settings to force a re-save. This was not effective. However, we did find that turnning on debug logging made the problem go away. Unfortunately, we have seen the problem return.
I did review https://support.tipsandtricks-hq.com/forums/topic/force-gateway-payment-bundle-and-estore-to-set-paypal-pro-as-exclusive-gateway which is not exactly our issue, but suggests that it could be stale settings. I have tried disabling all gateways, saving, then re-enabling.
I understand it’s tough to fix a problem that doesn’t happen every time. Do you have any advice for tracking down the problem?
November 20, 2014 at 9:54 pm #66940prodrenalinMemberHere’s some more information.
I turned off multiple payment types. I turned off “pay by credit card”. I cleared my cookies. Then, I tested checking out. It sent me directly to the ordinary PayPal payment with my WP admin email address.
November 20, 2014 at 10:19 pm #66941adminKeymasterIt seems like you made some modification to the plugin. What kind of code changes did you do?
Turn off the fancy redirection on checkout option. Do you see any difference in this behavior after that?
Did you apply the following tweak by any chance?
November 20, 2014 at 10:29 pm #66942prodrenalinMemberI can now confirm that if I clear cookies and go through checkout, I do not have a cookie named “eStore_gateway”. Not having this cookie when I click the checkout button causes this problem. If I change the payment method, the cookie is set to “pppro” or “ppadvancedA”.
November 20, 2014 at 10:45 pm #66943prodrenalinMemberI have worked around this problem locally by adding code to a plugin I used for adding features to our theme.
// Work around WP eStore bug where no payment gateway is chosen
if(!isset($_COOKIE)) {
// If we don’t have the gateway cookie set, then set it.
$_COOKIE = ‘pppro’;
setcookie(“eStore_gateway”, ‘pppro’, 0, ‘/’, ‘.prodrenalin.com’);
}
This works for me because I’m happy to use pppro as the default. I imagine you’ll want something more general on your end. Or perhaps this is a bug related to the particular short tag we used for our cart, which is [wp_eStore_cart_fancy2].
November 21, 2014 at 2:16 am #66944prodrenalinMemberAnswering your questions from before:
We haven’t changed any code in the plugins. We added a few CSS rules to change the look of the cart.
I am not in a good position to try to bring the bug back (having worked around it) and try turning off the fancy redirection. I couldn’t find anyone on the dev team who said they turned it on.
For now, I think we’re happy with how things are working. I’m just hoping that my detailed feedback helps with your continued development.
-
AuthorPosts
- You must be logged in to reply to this topic.