Laravel\Cashier\SubscriptionBuilder::getSubscriptionPayload PHP Метод

getSubscriptionPayload() защищенный Метод

Get the base subscription payload for Braintree.
protected getSubscriptionPayload ( Customer $customer, array $options = [] ) : array
$customer Braintree\Customer
$options array
Результат array
    protected function getSubscriptionPayload($customer, array $options = [])
    {
        $plan = BraintreeService::findPlan($this->plan);
        if ($this->skipTrial) {
            $trialDuration = 0;
        } else {
            $trialDuration = $this->trialDays ?: 0;
        }
        return array_merge(['planId' => $this->plan, 'price' => $plan->price * (1 + $this->user->taxPercentage() / 100), 'paymentMethodToken' => $customer->paymentMethods[0]->token, 'trialPeriod' => $this->trialDays && !$this->skipTrial ? true : false, 'trialDurationUnit' => 'day', 'trialDuration' => $trialDuration], $options);
    }