我想对刚刚将用户交换到的订阅征税。这是我的尝试:
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 中无法做到这一点。