#vatron_code

1 messages ยท Page 1 of 1 (latest)

haughty axleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255962956039196743

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

mild wingBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

bleak forge
tranquil leaf
#

Hi @bleak forge I am passing in this exact params to payment element as of today ->

const options: any = {
mode,
amount: amountInSmallestCurrency(amount, currency),
currency: currency,
setupFutureUsage:
enableBNPL &&
!['ideal', 'bancontact'].includes(selectedPaymentMethod.value)
? undefined
: StripeSetupFutureUsage.OFF_SESSION,
captureMethod,
...paymentMethodTypesOrConfiguration,
payment_method_options: paymentMethodOptions,
}

createPaymentElement(options)

what should I pass in more exact;y to this ?

bleak forge
#

I'm not sure I understand. The values you're showing there inside of options are all ones that you would provide when creating the Elements instance, so it seems odd that you're passing them to a function named createPaymentElement
https://docs.stripe.com/js/elements_object/create_without_intent

The additional option you need to provide to suppress Apple Pay is not part of that. It's instead a parameter provided when creating the Payment Element instance. The link I provided in my earlier message links to the parameter, so you can see where it is expected to be provided when creating the Payment Element.

Can you share the code you're currently using to create the Payment Element instance rather than the Elements instance?

tranquil leaf
#

@bleak forge this code itself creates the payment-element instance, are we sure that adding this code would stop the payment element from renderring itself the apple pay options?

bleak forge
#

I'm not sure that's accurate. All the options you're sharing are for creating an Elements instance, not a Payment Element instance, but I can't see what you're doing inside of createPaymentElement so I can't be more certain on that.

tranquil leaf
#

@bleak forge

async function createPaymentElement(options) {
const elements = stripeSDK.value.elements(options)
stripeSDKElements.value = elements
let terms
if (props.stripeOptions?.terms) {
terms = props.stripeOptions?.terms
}
stripeSDKPaymentElement.value = elements.create('payment', {
layout: props.stripeOptions?.layout,
terms,
})}

bleak forge
#

Yup, so all of the options you showed are for creating the Elements instance here:
const elements = stripeSDK.value.elements(options)

You need to adjust the options you're passing to elements.create to include wallets.applePay with it set to never. This chunk here is what needs to be updated:

    layout: props.stripeOptions?.layout,
    terms,
  })}```
tranquil leaf
#

@bleak forge sorry but can you pls provide that snippet how will the second block of code be there ?

bleak forge
#
    layout: props.stripeOptions?.layout,
    terms,
    wallets: {
      applePay: 'never',
    },
 })}```
tranquil leaf
#

Thanks a lot @bleak forge

#

@bleak forge how do I check the renderring of apple pay and gpay since I am based out of India, tried one vpn and was over a compatible mac device but didn't help

bleak forge
#

You can't

#

Well, a VPN is the only way coming to mind, aside from having a teammate in a region that isn't blocked test it.

tranquil leaf
#

vpn doesn't work , another teammate had tried it too

#

but regardlessly , thank you for the apple pay fix will check this out