Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » PayPal API Generate Token 401 Unauthorized

  • Hello Support,

    On the site I have linked to Query Monitor is throwing a 401 Error. It is in relation to the PayPal API. From the start – PayPal is working on the site in 2 places – GiveWP Donations and WooCommerce PayPal Standard gateway. Both are working without issue.

    The GiveWP Plugin is the latest version 2.21.0. WordPress is version 6.0 and all plugins and the Theme are the latest versions.

    However the Query Monitor plugin is showing this (Click link to the Gyazo screenshot)

    https://i.gyazo.com/88219b79aac73618b885f3975dcec70a.png

    The Details are
    Method: POST
    URL: https://api.paypal.com/v1/identity/generate-token
    Status: 401 Unauthorized
    Stack Trace:

        Give\P\P\R\MerchantDetails->getClientToken()
        wp-content/plugins/give/src/PaymentGateways/PayPalCommerce/Repositories/MerchantDetails.php:152
        Give\P\P\ScriptLoader->loadPublicAssets()
        wp-content/plugins/give/src/PaymentGateways/PayPalCommerce/ScriptLoader.php:154
        Give\H\Hooks::Give\H\{closure}()
        wp-content/plugins/give/src/Helpers/Hooks.php:43
        do_action('wp_enqueue_scripts')
        wp-includes/plugin.php:476
        wp_enqueue_scripts()
        wp-includes/script-loader.php:2156
        do_action('wp_head')
        wp-includes/plugin.php:476
        wp_head()
        wp-includes/general-template.php:3042
        responsi_header()
        wp-content/themes/responsi/functions/theme-functions.php:345
        load_template('wp-content/themes/responsi/header.php')
        wp-includes/template.php:770
        locate_template()
        wp-includes/template.php:716
        get_header()
        wp-includes/general-template.php:48

    GiveWP is configured to use PayPal Donations and this is a verified charity with PayPal.

    I cannot figure out why this is happening – so I thought I had better let you know.

    I can give you admin access to the site to take a look if you wish? If so please use the Contact Form on a3rev to send me an email and I’ll set that up for you.

    Thank you
    Steve

    • This topic was modified 1 month, 3 weeks ago by Steve Truman.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Rick Alday

    (@mrdaro)

    Hi @a3rev,

    That error can usually be resolved by disconnecting and reconnecting PayPal. You need go to Donations > Settings > Payment Gateways > PayPal and clicking the “Disconnect” link in “PayPal Connection”.

    For a bit of context, in order to process payments over Paypal’s API, third parties (like GiveWP) have to store what’s called a “token” and send that token along with the payment information. The token verifies that the application is allowed to do transactions over the API. If Paypal is unable to verify the token it will throw that error message.

    If disconnecting and reconnecting PayPal does not fix the issue, I’d recommend reaching out to them. The form on our site at https://givewp.com/paypal-onboarding-reports/ goes directly to them, to an email that they claim is staffed by folks familiar with the issues, who can help.

    GiveWP is very limited in how much we can do about failed token generation error because it isn’t happening in GiveWP, it is happening in Paypal.
    Paypal needs to look into what is happening. They need to see why their verification token isn’t being verified on their end.

    I wish I had better news or another way to help! But, in this case, Paypal needs to look at the verification token to resolve the issue.

    If you have any other questions, I’m happy to help. Have a great day!`

    Thread Starter Steve Truman

    (@a3rev)

    Hey Rick @mrdaro

    Thanks very much for your informative reply. I disconnected and reconnected the Pay Pal account and hey presto – issue resolved.

    Rick I have another issue – but I’ll mark this one as resolved and open a new ticket.

    Thank you
    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.