#xfechx_api

1 messages ¡ Page 1 of 1 (latest)

alpine spireBOT
#

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

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

fathom star
#

What specifically is the problem with the code?

astral rune
#

I am getting a server error

#

Even though I have try, catch

#

So not sure what the actual error is

#

I also have enabled debug mode (in wp) but still not able to see, that is why I need some help please

fathom star
#

What exception is thrown in the try/catch

astral rune
#

It is not throwing me any exception, I know I am doing something wrong

fathom star
#

You need to add some logging to your webhook endpoint code and find out what is throwing the exception that you're returning to us

astral rune
#

I think it is because the way I am using the try catch

#

But you cannot see it on your end?

fathom star
#

All we see is what your endpoint returns to us:
--- filling metadata now ------ API being used is: ------ Test Mode: ------ Stripe Source: ---event id: evt_3RGhstIVVhxSAz7H2JJfUxlN ---connected_account: ---origin: https://app.marlarecords.com ------ Origin: app.marlarecords.com ------ Destination: app.marlarecords.com ------ Internal Application ------ EVENT: CHARGE.SUCCEDED ------ payment intent not empty --- {"code":"internal_server_error","message":"<p>There has been a critical error on this website.<\/p><p><a href=\"https:\/\/wordpress.org\/support\/article\/faq-troubleshooting\/\">Learn more about troubleshooting WordPress.<\/a><\/p>","data":{"status":500},"additional_errors":[]}

fathom star
astral rune
#

Line 1044

#

When retrieving the payment intent object

fathom star
#

What's the format of the $connected_account variable?

astral rune
#

It works, actually it is empty therr

#

It has an array of connected account, but in this case is just empty

#

I think it is something else

#

$connected_account variable works everywhere, no worries with that.

fathom star
#

Yeah just flying blind here without some actually exception/error to work on

astral rune
#

What I am not sure is if the format of calling the function actually is working

#

I know, I am outside so cannot really change the code atm but wanted to see if you could help me point out if how I am calling (because it is older way) might be it. The modern way is using $stripe-> ....

alpine spireBOT
astral rune
#

Before heading out, I got rid of $connected_account. Maybe I am missing a parameter?

#

And I had the same error

astral rune
sour zealot
#

You need to clearly log the error in your console for us to resolve it.

astral rune
#

Hmmm. Can you please tell me the exaxt way to call that php function using that style?

#

Not using $stripe -> .....
But using \Stripe\PaymentIntent

#

Thanks

#

And then I can go ahead and test.
I cannot find in documentation how to use that style anymore and right now I won't change all code, just let me know the function and parameters, including connect parameters with an example.
Thank you

sour zealot
#

What PHP library are you using? And what version?

astral rune
#

Yes there is

#

Please find out.

#

If you look at the code I sent before, you will see the format, there is this style:

\Stripe\PaymentIntent::retrieve

#

And this style:

#

$stripe->paymentIntents->retrieve

#

You are new here?

#

I need the exact way to call the function using the first style thank you. I have been coming here for the past 10 years.

sour zealot
#

What PHP library are you using? And what version?
Can you please answer my question?

astral rune
#

I cannot tell right now, but if you ask your collages they will know what I am talking about.

#

It is a simple question

#

Please answer my question

sour zealot
#

There's the correct way of doing things in each Stripe library. Why do you want to do it in a different way exactly?

astral rune
#

............

#

How do I find out

sour zealot
#

Find out what?

astral rune
#

What you are asking, omg

#

Is this bureocracy? Please it is just a question, that was the older style of calling the stripe php library before, and after. As I said I have been coming here for help for the past 10 years. A few years back, that was the standard way of calling php stripe functions , until they change the way they are called.

I need to know (using the older style, see my example above) how to call the retrieve paymentintent function

#

\Stripe\PaymentIntent::

#

\Stripe\PaymentIntent::reteieve(....) i need to know which parameters are accepted/needed. And an example using connect parameters. Please

#

I really do not want to take your timr

#

Time*

#

@fathom star or @pearl python would know, they have been here for ages

#

Also, I dont know right now how to find out the API and library version, if you tell me how to find out I can say, but out of experience, I can tell you that the older way of calling functions (like how they are been called in my code) was a standard before, and then after. I don't think there is many ways other than those two in PHP to call them

sour zealot
#

Possibly there was, I don't know about it. But I am sure it's not around for many years.
There's no documentation about it anymore unfortunately.

astral rune
#

Can you please ask?

#

I need to know this, I need to know how to call that function like that.

sour zealot
#

I can try to look...

astral rune
#

Thanks

sour zealot
#

You can try:

\Stripe\PaymentIntent::reteieve([id => ..., stripe_account => ...])
astral rune
#

So first parameter is an array?

#

It is not the id by itself?

sour zealot
#

It seems like.

astral rune
#

Which parameters are needed in the array

#

[id => pi_xxyyzz] ??

#

Or anything else