PayPal Checkout Add-On, Webhook verification fails ...Over and Over

No matter what I do, every transaction initially returns “Webhook verification failed” and the transaction is listed as “Pending” in GravityForms. Hours later, it appears they clear. See short video and logs below.

Any help is greatly appreciated.

Here is a simple video demonstrating the problem (and showing the log results). Also, logs below.

Be Advised: I made this donation via PayPay Sandbox at 1:40 AM. The transaction came back as “Pending” with the log error: "Webhook verification failed. PayPal Debug ID: " and some ID numbers.

2023-03-12 1:46:00.420782 - DEBUG --> GFPaymentAddOn::validation(): Authorization result for form #63 submission => Array
(
    [is_authorized] => 1
)
 
2023-03-12 1:46:00.429785 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Checking for feeds to process for entry #144 for gravityformsppcp. 
2023-03-12 1:46:00.429897 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Starting to process feed (#102 - PayPal Donation (One Time)) for entry #144 for gravityformsppcp 
2023-03-12 1:46:00.429944 - DEBUG --> GFFeedAddOn::maybe_process_feed(): Marking entry #144 as fulfilled for gravityformsppcp 
2023-03-12 1:46:02.712826 - DEBUG --> GF_PPCP::process_capture(): Updating entry #144 with result => Array
(
    [is_success] => 1
    [transaction_id] => 3DK230732K2249451
    [amount] => 25.00
    [payment_method] => PayPal
)
 
2023-03-12 1:46:02.716943 - DEBUG --> GFPaymentAddOn::add_pending_payment(): Processing request. 
2023-03-12 1:46:45.519691 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Initializing callback processing for: gravityformsppcp 
2023-03-12 1:46:45.746464 - ERROR --> GF_PPCP::get_webhook_event(): Webhook verification status is FAILURE 
2023-03-12 1:46:45.746643 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Result from gateway callback => WP_Error Object
(
    [errors] => Array
        (
            [failed_verification] => Array
                (
                    [0] => Webhook verification failed. PayPal Debug ID: 39b6719075511
                )

        )

    [error_data] => Array
        (
        )

    [additional_data:protected] => Array
        (
        )

)
 

However, checked this morning, and apparently, at 4:00 AM the transaction went through, and the logs show the following:

2023-03-12 3:39:37.266360 - DEBUG --> GFPaymentAddOn::process_callback_action(): Processing callback action. 
2023-03-12 3:39:37.267584 - DEBUG --> GFPaymentAddOn::complete_payment(): Processing request. 
2023-03-12 3:39:38.162767 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Result of callback action => 1 
2023-03-12 3:59:46.914475 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Initializing callback processing for: gravityformsppcp 
2023-03-12 3:59:47.205542 - DEBUG --> GF_PPCP::log_webhook_event_details() Webhook log => Array
(
    [id] => WH-52F12286Y1960620H-76Y69290NF9289734
    [type] => PAYMENT.CAPTURE.COMPLETED
    [event_version] => 1.0
    [resource_version] => 2.0
)
 
2023-03-12 3:59:47.208765 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Result from gateway callback => Array
(
    [id] => WH-52F12286Y1960620H-76Y69290NF9289734
    [entry_id] => 144
    [transaction_id] => 3DK230732K2249451
    [type] => complete_payment
    [amount] => 25.00
)
 
2023-03-12 3:59:47.208863 - DEBUG --> GFPaymentAddOn::process_callback_action(): Processing callback action. 
2023-03-12 3:59:47.210572 - DEBUG --> GFPaymentAddOn::complete_payment(): Processing request. 
2023-03-12 3:59:48.029735 - DEBUG --> GFPaymentAddOn::maybe_process_callback(): Result of callback action => 1 

Have you tried contacting PayPal with that Debug ID to see what it means?

Hey @chrishajer

Yes, I have. Opened a case. Waiting to hear back.

As I stated, hours later, the transaction is paid. But obviously, those wait times are unacceptable.

But this experience has actually raised a few more questions -but not necessarily “problems”- that I have concerning this PayPal Checkout Addon. I will do a short video today sometime to demonstrate these concerns, but the short version is as follows:

It seems that what happens behind the scenes when the PayPal Checkout Addon is connected to PayPal’s sandbox is like a “black box”, wherein we (or at least “greenhorns” like me) aren’t really sure what IS happening.

I know that a Sandbox App is created, and that to my knowledge, no webhooks are created (or at least they 're not showing in my Sandbox), but also, should I want to “disconnect” the PayPal Checkout Addon from PayPal, it appears (again at least on my Sandbox Account) that the Sandbox App remains.

I would like to get some clarification as to what is actually happening “under the hood” so to speak. I will do a video to clarify as soon as I can.

Preston

@chrishajer

Greetings Chris,

PayPal finally got back to me and stated the following (emphasis mine):

The error message you are seeing means that the webhook did not perform verification successfully.
Can you please provide the following:

  • Sandbox Client ID
  • Sandbox Business Account
  • Webhook Listener url

First, I went to view the account to see if a Webhook exisited. I did so by following the steps below:

  1. Logged into developer.paypal.com
  2. Clicked "Sandbox Accounts" link
  3. Selected a Business Account (i.e. sb-123etc@personal.example.com)
  4. On the business Account I selected “View/Edit Account
  5. An “Account Details” Pop-up appears, wherein I clicked the “API Credentials” tab
  6. Then, under the “Rest Apps” section, I clicked on the App Name: MyApp_Gravity_Forms (which, I assume is the generic name used when creating the Rest App)
  7. This brings up another page with the details for that particular Rest App.
  8. At the bottom of this page is a section called “SANDBOX WEBHOOKS” - This section is empty.

So, no webhook was created. Just to contrast this I used a different plugin to connect to PayPal Sandbox.

  1. I installed GiveWP and also put it in Sandbox mode and connected to PayPal Sandbox.
  2. I then follow the same process outlined above.
  3. GiveWP connection created a Rest App called “MyApp_John_Does_Test_Store
  4. Clicking on that Rest App profile page, I noted that the “SANDBOX WEBHOOKS” section at the bottom of that page did have a webhook entry (see image).

So, this raises a few questions concerning the “webhook” error message.

  1. In setting up the PayPal Checkout Addon, I saw no mention of a need to setup a Webhook. Did I miss something? If so, please advise.
  2. The same goes for the webhook url? Using the previous PayPal addon, I do not recall ever setting up a “webhook” (unless the old ipn setup was really a webhook of some kind).
  3. Given that GiveWP did setup a webhook, I’m left to ask if this is something that should be done in the background by the PPCO Addon?

To conclude,

I cannot provide PayPal support with a Webhook Url (which it appears to assume does exist), because I don’t have one.

Please advise,
Preston

Update:

Got a well-written reply from Samuel of Gravity Forms support. He explained how this “should” be traceable through PayPal. He also walked me through how there is nothing on the Gravity Forms side which is generating the error.

But after several attempts at getting anything other than a “cut-and-paste” answer from PayPal, it became pretty clear that PayPal support sucks. Never even came close to an answer, even with the PayPal Debug ID.

PayPal support is a black hole & a total waste of time.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.