I had the same issue in my svelte kit app and was able to solve it by following this stack overflow answer. Just add this function to your paypal.Buttons object: //Changes credit/debit button behavior to "old" version
onShippingChange: function(data,actions){
//if not needed do nothing..
return actions.resolve();
}, This opens the form in a new window just like the normal PayPal button does, but as far as I can tell it works the same.
... View more