#marina_code

1 messages · Page 1 of 1 (latest)

ebon meadowBOT
#

👋 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/1430195941628969030

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

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.

kindred hull
#

Hey there, can you explain what you're trying to do and what is not behaving as your expect related to this customer?

pale hawk
#

I am trying to display all saved cards that customer have on stripe account. I use Stripe Element with customer session.

#

I can only see one card for the user I mentioned.

ebon meadowBOT
kindred hull
#

Can you share what you see in Elements and snippets detailing how you're initializing Stripe.js / Payment Element?

pale hawk
#

This is what I see, and I need to contact FE collegue for the code.

kindred hull
#

I see you're setting the additional allow_redisplay values in the customer session request

#

Can you try adding a billing address (eg, billing_details[address] ) to the other PM to see if that changes the result?
pm_1POZrhCZU75Bkw8vjGvIRUW6 is the other card

pale hawk
#

How to change it?

vocal vigil
pale hawk
#

Can I do that throw Stripe Dashboard?

#

I do that throw stripe dashboard

#

I will try now

vocal vigil
#

we're not super familiar with dashboard functionality in this channel (we mainly handle API questions) but yes, you should be able to

pale hawk
#

I add billing address but nothing happend

vocal vigil
pale hawk
#

Yes

vocal vigil
#

ok, can you show me the code you're using to initialize the Payment Element?

pale hawk
#

$paymentIntentParams = [
'amount' => (string) $this->amountConverter->convertAmountToStripeAmount($amount, $currency),
'currency' => $currency,
'automatic_payment_methods' => [
'enabled' => true,
'allow_redirects' => 'never',
],
'customer' => $customer->getCustomerId(),
'metadata' => $metadata->toArray(),
'statement_descriptor' => $this->statementDescriptorBuilder->build($booking->getCharter()->getTitle()),
'capture_method' => 'manual',
'transfer_group' => $this->transferGroupBuilder->build((int) $booking->getId()),
];

    try {
        $paymentIntent = $this->stripeClient->paymentIntents->create($paymentIntentParams);
vocal vigil
#

that looks like code to create a Payment Intent, can you share the JS code you're using to instantiate the Payment Element?

ebon meadowBOT
pale hawk
#

const stripePromise = useMemo(() => {
if (paymentProvidersAuth?.stripe) {
return loadStripe(paymentProvidersAuth.stripe);
}
return null;
}, [paymentProvidersAuth]);

<Elements
  key={clientSecret}
  stripe={stripePromise}
  options={{
    // @ts-expect-error - no types for customerSessionClientSecret
    customerSessionClientSecret: isLoggedIn ? customerSessionClientSecret : null,
    clientSecret,
    appearance
  }}
>
  <StripePaymentForm />
</Elements>

<PaymentElement onChange={onChange} options={options} />

worldly sonnet
#

👋 Taking over this thread, catching up now

#

With the code you've shared so far, they look correct. Could you share your development website that reproduces the issue, so that I can check the client logs to understand what could have caused saved payment methods not being shown?

pale hawk
#

I tested this in my local environment.

worldly sonnet
#

I can't reproduce the issue with the code you've shared so far, so I don't have full visibility why this happened. It'll be helpful that you can deploy the changes in a public accessible website, which I can look into it further

pale hawk
#

I’ll need to check with someone from my company tomorrow to confirm whether I’m allowed to share our dev environment with someone outside the organization.
Would it be possible to keep this thread open until then?