#rupinder_api
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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');
Are you creating the Payment Intent before you init Elements?
no
Can you share the code where you init the Elements group then? https://docs.stripe.com/js/elements_object/create_without_intent
let me do it
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
// 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
OK, but where are you located?
I am developer, my client is from germany
he is not able to view it, it was visible earlier
I'm still waiting on details I need from you before I can help
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?
Yep! And this will be the issue: setupFutureUsage: 'off_session'
Klarna doesn't support off_session: https://docs.stripe.com/payments/payment-methods/payment-method-support#buy-now-pay-later-api-support
ok
So we filter it out automatically. If you remove that, it'll be there
ok thankyou