403 error via Stripe (or any payment gateway)

WPPizza – A Restaurant Plugin for WordPress Support Add-Ons Gateways Stripe 403 error via Stripe (or any payment gateway)

Viewing 20 posts - 1 through 20 (of 28 total)
  • Author
  • #53175
    Walter Oberhummer

      Hi everyone,
      I am trying to make the payment gateways work and have spent the last days trying to figure out a very odd problem: every time I try to make a (test) purchase, I get an 403 error popup window, connected to Stripe (or any other payment gateway).

      I am fully aware that his this related to the hoster, but I was able to do a testbooking once and then by mistake disabled the payment gateways – after this the error is now constant, does not matter on what I try to do with settings, exclude plugins (no caching plugin used), file permissions, htaccess ….

      Thus: I am pretty much absolute desperate at this moment and more then glad for any pointer that anyone could give – if you wanted to see this for yourself you can try out at https://pizza.taverne.at (using the dom-inspector/event console)

      Any ideas anyone…?

      Admin & Mod

        first question:
        did you update / install *any* plugin manually (i.e via ftp instead of using the wordpress plugin uploader or updater) ?

        Walter Oberhummer

          Hi Olly,
          First of all: very much appreciated that you personally respond here 🙂

          As for the plugin-question:

          1. The wppizza main-plugin and the 6 bought extensions (2 weeks ago): I have downloaded them from your website and transferred them over via FTP to the wordpress site; I am not aware though that any updates where needed yet (should be latest, no?)

          2. As for other plugins: I have set of “usual plugins” (contact form 7, akismet etc) that I have manually uploaded to the site and some of them have received updates direct via the website – however, for the checkout page I use a plugin to stop any of them from loading, only operate with “bare bone” plugins there (switchting on/off all other plugins did not have any effect)

          Do you you need further infos?

          Admin & Mod

            the problem that i’ve seen in the past is that people upload/update via ftp but as a different user, so the owner of the files is incorrect (especially when adding new files and even more so regarding .htaccess files)

            if the permissions or owner of an .htaccess file is not correct the server will – more often than not – throw a 403 “to be safe”

            so first of all i would check that the owner of all of your files is correct and “chown” if necessary (or simply “chown” recursively once you know what user is supposed to be the owner of all files

            of course, you also want to check the permissions of files (plenty of results if you search for that )

            Walter Oberhummer

              I can confirm my user account is set as owner for all files and for good measure ran a full 755 on all files twice (with resetting htaccess and wp-config to 444 after).

              Result: error still there

              PS: you can try it yourself on the site – its currently in test mode (and I use the stripe visa 4242 XXX test card, which had worked before)

              Any other ideas…?

              Admin & Mod

                have a look at the suggested permissions here
                they are somewhat different

                you might also want to check if your server has mod_sec or some sort of other security stuff (firewall etc) running (which may or may not cause this, if it does check why it throws 403 in your case – might want to speak to your host though)

                Admin & Mod

                  in a nutshell, if it worked before , something has changed (obviously) but i can guarantee you that simply enabling and disabling a gateway will not suddenly throw some 403’s

                  Walter Oberhummer

                    Hi Olly,
                    just a quick message on my journey of absolute pain: I think I might have a lead on the issue as I actually was able to do one testbooking – and then do the stupig thing of the equivalent of Nemo taking the red pill or Anakin not aknowlediging the “high ground”:

                    – “How about if I just get rid of jetpack for the moment?”
                    – “Then how about if I just use the full-de-install button on the plugin Redirection…?”
                    – “Ahhh, I am able to make a testbooking!!! awesome!!”
                    – “How about if I just try to switch back on Jetpack for a sec….does not one love those stats!!”

                    Ey presto, the error is back!… Does not matter whether I install/de-install Jetpack & Redirection plugins..”why on earth could I just not have touched it” ***that-blue-pill-would-look-great-now***

                    Admin & Mod

                      Lol. you need to get out more 🙂

                      Walter Oberhummer

                        ha! Maybe though I can return the compliment, as I have found the source of the error:

                        1. Default setting for the shop is “selfpickup” with no minimum spent
                        2. Default setting for delivery is EUR 25 min.
                        3. However, for any testbooking the amount needs to be above the minimum delivery amount to work 😉 (even if its selfpickup)

                        Walter Oberhummer

                          (and now tested with any plugin switched on…yup, no problems there…you guys just programmed that part a bit sloppy around testbookings + self-pickup + minimum order overlapping from delivery 😉 😉

                          Admin & Mod

                            sorry, but i dont understand what a 403 has to do with any kind of minimum order
                            and i’d also like you to talk me through the issue you are describing on your site.
                            i want to see that

                            Walter Oberhummer

                              This error is actually getting more weird by the moment, as it also now affects the live environment:
                              – No order below EUR 30 goes through, not for live- or test environment (always throw the 403 order error)
                              – Once page is refreshed and basket value above EUR 30 is set: it works
                              – On top I have removed all minimum order amount, same problem/error

                              Thus this now is becoming a real business issue –

                              Walter Oberhummer

                                lITTLE CORRECTION: No value below EUR 20 goes through…although all minimum order values are set to zero (both for live and test environments) – that is for any browser (chrome, firefox, IE) on any device (tablet, mobile, laptop)

                                Admin & Mod

                                  you are also loading an external (and outdated at that ) version of jquery

                                  Walter Oberhummer

                                    Hi Olly,
                                    I have now added a removal script for Jquery and a plugin “Updating Jquery” to try to make sure latest is loaded

                                    As for the error: lots more testing now ties this to the number-of-items selecter in the cart, and not the order value!

                                    This is how you can reproduce the error here:
                                    1. Go to pizza.taverne.at
                                    2. Add a single pizza to the cart
                                    3. Press “bestellen” to go to the order page

                                    From there you can trigger the error in two ways
                                    1. Finalize the order (current: stripe test gateway switched on, visa test card 4242 (repeat-nr) and the error gets thrown at send
                                    2. try to change the number to two pizzas (works fine!) and then back to one pizza (throws the error)

                                    Maybe the number of articles somehow does not get stored correctly here as variable and a zero number of articles then throws the error..? Any emergency fix for that available?

                                    Admin & Mod

                                      >I have now added a removal script for Jquery and a plugin “Updating Jquery” to try to make sure latest is loaded
                                      except that it made no difference. you are still loading the same stuff

                                      i would also seriously suggest you do not load an external jquery library but use the one wp provides
                                      (at least until you know it all works)
                                      have a read here: https://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/

                                      and generally of course:
                                      have you disabled all other non-wppizza plugins and used a default theme ?
                                      do you still have the same issue if you do ?

                                      Walter Oberhummer

                                        fully aware that the external loading is for test-purposes only! (otherwise to many other things might break)…

                                        I have tried that already (default theme and only wp-pizza plugin), the error was the same – I have put this configuration though now live again for you to see: its the standard WP 2020 theme + wp-pizza plugins only….the error is still the same

                                        Walter Oberhummer

                                          Actually even just running the core wp-pizza plugin alone (so with out any additional wp-pizza plugins) throws me the same error (note: that error then is not visible as a Javscript error, but only on the webdev console….nontheless, same error)

                                          Admin & Mod

                                            thanks for getting it to the bare bones – i’d also suggest you disable all additional other gateways (though i dont think it’s caused by those either, but makes things easier)

                                            in any even though, what happens is this in all circumstances:

                                            you put a few things in the cart,
                                            lets say here https://pizza.taverne.at/speisekarte/pizza/ I am adding
                                            3x Käse-Pizza
                                            6x Margherita Pizza 21cm
                                            1x Margherita Pizza Ø 31cm

                                            and i can add / remove / alter as i like. so far so good

                                            when i now go to the order page (https://pizza.taverne.at/orders/)
                                            i can see all those things in the cart as expected
                                            if i now try to change *any* quantity (up or down) it throws the 403
                                            if i *delete* one of the items i can subsequently change things as needed
                                            and do whatever i like after that it seems

                                            this somehow looks to me like a db and/or cache and/or session issue

                                            check this :
                                            a) clear your cache
                                            b) put something into cart
                                            c) go to orderpage
                                            d) STOP doing anything else
                                            e) check the [prefix]_wppizza_orders table for a new entry (corresponding to the current time if you already have orders in there, alternatively truncate that table beforehand so it’s easier to see)
                                            f)if there’s nothing in there, than there’s the issue – i.e a db entry has to be added when a user goes to the order page the first time
                                            g) let me know and we’ll see if we can pin things down a bit further perhaps

                                            can you also please post your wppizza->tools->system output here separately ? (make it “set as private” if you want)

                                          Viewing 20 posts - 1 through 20 (of 28 total)
                                          • The topic ‘403 error via Stripe (or any payment gateway)’ is closed to new replies.