Adding disable-funding=credit to the url of the SDK causes no buttons to render

ashley_noto
New Community Member

If i do: 

https://www.paypal.com/sdk/js?client-id=sb&disable-funding=credit

 

It renders properly.  If I use my live client_id it renders properly:

https://www.paypal.com/sdk/js?client-id=LIVE_CLIENT_ID&disable-funding=credit


but if i try to get it to render with my sandbox ID it simply renders an empty div:

https://www.paypal.com/sdk/js?client-id=SANDBOX_CLIENT_ID&disable-funding=credit

 

No errors are being triggered and I am unable to regenerate a new client id for my sandbox account.  Does anyone know why this is happening?

Login to Me Too
2 REPLIES 2

gmccarthy
Contributor
Contributor

I'm having the exact same problem. 

 

Everything works fine if I ONLY include client_id query parameter. Everything else seems to break my sandbox. Any help would be appreciated.

 

 

Login to Me Too

gmccarthy
Contributor
Contributor

I was able to overcome the problem. First of all, I was using Vue.js

 

I solved the issue by using Vue.$nextTick() and then rendering the buttons in the promise that is returned.

 

Original (broken) code:

        mounted() {

                    paypal.Buttons({
                        createOrder: this.createOrder,
                        onApprove: this.onApprove,
                      style: {
                        color:   'gold',
                        shape:   'rect',
                        size:    'small',
                        label:   'checkout',
                        layout:  'horizontal',
                        tagline: false,
                      }
                    }).render(this.$refs['products-house']);
        }

Working code:

 

        mounted() {
                this.$nextTick()
                  .then(() => {
                    paypal.Buttons({
                        createOrder: this.createOrder,
                        onApprove: this.onApprove,
                      style: {
                        color:   'gold',
                        shape:   'rect',
                        size:    'small',
                        label:   'checkout',
                        layout:  'horizontal',
                        tagline: false,
                      }
                    }).render(this.$refs['products-house']);
                });
        }
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.