#rupinder_api

1 messages ¡ Page 1 of 1 (latest)

floral ginkgoBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1371462479212974131

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

subtle crow
#

klanra not showing for germany

#

const elements = stripe.elements(options);

// Create and mount the Payment Element
const paymentElementOptions = {
            layout: {
                type: 'tabs',
                defaultCollapsed: false,
            },
            defaultValues: {
                billingDetails: {
                    address: {
                        country: '{{get_system_region()->code}}'
                    }
                }
            },
            fields: {
                billingDetails: {
                    address: {
                        country: 'never' // Hides country field
                    }
                }
            }
        };
const paymentElement = elements.create('payment', paymentElementOptions);
paymentElement.mount('#stripe-checkout-form');
young aspen
#

Are you creating the Payment Intent before you init Elements?

subtle crow
#

no

young aspen
subtle crow
#

let me do it

young aspen
#

Also, what does 'not showing for germany' mean? Is the Stripe account Gereman? Are you (the customer) located in Germany? What currency are you using?

#

BNPLs like Klarna are generally 'domestic' only so could be that it's being filtering our because of that

subtle crow
#

// Set up Stripe.js and Elements to use in checkout form
const elements = stripe.elements(options);

// Create and mount the Payment Element
const paymentElementOptions = {
            layout: {
                type: 'tabs',
                defaultCollapsed: false,
            },
            defaultValues: {
                billingDetails: {
                    address: {
                        country: '{{get_system_region()->code}}'
                    }
                }
            },
            fields: {
                billingDetails: {
                    address: {
                        country: 'never' // Hides country field
                    }
                }
            }
        };
const paymentElement = elements.create('payment', paymentElementOptions);
paymentElement.mount('#stripe-checkout-form');
#

I have in my account to show klanra for germany

young aspen
#

You just sent me the same code

#

I need to see the stripe.elements(...) function code

young aspen
subtle crow
#

I am developer, my client is from germany

#

he is not able to view it, it was visible earlier

young aspen
subtle crow
#

const options = {
mode: 'payment',
amount: {{ intval($sum_total * 100) }},
setupFutureUsage: 'off_session',
currency: '{{ strtolower($currency->code) }}',
appearance : {
theme: 'stripe',
variables: {
colorPrimary: '#0570de',
colorBackground: '#F0F0F0',
colorText: '#30313d',
colorDanger: '#df1b41',
spacingUnit: '5px',
fontWeightNormal: '500',
border: 'none',
accessibleColorOnColorPrimary: '#1A1B25',
logoColor: 'dark'
},
rules: {
'.Input': {
backgroundColor: '#ffffff',
border: '2px solid #4FAD54 '
}
}
}
};

// Set up Stripe.js and Elements to use in checkout form
const elements = stripe.elements(options);
#

this?

young aspen
#

Yep! And this will be the issue: setupFutureUsage: 'off_session'

subtle crow
#

ok

young aspen
#

So we filter it out automatically. If you remove that, it'll be there

subtle crow
#

ok thankyou