#marina_code
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/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.
- marina_code, 2 hours ago, 15 messages
- marina_code, 6 hours ago, 4 messages
Hey there, can you explain what you're trying to do and what is not behaving as your expect related to this customer?
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.
Can you share what you see in Elements and snippets detailing how you're initializing Stripe.js / Payment Element?
This is what I see, and I need to contact FE collegue for the code.
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
How to change it?
hi there, you can add a billing address using the API https://docs.stripe.com/api/payment_methods/update#update_payment_method-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can I do that throw Stripe Dashboard?
I do that throw stripe dashboard
I will try now
we're not super familiar with dashboard functionality in this channel (we mainly handle API questions) but yes, you should be able to
I add billing address but nothing happend
ok, are you following a particular guide for your implementation? such as https://docs.stripe.com/payments/save-during-payment?payment-ui=elements#save-payment-methods
Yes
ok, can you show me the code you're using to initialize the Payment Element?
$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);
that looks like code to create a Payment Intent, can you share the JS code you're using to instantiate the Payment Element?
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} />
👋 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?
I tested this in my local environment.
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
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?