#jellybeer-_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/1366504411844710412
đ 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.
- jellybeer-_code, 6 hours ago, 27 messages
- jellybeer-_code, 3 days ago, 13 messages
- jellybeer-_code, 4 days ago, 14 messages
- jellybeer-_checkout-modes-prices, 5 days ago, 37 messages
Hello there
Hmm not sure what you mean exactly.
Can you tell me me more about what you are trying to do and what the issue is?
ok on my website i have created a payment page. there you can choose from card, paypal, ideal and bancontact. suppose i choose card. i fill in everything and then i click on pay and then my products are paid and the default payment method is also saved immediately in the customer. in other words the default payment method for that customer is now his card with which he paid. then i tried it with the payment method 'ideal'. the payment succeeds, but it does not want to save it as default payment method. then i get this error:
The customer does not have a payment method with the ID pm_1RIxqFGdKuVLvOxUwrO7yR3l. The payment method must be attached to the customer.
Ah thanks for clarifying
i am really terrible at explaing hehe
iDEAL and Bancontact are single-use PaymentMethods. So in this flow they actually generate a SEPA Debit PaymentMethod that you need to use.
aha
That PaymentMethod is acccessible via the latest_charge.payment_method_details, see https://docs.stripe.com/payments/ideal/save-during-payment?platform=web#web-charge-sepa-pm
You want to grab the generated_sepa_debit PaymentMethod
ah ty i will try
i got this now:
\Stripe\Stripe::setApiKey($_ENV['STRIPE_SECRET_KEY']);
$paymentIntentId = $_GET['payment_intent'];
try {
// Haal PaymentIntent op
$paymentIntent = \Stripe\PaymentIntent::retrieve(
$paymentIntentId,
[
'expand' => ['latest_charge'] // <--- dit moet erbij staan!
]
);
// Voeg dit toe om alles te dumpen
header('Content-Type: application/json');
echo json_encode($paymentIntent, JSON_PRETTY_PRINT);
exit;
but i cant see the generated_sepa_debit part.
Can you provide the PaymentIntent ID or Checkout Session ID that you are testing with?
is this the id pi_3RIyGGGdKuVLvOxU1b9LpDCs?
Ah my bad, but i het the same result. I will send te new id
pi_3RIyOCGdKuVLvOxU1nvfsr39
is it because i am in test mode?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You can see that there is a generated_sepa_debit PaymentMethod
So you are doing something wrong in your code
In terms of retrieving it
omg i am stupid
i added expand' => ['latest_charge'] in de return url but not in the checkout part so i never send the latest charge
yup
Wahoo!
thanklss a lot. i have been trying stuff for a whole day ahah