paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
238 stars 83 forks source link

[Bug] PayPal Credit button only shows if vault=true #577

Open lmgroger opened 3 days ago

lmgroger commented 3 days ago

Library used

paypal js

๐Ÿž Describe the Bug

PayPal Credit button won't show unless vault=true

๐Ÿ”ฌ Minimal Reproduction

Javascript error: "credit is not eligible"

        <div id="paypal-button-container">
        <script src="https://www.paypal.com/sdk/js?client-id=test&buyer-country=US&currency=USD&components=buttons,messages"></script>
        <script type="text/javascript">
            paypal.Buttons({
                style: {
                    shape: 'rect',
                    size: 'small'
                },
                fundingSource: paypal.FUNDING.CREDIT
            }).render('#paypal-button-container');
        </script>

๐Ÿ˜• Actual Behavior

PayPal Credit button is not rendering and creating javascript error "credit is not eligible"

๐Ÿค” Expected Behavior

I feel like PayPal Credit button should be shown without vault=false since it shows up as payment method for both vaulting and non-vaulting transactions (requestBillingAgreement)

๐ŸŒ Environment