#xfechx_api
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/1365286847705780245
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
What specifically is the problem with the code?
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
What exception is thrown in the try/catch
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
I think it is because the way I am using the try catch
But you cannot see it on your end?
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":[]}
Which line throws the error/fails to execute?
What's the format of the $connected_account variable?
Can't remember the exact older syntax for PHP, but that seems wrong if you're trying to set the stripeAccount param?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
Yeah just flying blind here without some actually exception/error to work on
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-> ....
Before heading out, I got rid of $connected_account. Maybe I am missing a parameter?
And I had the same error
I tried without that parameter also, same error
You need to clearly log the error in your console for us to resolve it.
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
What PHP library are you using? And what version?
There's no other way to call stripe-php functions: https://docs.stripe.com/api/payment_intents/retrieve?lang=php
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.
What PHP library are you using? And what version?
Can you please answer my question?
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
There's the correct way of doing things in each Stripe library. Why do you want to do it in a different way exactly?
Find out what?
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
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.
Can you please ask?
I need to know this, I need to know how to call that function like that.
I can try to look...
Thanks
You can try:
\Stripe\PaymentIntent::reteieve([id => ..., stripe_account => ...])
It seems like.