I'd like to apply tax to the subscription I have just swapped the user to. Here is my attempt:
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!!';
}
I looked through the Laravel Cashier files and wasn't able to find any code relating to taxes whatsoever in the StripeGateway.php
file. My ultimate fear is that it can't be done in this version of Laravel Cashier.