• Resolved greencode

    (@greencode)


    I’m having a lot of these appear in the logs:

    2023-02-07T11:28:30+00:00 ERROR Failed to retrieve stored webhook data.

    When I go to Settings and click on Resubscribe I get

    Operation failed. Check WooCommerce logs for more details. Webhook subscription failed.

    Looking at the log I see:

    2023-02-07T11:40:33+00:00 DEBUG POST https://api.paypal.com/v1/notifications/webhooks
    Request Body: {"url":"https:\/\/www.mysite.com\/wp-json\/paypal\/v1\/incoming","event_types":[{"name":"CHECKOUT.ORDER.APPROVED"},{"name":"CHECKOUT.ORDER.COMPLETED"},{"name":"CHECKOUT.PAYMENT-APPROVAL.REVERSED"},{"name":"PAYMENT.CAPTURE.REFUNDED"},{"name":"PAYMENT.AUTHORIZATION.VOIDED"},{"name":"PAYMENT.CAPTURE.REVERSED"},{"name":"PAYMENT.ORDER.CANCELLED"},{"name":"PAYMENT.CAPTURE.DENIED"},{"name":"PAYMENT.CAPTURE.COMPLETED"},{"name":"VAULT.PAYMENT-TOKEN.CREATED"},{"name":"VAULT.CREDIT-CARD.CREATED"},{"name":"PAYMENT.CAPTURE.PENDING"}]}
    Response Debug ID: XXXXXXXXX
    Response: Array
    (
        [code] => 400
        [message] => Bad Request
    )
    
    Response Body: {"name":"WEBHOOK_URL_ALREADY_EXISTS","message":"Webhook URL already exists","debug_id":"XXXXXXXX","information_link":"https://developer.paypal.com/docs/api/webhooks/#errors","details":[],"links":[]}
    
    2023-02-07T11:40:33+00:00 ERROR Failed to subscribe webhooks: [WEBHOOK_URL_ALREADY_EXISTS] Webhook URL already exists
    2023-02-07T11:40:39+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: XXXXXXX
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-02-07T11:40:39+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: XXXXXXX
    Response: Array
    (
        [code] => 200
        [message] => OK
    )

    I’ve removed the Debug ID. I can supply that if required.

    Any ideas? Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @greencode,

    Thanks for reporting the issue. To resolve the problem, I suggest trying the following:

    1. Disconnect your account.
    2. Reconnect it using the onboarding wizard.

    This will create a new REST app and configure the webhooks for it.
    In many instances, these steps have effectively resolved similar issues. We hope it resolves the issue for you as well. Please keep us updated on the outcome.
    Thanks!

    Kind regards,
    Niklas

    Thread Starter greencode

    (@greencode)

    @niklasinpsyde Thanks for this. I have done this but whilst the issue has changed I’m now getting this in the log:

    2023-02-07T16:59:47+00:00 ERROR Webhook verification failed.
    2023-02-07T16:59:47+00:00 DEBUG POST https://api.paypal.com/v1/notifications/verify-webhook-signature
    Request Body: {"transmission_id""rel":"resend","method":"POST"}]}}
    Response Debug ID: XXXXX
    Response: Array
    (
        [code] => 200
        [message] => OK
    )

    I’ve removed all of the transaction details which appear after “Request Body:”. So, before every transaction now, we get the “webhook verification failed” message

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @greencode

    can you please go to the plugin settings to the tab “Connection” and try the webhook tools that you can find in the bottom of the page. Please press “Simulate” and see what the response is. After that it would be good to press “Resubscribe” as well, since it can’t do any harm. If you have a negative outcome after pressing the first button, please press simulate again after resubscribing to see if it improved.

    Please let us know if this helps.

    Kind regards,
    Joost

    Thread Starter greencode

    (@greencode)

    Hi. I get the “The webhook was received successfully.” message when clicking simulate. I’ve clicked Resubscribe and that refreshed the page. I no longer get an option to “Simulate”.

    These are now in the log:

    2023-02-08T09:35:58+00:00 INFO Received simulated webhook.
    2023-02-08T09:36:17+00:00 DEBUG DELETE https://api.paypal.com/v1/notifications/webhooks/76V18668TS946781J
    Response Debug ID: 303c766689794
    Response: Array
    (
        [code] => 204
        [message] => No Content
    )
    
    
    2023-02-08T09:36:17+00:00 INFO Webhooks deleted.
    2023-02-08T09:36:17+00:00 DEBUG POST https://api.paypal.com/v1/notifications/webhooks
    Request Body: {"url":"https:\/\/www.mysite\/wp-json\/paypal\/v1\/incoming","event_types":[{"name":"CHECKOUT.ORDER.APPROVED"},{"name":"CHECKOUT.ORDER.COMPLETED"},{"name":"CHECKOUT.PAYMENT-APPROVAL.REVERSED"},{"name":"PAYMENT.CAPTURE.REFUNDED"},{"name":"PAYMENT.AUTHORIZATION.VOIDED"},{"name":"PAYMENT.CAPTURE.REVERSED"},{"name":"PAYMENT.ORDER.CANCELLED"},{"name":"PAYMENT.CAPTURE.DENIED"},{"name":"PAYMENT.CAPTURE.COMPLETED"},{"name":"VAULT.PAYMENT-TOKEN.CREATED"},{"name":"VAULT.CREDIT-CARD.CREATED"},{"name":"PAYMENT.CAPTURE.PENDING"}]}
    Response Debug ID: 43ab8a25d4d8e
    Response: Array
    (
        [code] => 201
        [message] => Created
    )
    
    
    2023-02-08T09:36:17+00:00 INFO Webhooks subscribed.
    2023-02-08T09:36:18+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: f1bc020329a48
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-02-08T09:36:19+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: 8ec46ebbc1d32
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-02-08T09:40:07+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: 50bfa44c0017b
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-02-08T09:40:08+00:00 DEBUG GET https://api.paypal.com/v1/notifications/webhooks
    Response Debug ID: 4f2426b8d4ae7
    Response: Array
    (
        [code] => 200
        [message] => OK
    )
    
    
    2023-02-08T09:42:08+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-08T09:42:08+00:00 ERROR Failed to retrieve stored webhook data.
    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @greencode

    Would it be possible to do the same thing, but with all other plugins (except WooCommerce and PayPal Payments) turned off? We want to see if another plugin might be blocking the webhooks.

    Kind regards,
    Joost

    Thread Starter greencode

    (@greencode)

    @joostvandevijver Umm, not really. It’s a live site. I’ll have to create a staging version of that site and have a play around.

    Plugin Support Syde Joost

    (@joostvandevijver)

    Ok, please let us know if you are able to identify any cause for this problem and let us know if we can mark this thread as resolved.

    Kind regards,
    Joost

    Thread Starter greencode

    (@greencode)

    Umm, I just can’t get it to do the same on the staging site I set up at the same URL, but TBH it’s probably because there’s no traffic i.e. no customers on that staging site and I’ve had to use a Sandbox PayPal account. On the live site the PayPal Payments logs are endless with these:

    2023-02-10T14:58:02+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:58:02+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:58:37+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:58:37+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:58:59+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:58:59+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:59:12+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:59:12+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:59:27+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T14:59:27+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:01:50+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:01:50+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:02:08+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:02:08+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:03:06+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:03:06+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:03:46+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:03:46+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:38+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:38+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:45+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:45+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:47+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:04:47+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:06:36+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:06:36+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:06:58+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:06:58+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:07:33+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:07:33+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:08:32+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:08:32+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:10:14+00:00 ERROR Failed to retrieve stored webhook data.
    2023-02-10T15:10:14+00:00 ERROR Failed to retrieve stored webhook data.
    

    Very frustrating. There are no errors in the site error.log

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @greencode

    You probably need to onboard the account again to the plugin. This is in order to create a new REST API, with the correct URL included.

    Kind regards,
    Joost

    Thread Starter greencode

    (@greencode)

    @joostvandevijver Isn’t “onboarding” what I previously did after @niklasinpsyde said to do that?

    Plugin Support Syde Joost

    (@joostvandevijver)

    Yes, tat is correct, but that was before you create the staging site and changed the URL. Once you change the URL you should perform onboarding again to get a new REST API.

    Hope that makes sense.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    It has been quite some time since our last communication, so we will mark this thread as resolved. Please open a new thread if you are still facing issues or have questions that you need us to answer.

    Kind regards, Joost

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘ERROR Failed to subscribe webhooks’ is closed to new replies.