我在订阅时添加发票项目时遇到问题,目前正在敲打我的头.
我在条纹上创建了一个发票项目,我希望发票项目包含在定期付款中
这是我的代码,它在第一张发票上添加了发票项目,但在下一张发票上没有.
$new_customer = Stripe_Customer::create(array( 'card' => $card, 'email' => $email,) ); Stripe_InvoiceItem::create(array( 'customer' => $new_customer['id'], 'amount' => $additiona_charges, 'currency' => 'gbp', 'description' => 'Addtional Cities' )); $new_customer->updateSubscription(array('plan' => $selected_plan, 'prorate' => true));
在我目前的设置.我根据订阅时的客户选择收取额外的自定义费用,这样我需要在定期付款时添加额外费用.
它是这样的
1 Cookie - 99GBP / Per month 2 Cookies - 199GBP / Per month 3 Cookies - 300GBP / Per month
-With Candle - +20GBP // must be included on recurring payment. -With Icecream - +26GBP // must be included on recurring payment. -With Cheese - +28GBP // must be included on recurring payment. -With Ketchup - +30 // must be included on recurring payment. -With Poison (for your X) - +50 // must be included on recurring payment.
我希望有人可以提供帮助.非常感谢
干杯肯恩