I am getting an error when trying to run TEST payments using Cashier with Stripe when i create new subscriptions with ZERO (0) trial days:
trialDays(0) or trialDays()
$newMember = $user->newSubscription('eurotripr', $stripePlanId)->trialDays(0)->create($stripeToken, [
'email' => $request['membership-email'],
]);
Results in this error:
Stripe\Exception\InvalidRequestException
Invalid timestamp: must be an integer Unix timestamp in the future.
If I omit the trialDays() method altogether, i get an error that there is no Payment Method attached. This seemingly is because the Stripe Token is not being set on newSubcription() when trialDays() is omitted.
If i add days (trialDays(7) for example) the stripe payment hits stripe as an incomplete payment ending trial period. So theoretically it works if there is a trial period and the number of days is greater than 0.
I have looked for solutions here, Laravel.com, on StackOverflow, and other sites but all i'm finding states how to use 'trialDays()' instead of WHY it may not be working with 0 or NULL values.
Any ideas as to why I continue to get this error?