how to turn off sandbox?!?

AJhyWY6
New Community Member

I've added a paypal button to my webpage, but it's in sandbox mode. How do i turn off sandbox mode and start doing real transactions? SUPER FRUSTRATING!?!

Login to Me Too
3 REPLIES 3

MTS_Justin
Moderator
Moderator
Hello,

If you created a website payments standard button (buy now / add to cart / donation / subscription) in our sandbox environment, you will need to re-create the button within our production environment.

If you created a smart payment button, you will need to edit the button code and substitute the "client-id" shown in the script URL with a client-id from a "LIVE" REST application.

Example :

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

("test" is a default value we provide within our sample code. Change this for a "LIVE" REST application client-id)

Thanks !

Was my post helpful? If so, please give me a kudos!
Login to Me Too

myemcertain
Contributor
Contributor

Hi,

I'm having the same problem.  I have a paypal business account, and started at the main Paypal page; I clicked "Design your Paypal checkout code" (see below)

myemcertain_0-1668907233388.png

Then copied code from here: 

myemcertain_1-1668907323746.png

Code is as follows: 

<div id="smart-button-container">
      <div style="text-align: center;">
        <div id="paypal-button-container"></div>
      </div>
    </div>
  <script src="https://www.paypal.com/sdk/js?client-id=sb&enable-funding=venmo&currency=USD" data-sdk-integration-source="button-factory"></script>
  <script>
    function initPayPalButton() {
      paypal.Buttons({
        style: {
          shape: 'rect',
          color: 'blue',
          layout: 'vertical',
          label: 'paypal',
          
        },

        createOrder: function(data, actions) {
          return actions.order.create({
            purchase_units: [{"description":"3-month membership","amount":{"currency_code":"USD","value":80.44,"breakdown":{"item_total":{"currency_code":"USD","value":75},"shipping":{"currency_code":"USD","value":0},"tax_total":{"currency_code":"USD","value":5.44}}}}]
          });
        },

        onApprove: function(data, actions) {
          return actions.order.capture().then(function(orderData) {
            
            // Full available details
            console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));

            // Show a success message within this page, e.g.
            const element = document.getElementById('paypal-button-container');
            element.innerHTML = '';
            element.innerHTML = '<h3>Thank you for your payment!</h3>';

            // Or go to another URL:  actions.redirect('thank_you.html');
            
          });
        },

        onError: function(err) {
          console.log(err);
        }
      }).render('#paypal-button-container');
    }
    initPayPalButton();
  </script>

 

 

 

Then I pasted it into the iframe in Wix's editor-X

myemcertain_2-1668907458217.png

 

 

 

But testing reveals that it is trying to run in sandbox mode: 

myemcertain_3-1668907532365.png

 

And indeed, it won't let me proceed with a purchase (my Paypal account works fine for other purchases today and recently).  

 

Any help would be MUCH appreciated!  (o:  

 

cheers & blessings,

Garrett

Login to Me Too

whaatever
New Community Member

not really.

There is no way to get out of sand box mode. The button says I need to verify my email but its already verified. It just goes round in circles.  how can we switch to live mode. Its a simple enough question. selecting 'live' doesn't do anything.

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.