Quick setup for individual items button goes to sandbox

DSIChristine
Contributor
Contributor

When I use the quick setup for a simple checkout button without frills or integration it takes the user to sandbox rather than proper checkout....? How do I fix this?

 

image_2021-10-26_093315.png

Login to Me Too
1 REPLY 1

MTS_Jennifer
Moderator
Moderator

Hello,

Thank you for posting to the MTS Community.

If you are using a Smart Payment Button that was created from your PayPal Account, the initial default setting is sandbox.

It is using a placeholder value to get the button code created for you. If you look at this line of code <script src="https://www.paypal.com/sdk/js?client-id=sb&currency=USD " data-sdk-integration-source="button-factory"></script> you can see sb for the client-id, which means sandbox.

Since the "client-id=sb" is what tells PayPal that this button should be pointed to the sandbox, this needs to be replaced by your live client id.

Here are the steps to replacing the place holder sb with your live client id: 

  • Log into the Developer Dashboard at https://developer.paypal.com
  • On the My Apps & Credentials page, toggle to Live 
  • To create an app, click Create App in the REST API apps section. 
  • Type a name for your app and click Create App. (Any name as long as it doesn't have special characters in it)
  • Copy and save your Rest API Client ID
  • The Client ID listed will be the Client ID that you need to replace in the button code

Replace the 'sb' with the full client ID, and make sure that there are no spaces present in the Client ID that you paste in.

<script src="https://www.paypal.com/sdk/js?client-id= sb&currency=USD" 

Once you do this, your payment button should connect to your PayPal account as expected.

 

Thank you,

Jennifer

MTS

PayPal

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.