• Resolved avviano

    (@avviano)


    I have entered API crententials manually (including clients PP live key, secret key, merchant ID and correct Email address). It says it is connected, and seems to be fine. But eventually I get this error:

    Authentication with PayPal failed: Could not create token.

    Please verify your API Credentials and try again to connect your PayPal business account. Visit the plugin documentation for more information about the setup.

    I checked all manuals and support pages I could find, but cannot resolve this issue on my own.

    Question: As I am on a deadline for a client, is it possible to use the old Paypal plugin (which always worked well) without any future repercussion. It seems the new plugin hasn’t been adequately tested in real situations (and in conjunction with other plugins). As I see so many complaints.

    Thank you,
    Cheers
    Walter

    • This topic was modified 2 years ago by avviano.
    • This topic was modified 2 years ago by avviano.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter avviano

    (@avviano)

    Here is a log entry:

    2022-11-04T16:04:59+00:00 DEBUG POST https://api.paypal.com/v1/oauth2/token?grant_type=client_credentials
    Response Debug ID: a73884c82f40e
    Response: Array
    (
    [code] => 401
    [message] => Unauthorized
    )

    • This reply was modified 2 years ago by avviano.
    Thread Starter avviano

    (@avviano)

    I am using Siteground Optimizer for the caching plugin, not sure if this is relevant.

    Thread Starter avviano

    (@avviano)

    I am using Woo PP Payment Plugin Version 1.9.5 (So I assume the SG bug should have long been removed).

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @avviano,

    This error means that invalid credentials were provided. To connect your PayPal account, I suggest using the onboarding wizard as described here: https://woocommerce.com/document/woocommerce-paypal-payments/#connect-paypal-account
    This automatically configures the integration for your account.

    Kind regards,
    Niklas

    Thread Starter avviano

    (@avviano)

    Hi Niklas,

    Thank you for your quick help.

    How can I use the onboard wizard, if I am a webdesigner and relying on a client to provide API?

    I have contacted the client, but the information he supplied are the Live keys and seem correct. Why? Because when I enter the information and click “connect” Woo connects to Paypal and everything seems fine. It also says “Connected”. Only when I reload the page or leave the page do I get the error message.

    Cheers,
    Walter

    • This reply was modified 2 years ago by avviano.
    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @avviano,

    How can I use the onboard wizard, if I am a webdesigner and relying on a client to provide API?

    The onboarding wizard requires the regular PayPal login credentials. This process automatically creates a new REST App, registers the webhooks and enables a couple of features for the account (e.g. Vaulting or Tracking).
    If you don’t have access to the login details, only the account owner can use the onboarding wizard.

    Manually connecting the API credentials is also possible, and the credentials can be obtained as described here: https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input
    But in that case, you rely on having been provided the correct details.
    The most likely explanation for the Authentication with PayPal failed: Could not create token. error is invalid API credentials. There could also be another plugin interfering with the connection to PayPal, but that’s rather unlikely.
    The only way to ensure the credentials are correct is with the onboarding wizard.
    The team would be happy to take a look the API configuration if you could share a screenshot privately with us from here: https://paypal.inpsyde.com/docs/request-support/
    Please include a link to this thread. Thanks!

    […] but the information he supplied are the Live keys and seem correct. Why? Because when I enter the information and click “connect” Woo connects to Paypal and everything seems fine. It also says “Connected”.

    This can be a little bit deceiving, as the plugin settings will also load when you manually provide invalid credentials. All the API fields could be filled with just an X and after saving, the plugin settings would appear. But at the same time, the error notice would occur to signal the problem with the connection.

    Invalid credentials are currently not expected or handled exceptionally well. For example, there is an open issue that causes degraded site performance when the credentials are invalid, as the API may be called on each page load.
    This will be fixed in one of the next updates, but it is not a problem when the account is connected correctly.

    To test and configure the integration to your needs, we recommend creating and connecting a PayPal Sandbox account: https://woocommerce.com/document/woocommerce-paypal-payments/#testing-in-sandbox
    Then you would still need to figure out how to either get the login or the correct API credentials from the account owner. The documentation linked above should help thugh.

    Kind regards,
    Niklas

    sb0k

    (@sb0k)

    Hi, i have the same problem.
    First try, through the onboarding wizard and following the documentation.
    After pairing, when i get back to my site i get a failed onboarding error.

    Second try, manually setup.
    Logged in my developer account, i found my credentials between Live Api, there already was a profile, probably the one created during the first attempt through onboarding.
    I copied these credentials and put on my site..
    my account is connected, but i still get this error: “Authentication with PayPal failed: Could not create token.”

    I preventively disabled the old Paypal Standard Payment and all caching plugins.

    Following the error from logs:

    2022-11-08T08:56:06+00:00 DEBUG POST https://api.paypal.com/v1/oauth2/token?grant_type=client_credentials
    Response Debug ID: 9c56e5d9e5d27
    Response: Array
    (
        [code] => 401
        [message] => Unauthorized
    )
    
    Response Body: {"error":"invalid_client","error_description":"Client Authentication failed"}

    2022-11-08T08:56:06+00:00 WARNING Could not create token.`

    Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @sb0k @avviano

    Maybe you can try this one too please:

    To get the Identity Token from PayPal follow these steps:

    1. First, access your PayPal dashboard and go to Account Settings → Website payments. Then, tap the Update link next to the Website preferences option.

    2. Then, enable the Auto return for website payments, and add your store’s thank you page link to the Return URL field.

    3. After that, go to the Payment data transfer section and turn it on. The identity token should appear at the bottom of the section.

    Kind regards
    Andreas

    sb0k

    (@sb0k)

    Thanks @aweissinpsyde, i’ll let you know if it works.

    Thread Starter avviano

    (@avviano)

    I was able to solve the issue. As it turns out, my client send me the “sandbox” API credentials, even though I asked for life credentials. Unfortunately, getting the information at Papyal manually is a bit of a nightmare for non-developers and the majority of my clients say it is very complicated and “geeky”. Not at all easy or intuitive. The fact that sandbox credentials are selected by default doesn’t make it easier.

    I don’t like how this new process works at all, and as a webdesigner and developer, I have no desire to go through this nightmare process with clients every time, so I am seriously looking at discouraging clients from using Paypal and will simply ask them to work with Stripe instead. The amount of communication necessary for creating a manual API connection is just absurd.

    • This reply was modified 2 years ago by avviano.
    • This reply was modified 2 years ago by avviano.
    • This reply was modified 2 years ago by avviano.
    • This reply was modified 2 years ago by avviano.
    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @avviano,

    Any plugin using the latest PayPal functionality must be connected to a PayPal REST application.

    Unfortunately, getting the information at Papyal manually is a bit of a nightmare for non-developers and the majority of my clients say it is very complicated and “geeky”. Not at all easy or intuitive. The fact that sandbox credentials are selected by default doesn’t make it easier.

    The process to manually get the credentials is described here: https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input
    But the plugin simplifies this entire process with the onboarding wizard, as it automatically creates the credentials and registers everything that’s needed.
    For now, it cannot get easier than requiring PayPal login credentials.

    I don’t like how this new process works at all, and as a webdesigner and developer, I have no desire to go through this nightmare process with clients every time, so I am seriously looking at discouraging clients from using Paypal and will simply ask them to work with Stripe instead.

    The integration provides a way to make it easy with the onboarding wizard, and I don’t understand why this is not an option for you?

    You could connect your own sandbox account to configure the plugin as desired by the client. After everything was set up, the client could then connect their own PayPal account via the onboarding wizard, a last step before going live.
    This process is designed to be done by the PayPal account owner, but if you choose to not take advantage of the onboarding wizard, there is nothing that could be done from the plugin point of view to make this easier for you.

    In that case, I suggest providing your feedback to the PayPal merchant support.

    Kind regards,
    Niklas

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    We have not heard back from you in a while, so I’m marking this thread as resolved.
    The plugin configuration is still going through a revamp, with several settings left to be improved. A more intuitive onboarding experience will also be included sometime in the new year.
    If you have any further questions, please feel free to reopen this topic or create a new one.
    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Authentication with PayPal failed: Could not create token.’ is closed to new replies.