#one_checkout-information
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/1218252167929139352
๐ 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.
- one-love_pm-expansion, 6 minutes ago, 21 messages
- one_webhook-secret, 18 hours ago, 12 messages
- one-love_api, 1 day ago, 53 messages
- one-love_api, 2 days ago, 4 messages
- one_checkout-shipping, 3 days ago, 86 messages
- one-love_checkout-address-collection, 3 days ago, 5 messages
and 2 more
one_checkout-information
Hey @mossy yew ! The Checkout Session doesn't have that information. It lives on other objects. You have to understand what objects in our API have the information you are after and then access it.
My advice is to completely pause your work on webhooks for a bit and solely focus on accessing the information you want directly. Once that works you can port it to your WebhookEndpoint's code. But it'll be much easier to do this as a one-off PHP script while you iterate.
Right now your code does $stripe->checkout->sessions->retrieve( "$checkout_session_id", ['expand' => ['payment_intent.payment_method']] );
So the next step is to log exactly what you receive to your browser output or console to narrow down what you are after
I there anyone that can instruct me how to do that?
The event already came back. Is this retrieve now automatically added to the event that came back before this code?
Do I just access the same event before this code was added?
I am doing that, I'm helping you and telling you what to do next. You're the developer here writing and owning and understanding the code.
My point is that webhooks are hard because they only happen when an Event is received so it's painful. So it's better to write separate code to test first and only move to the webhook code once that works.
Right now you have one completed Checkout Session in your account that you can use to write PHP that will retrieve it, expand the information you want and then access it. That's your first step
Can you connect me to Karbi
no
You never explain properly
how do I skip you in the future. Karbi was very helpful.
Why can't I connect to Karbi.
Just no is your answer.
we're a team of people around the world, karbi is busy and doing something else.
Please try and work with me instead of complaining. I literally gave you advice to make your life easier. What is unclear? Please try and be descriptive, I can't know what you don't know. But I am an experienced PHP developer and can easily show you what you need if you focus on what is blocking you instead of being unhappy about me
I did expand it. How do I access it?
Your sensitive and rude.
Everytime I speak to you.
You told me what I already did.
I expanded it.
I don't want to hear how painful it is, and your condescending comments about me complaining and being the programmer.
I've expanded it. How do I access it.
So the next step is to log exactly what you receive to your browser output or console to narrow down what you are after
Did you do that? No, because if you did you'd see the problem.
Right now you aren't storing the information anywhere. You make the call but don't store Stripe's response back in a variable so you can't see it.
Once you do that, and dump the raw resource you will see every properties and their entire JSON path and understand how to access each one. I can show you but you need to temporarily move away from the webhook code to make your life easier.
Can you please try that?
By looking at my code. Have I done anything wrong.
I asked you what to log. Maybe if you did, you would see that I asked you if I should log the event that came before my retrieve request, and if it is automatically connected to the previous event.
Can you understand my last message.
Because I've repeated it twice.
okay
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once('vendor/autoload.php');
$stripe = new \Stripe\StripeClient([
'api_key' => 'sk_test_123',
]);
$checkoutSession = $stripe->checkout->sessions->retrieve(
'cs_test_b1E3ishBMBXAZyNjUM8J4FQ2g07i8wvQneqUrsS5UE0YxqgCGxXq3DAGqg',
[
'expand' => ['payment_intent.payment_method'],
]
);
echo "<br><pre>\n" . json_encode($obj, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) . "\n</pre><br>";```
do that in a one-off script please.
you're welcome to write to support https://support.stripe.com/contact
If you want to focus on your PHP and get help here you can, if you don't that's your choice and moving forward you can work with our support team 1:1
Okay Mr. Sensitive. Who took 20 minutes to give me the answer. After making me repeat myself multiple times. I want help just not from you. I will complain.
You give me attitude every time.
Are you willing to try what I asked you to do? It's fine if not, but I'd like to focus on the PHP part not your complaints for now if possible
Learning a new payment gateway is frustrating. Just because you know it because you do it everyday, doesn't give you the right to treat people like garbage
You live at Stripe. I don't. Every programmer knows it takes a week to implement. People like you make it more frustrating.
Keep your insults next time.
Are you willing to try what I asked you to do? It's fine if not, but I'd like to focus on the PHP part not your complaints for now if possible
How do I copy this chat log?
https://discord.com/channels/841573134531821608/1218252167929139352 you can share that URL, it's public
Okay I tried, I will stop here. Please work with support for 1:1 help moving forward.