Untitled - Posted on January Mon 4th 11:11 PM (Never Expires) - Format: php - This is a modified post titled "Untitled".
  1. #Stripe website
  2.  
  3. \Stripe\Stripe::setApiKey('sk_test_sCb3YiGsBcNNiFdI1nyyEzHC');
  4.  
  5. $subscription = \Stripe\Subscription::retrieve('sub_49ty4767H20z6a');
  6. \Stripe\Subscription::update('sub_49ty4767H20z6a', [
  7.   'cancel_at_period_end' => false,
  8.   'proration_behavior' => 'create_prorations',
  9.   'items' => [
  10.     [
  11.       'id' => $subscription->items->data[0]->id,
  12.       'price' => 'price_CBb6IXqvTLXp3f',
  13.     ],
  14.   ],
  15. ]);
  16.  
  17. #Ours
  18. \Stripe\Subscription::update($external_subscription_id, [
  19.                                 'proration_behavior' => 'none',
  20.                                 'items' => [
  21.                                                 [
  22.                                                                 'price_data' => [
  23.                                                                                 'currency' => strtolower($newTerm->currency),
  24.                                                                                 'product' => $product_id,
  25.                                                                                 'unit_amount' => $newTerm->getFinalPrice(),
  26.                                                                                 'recurring' => [
  27.                                                                                                 'interval' => 'day',
  28.                                                                                                 'interval_count' => $newTerm->duration
  29.                                                                                 ],
  30.                                                                 ]
  31.                                                 ]
  32.                                 ]
  33.                 ]);

New Paste

Paste Options

Recent Pastes

9 days ago

EARN PAYPAL IN A

11 days ago

QUICK CASH VIA

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B