Also I have no idea if there’s any usage to the secret key, or what I should put in the “Client ID - dev” part.
The issue I’m experiencing is that when I click on the “Checkout” button, it opens up the popup, but when I enter email/password, it says the user doesn’t exist. while I verified a few times that I can login with those credentials.
Huge thanks to any help!
I had similar issues. Copilot’s plugins aren’t documented, and they’re kind of a mess. Their indications to “look at the PayPal documentation” don’t help with configuration of their plugins either. I understand that they make these plugins free so that they can generate leads for their business, but it seems to me that they should at least help document the basic setup.
Regardless of my frustrations, here’s how I figured out how to set up the app:
In the plugin settings:
-Client ID (Headers): Put your live client id here
-Sandbox Client Id: Put your Sandbox client id here
-Live Client ID: Put your live client id here
-Client ID (Headers) - dev: Put your Sandbox client id here
-Sandbox client Id - dev: Leave this blank
-Live Client ID - dev: Leave this blank
If you need to charge in a different currency than USD and are getting issues, append “¤cy=ABC” (where ABC is the currency code) to the Client ID (Headers) and Client ID (Headers) - dev Ids. This will cause the script to grab the sdk in the correct currency code.
If you get a user doesn’t exist error when testing in sandbox, its because PayPal requires you to make special sandbox accounts for sanbox testing. Real accounts won’t be recognized here. Check your PayPal developer dashboard, there should be a section for sandbox accounts.
From what I can tell (though I haven’t used this feature), the Secret key is used for actual API calls, not the checkout button. To get an access token, you have to encode your client id/secret key in base64 and pass it into the call. I can’t imagine that this is secure, however, unless you’re doing it on the backend, since base64 encoding is easily decoded, thus you risk exposing your secret key.