• Resolved redrocketindustries

    (@redrocketindustries)


    Hi team,

    We’re getting a persistent fatal error from the WooCommerce PayPal Payments plugin when the CHECKOUT.ORDER.APPROVED webhook hits:

    swift

    CopyEdit

    PHP Fatal error: Uncaught Exception: The payment is not ready for processing yet. in .../woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php

    The error appears to be caused by the plugin trying to process the order before it’s fully initialized or before PayPal’s order is ready. ✅ What we’ve tried:

    • We patched the plugin to return early instead of throwing the exception: phpCopyEditif ($this->order_helper->contains_physical_goods($order) && !$this->order_is_ready_for_process($order)) { return; }
    • We also built a retry loop in a custom action handler using woocommerce_paypal_payments_checkout_order_approved that retries order processing every few seconds up to 5 times.

    This has prevented fatal errors, but we’d love to know:

    • Is this something being worked on?
    • Can the plugin include retry logic internally?
    • Or can the webhook handler at least fail gracefully?

    Let me know if logs or additional details would help.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @redrocketindustries

    Thanks for reaching out.

    Yes, I saw your private message as well, so let’s continue the conversation there. At this stage, we’ll analyze the log output you provided to better understand what might be causing this.

    Let us know if that works for you.

    Kind Regards,
    Krystian

    Thread Starter redrocketindustries

    (@redrocketindustries)

    Yep, that works for me. Thank you for the quick response!

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @redrocketindustries

    This is being handled internally under issue ID PCP-4631. As soon as there is an update on that, I’ll make sure to follow up on this thread and your support case.

    Kind Regards,
    Krystian

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hello @redrocketindustries

    We have created a patch to address the issue tracked under PCP-4631, which was causing the following errors:

    Error 1:
    “The payment is not yet ready to be processed.” (OrderProcessor.php:189 – order status changed from Processing to Failed)
    Error 2:
    “The payment could not be processed. [UNPROCESSABLE_ENTITY – ORDER_ALREADY_COMPLETED]

    This can happen even when the payment is fully approved by PayPal, leading to exactly the scenario where the customer is charged, but the order on your site fails and does not register correctly.

    You can download the patch here: https://drive.google.com/uc?id=1YqxIG6ezfQxUrzhcDsfRN9TJ_Wxy0Ds8

    Please install it as a regular plugin via your WordPress dashboard. It will override the problematic logic and should prevent the issue from recurring. This fix will also be bundled into the next official plugin release.

    Most importantly, please let us know if the issue persists after applying the fix. We’re still monitoring it closely, and your feedback is essential, as we haven’t been able to reliably reproduce the problem in all environments.

    Kind regards,
    Krystian

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Fatal Error – “Payment is not ready for processing yet”’ is closed to new replies.