#AlienSoft
1 messages ยท Page 1 of 1 (latest)
Hi there
hey
yh
Do you have a request ID you can share?
well, it's not even generating a reqID
Okay what is the error exactly?
so, if i do this on the intend, it works
"metadata" => array(
"User 2 Email" => $jsonObj->email2, //Emails of other Users
"User 3 Email" => $jsonObj->email3,
)
but if i set this as a variable: i/e
$metadata = array(
"User 2 Email" => $jsonObj->email2, //Emails of other Users
"User 3 Email" => $jsonObj->email3,
)
then on the intent i have:
"metadata" => $metadata
metadata shouldn't be an array but an object
like a json obj?
how can i populate the obj outside the intent, then pass it on the intent
Nah just a PHP obj. Try ```$metadata => [
"User 2 Email" => $jsonObj->email2, //Emails of other Users
"User 3 Email" => $jsonObj->email3,
]```
thanks. but it's not liking that either
What error do you see?
I just tested the above and it works fine
Can you try hardcoding the email? LIke: $metadata = ["user 2 email" => 'test@test.com', "user 3 email" => 'test2@test.com]
strange. nope
What error? ๐
500: well the page isn't rendering at all
And everything works fine if you just hard code the metadata?
Can you show me your relevant code?
yh
Also whoops I was doing $metadata => above when it should have been $metadata =
I assume you didn't do that though?
basically i have quite a few metadata's but i don't want to be adding them all on the intent incase some are EMPTY etc.. so I would like to build the metadata obj and pass that on to the intent
yh same result ๐
Yeah I mean that all makes perfect sense. It sounds to me like something with how you are building your $metadata object is off
The Stripe API will handle it just fine if it is created correctly
oh oh i got it working ๐
should have been an array
$metadata = array ();
i was missing the semicolon on my first call ๐
as the stripe intent doesn't require one
Glad you got it working!