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);
}