#nimish-tank_code

1 messages ¡ Page 1 of 1 (latest)

magic kettleBOT
#

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

📝 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.

last heart
#

Stripe doesn't copy metadata from one object to another. You'd need to manually update the Charge object yourself once it is created

worn kite
#

How to update meta data in charge object

last heart
worn kite
#

$subscription = \Stripe\Subscription::create(array(
"customer" => $userdata->stripe_token,
"default_payment_method" => $card->card_id,
"items" => array(
array(
"price" => $subscription_pack->stripe_id,
),
),
"proration_behavior" => "none",
'metadata' => ["platform" => SUBSCRIPTION_PLATFORM, "transaction_type" => "subscription" , "machine_id" => $machine_id],
));

I have created a subscription to these metadata add-in charge objects. how do I do it?

magic kettleBOT
opal otter
#

I can't understand what "add-in charge objects" means, sorry, can you rephrase?

worn kite
#

I have a new subscription created to pass metadata used in the charge object how do I do it

#

$subscription = \Stripe\Subscription::create(array(
"customer" => $userdata->stripe_token,
"default_payment_method" => $card->card_id,
"items" => array(
array(
"price" => $subscription_pack->stripe_id,
),
),
"proration_behavior" => "none",
'metadata' => ["platform" => SUBSCRIPTION_PLATFORM, "transaction_type" => "subscription" , "machine_id" => $machine_id],
));

this meta data add in charge object

opal otter
#

no, it adds to the Subscription object.