• Resolved leeuwtje

    (@leeuwtje)


    I would like to use this plugin, however everytime we place an order the page does not redirect to the thank you page after paying but it says:

    Internal Server Error

    At the same time the payment and order was successful (showing up as paid in woocommerce and sending order confirmation email)

    (We disabled the plugin for the time being, but we really want to use this plugin instead of the woocommerce stripe plugin – waiting for your reply)

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @leeuwtje

    Thank you for contacting us. Since you are receiving an internal server error that means there should be an error log entry.

    If you navigate to the WordPress admin and click the Woocommerce tab then status tab then logs you’ll be taking to the log page.

    Look for a log entry titled “failures” with a timestamp. Locate the log entry that corresponds with the internal server error and please provide that in your reply.

    What payment method are you using when you receive the error?

    Kind regards,

    Thread Starter leeuwtje

    (@leeuwtje)

    Thanks for the fast reply.

    I think this is what you mean:

    2020-07-13T22:22:33+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function wc_stripe_payment_complete_order_status(), 2 passed in /home/instaboost99/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 3 expected in /home/instaboost99/public_html/wp-content/plugins/woo-stripe-payment/includes/wc-stripe-functions.php:753
    Stack trace:
    #0 /home/instaboost99/public_html/wp-includes/class-wp-hook.php(287): wc_stripe_payment_complete_order_status(‘processing’, 64263)
    #1 /home/instaboost99/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(‘processing’, Array)
    #2 /home/instaboost99/public_html/wp-content/plugins/woocommerce-subscriptions-master/includes/class-wc-subscriptions-order.php(480): apply_filters(‘woocommerce_pay…’, ‘processing’, 64263)
    #3 /home/instaboost99/public_html/wp-includes/class-wp-hook.php(289): WC_Subscriptions_Order::maybe_record_subscription_payment(64263, ‘pending’, ‘processing’)
    #4 /home/instaboost99/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) in /home/instaboost99/public_html/wp-content/plugins/woo-stripe-payment/includes/wc-stripe-functions.php on line 753

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @leeuwtje,

    Thank you for providing that error log. Here is a direct copy of the WooCommerce code that triggers that action:

    $this->set_status( apply_filters( 'woocommerce_payment_complete_order_status', $this->needs_processing() ? 'processing' : 'completed', $this->get_id(), $this ) );

    As you can see, WC passes the order status, the order ID, and the order object as arguments to the filter, which total to three. Reviewing the log entry you provided, I can see your woocommerce-subscriptions plugin is only passing two arguments. What version of WCS are you using? Later version, like the one I reviewed pass three arguments as expected.

    As a work around, you can add the following line of code to your theme’s functions.php file:

    remove_filter('woocommerce_payment_complete_order_status', 'wc_stripe_payment_complete_order_status')

    That will prevent the Stripe function from being called.

    Kind Regards,

    Thread Starter leeuwtje

    (@leeuwtje)

    For some reason I do not see your post in this topic?

    ************

    mr.clayton wrote:

    Hi @leeuwtje,

    Thank you for providing that error log. What version of WooCommerce are you using? Here is a direct copy of the WooCommerce code that triggers that action:

    $this->set_status( apply_filters( ‘woocommerce_payment_complete_order_status’, $this->needs_processing() ? ‘processing’ : ‘completed’, $this->get_id(), $this ) );

    As you can see, WC passes the order status, the order ID, and the order object as arguments to the filter, which total to three. This is not a bug with the plugin, I suspect you have some other code that is affecting the number of arguments that are being passed by the filter. MY guess would be you are triggering that filter in some custom code and only passing two arguments.

    My recommendation is to start deactivating plugin’s and testing to see which is the culprit.

    Kind Regards,

    *********************

    I am using the latest version of woocommerce and wordpress and I am not using any custom code. The other payment plugins (paypal and woocommerce stripe gateway) are working without problems.

    Very strange, I don’t know how I can make this work in that case.

    Plugin Author Payment Plugins

    (@mrclayton)

    Here is my edited response:

    Thank you for providing that error log. Here is a direct copy of the WooCommerce code that triggers that action:

    $this->set_status( apply_filters( ‘woocommerce_payment_complete_order_status’, $this->needs_processing() ? ‘processing’ : ‘completed’, $this->get_id(), $this ) );

    As you can see, WC passes the order status, the order ID, and the order object as arguments to the filter, which total to three. Reviewing the log entry you provided, I can see your woocommerce-subscriptions plugin is only passing two arguments. What version of WCS are you using? Later versions, like the one I reviewed pass three arguments as expected.

    As a work around, you can add the following line of code to your theme’s functions.php file:

    remove_filter(‘woocommerce_payment_complete_order_status’, ‘wc_stripe_payment_complete_order_status’)

    That will prevent the Stripe code from being called. The reason those plugin’s aren’t don’t trigger an error is because they don’t have a function that hooks in to the order complete filter like my plugin does.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @leeuwtje,

    Not sure if you saw my previous reply so posting it here again for you. Reviewing the error log, I can see that your subscriptions plugin is triggering the order complete filter but it’s only passing 2 arguments instead of the expected three.

    I looked at the code for version 3.0.3 of WooCommerce Subscriptions and it correctly passes three arguments so I am guessing you might be using an old version of WCS. What version of WCS are you using?

    You can add the following line of code to your theme’s functions.php to prevent the Stripe plugin from being called when that filter is applied:

    remove_filter(‘woocommerce_payment_complete_order_status’, ‘wc_stripe_payment_complete_order_status’)

    In the next release I’ll make the third argument an optional one, that way older versions of WCS won’t have issues.

    Kind Regards,

    Thread Starter leeuwtje

    (@leeuwtje)

    Thanks, I am going to try this and report this back to you.

    I am using woocommerce 4.3.0 – in my experience the newest version?

    Thread Starter leeuwtje

    (@leeuwtje)

    So, I finally understand you meant woocommerce subscription plugin and it seems like it was outdated (I did not know that) so I am extremely grateful for your amazing and excellent support.

    I think your plugin is looking WAY better than stripe gateways plugin and it seems the loading time is faster and that is what I was looking for. And the support is outstanding.

    I want to switch from the woocommerce stripe gateway plugin to your plugin, I do have some questions:

    1. Do I need to worry about existing subscriptions? Can I just disable the woocommerce stripe gateway plugin past clients used to sign up and will future subscription payments just go through?

    2. Is your plugin fully compatible for the new subscription guidelines regarding the SCA requirements?

    3. I am not using any webhooks right now, will this result in any problems?

    Thanks, and let me know if there is somewhere I can leave 5 star reviews for the amazing work and support. ??

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @leeuwtje,

    Thank you for your response and confirming what the issue was.

    1. You don’t have to worry about existing subscriptions, once you activate my Stripe plugin and deactivate the other, all your subscriptions will continue to be processed seamlessly. All customer payment methods, customer ID’s, subscriptions etc will be mapped over to my plugin automatically.

    2. Yes, this plugin is fully compatible with the new SCA guidelines.

    3. You will need to activate webhooks if you are using any of the local payment methods or our ACH payment gateway. If not, then you don’t need to worry about webhooks.

    Thank you for offering to leave a review, I appreciate it. Here is the link to our WordPress review page:

    https://www.ads-software.com/support/plugin/woo-stripe-payment/reviews/

    Kind Regards,

    Thread Starter leeuwtje

    (@leeuwtje)

    Thank you, I just left the review.

    Regarding the answer of point 3; the local payment methods do not include credit card payment right?

    Plugin Author Payment Plugins

    (@mrclayton)

    @leeuwtje,

    Thank you for the great review.

    Correct, most local payment methods do not include credit card payments. Credit card payments are handled by the credit card gateway. There are some exceptions, like with the local payment method Klarna, which does allow customers to use a credit card in some cases.

    Kind Regards,

    Thread Starter leeuwtje

    (@leeuwtje)

    You are welcome! ??

    So if I only use credit card payments and did not activate webhook; than there is no problem right?

    Thread Starter leeuwtje

    (@leeuwtje)

    I do have another question.

    I disabled post code (zipcode) for credit card payments. However, on mobile devices it still asks for a zipcode. How can I make sure it does not ask for zipcode? Also, for example in my country we have also letters in the zip code and when I type a correct zipcode it is showing as red (invalid).

    Plugin Author Payment Plugins

    (@mrclayton)

    @leeuwtje,

    That’s right, if you are only using credit card payments then you do not need to activate the webhooks.

    The postal code option is only valid for the custom forms. If you are using the Stripe Form, then Stripe dynamically determines if a postal code is required based on the credit card being entered.

    Kind Regards,

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Internal Server Error’ is closed to new replies.