我想对我刚刚交换用户的订阅征税。这是我的尝试:
protected function swapToYearlyPlan(){
$company = Auth::user()->company;
$customer = $company->subscription()->getStripeCustomer();
$company->subscription('Gold Annual Plan')->swap();
// This doesn't seem to work -- no error message or anything.
$company->subscription()->tax_percent = 5;
return 'Upgraded to Gold Annual Plan w/ tax!!';
}
我查看了Laravel Cashier文件,但无法在StripeGateway.php
文件中找到与税收相关的任何代码。我最终担心的是,在这个版本的Laravel Cashier中无法完成。