The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
$sub = \Stripe\Subscription::update($subscription_id, [
'trial_end' => $trial_end,
'cancel_at_period_end' => false,
'items' => [
[
'price_data' => [
'currency' => 'usd',
'product' => $product_id,
'recurring' => [
'interval' => 'day',
'interval_count' => $duration
],
'unit_amount' => 30
]
]
],
'default_payment_method' => $paymentIntent->payment_method
]);