0

我想对刚刚将用户交换到的订阅征税。这是我的尝试:

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 中无法做到这一点。

4

1 回答 1

0

经过更多研究,看起来 4.2 似乎不支持开箱即用的此功能。您必须将税款作为单独的行项目单独添加到发票中。

我发现这篇文章很有帮助。

于 2015-12-03T21:13:12.920 回答