#one_checkout-information

1 messages ยท Page 1 of 1 (latest)

signal minnowBOT
#

๐Ÿ‘‹ 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.

acoustic spireBOT
#

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.

mossy yew
acoustic spireBOT
fringe ibex
#

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

mossy yew
#

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?

fringe ibex
#

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

mossy yew
#

Can you connect me to Karbi

fringe ibex
#

no

mossy yew
#

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.

fringe ibex
#

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

mossy yew
#

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.

fringe ibex
#

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?

mossy yew
#

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.

fringe ibex
#

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.

mossy yew
#

Where do I file a complaint about you.

#

I want to show them this log.

fringe ibex
#

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

mossy yew
#

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.

fringe ibex
#

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

mossy yew
#

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.

fringe ibex
#

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

mossy yew
#

How do I copy this chat log?

fringe ibex
mossy yew
#

Now you want to help. I had to beg you for help.

#

You are lazy

fringe ibex
#

Okay I tried, I will stop here. Please work with support for 1:1 help moving forward.