We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems like stripe doesn't like us sending across quantity as null. It wants either an integer or the key missing entirely.
quantity
null
If we filter this array to remove null values the subscription is updated as intended.
If we do not then we get a Stripe exception Stripe\Exception\InvalidRequestException with the message
Stripe\Exception\InvalidRequestException
Invalid integer:
/app/vendor/stripe/stripe-php/lib/Exception/InvalidRequestException.php:35 -- /app/vendor/stripe/stripe-php/lib/ApiRequestor.php:189 /app/vendor/stripe/stripe-php/lib/ApiRequestor.php:151 /app/vendor/stripe/stripe-php/lib/ApiRequestor.php:489 /app/vendor/stripe/stripe-php/lib/ApiRequestor.php:120 /app/vendor/stripe/stripe-php/lib/BaseStripeClient.php:134 /app/vendor/stripe/stripe-php/lib/Service/AbstractService.php:59 /app/vendor/stripe/stripe-php/lib/Service/SubscriptionItemService.php:62 /app/vendor/laravel/cashier/src/Subscription.php:834 /app/vendor/laravel/cashier/src/Subscription.php:890
This is not an issue when creating a new subscription as we only add the quantity key if the value is not null.
$billable->subscription()->addMeteredPrice('price_ab123');
The text was updated successfully, but these errors were encountered:
Urgh, should have added a test for that. Thanks @hailwood.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Description:
Seems like stripe doesn't like us sending across
quantity
asnull
. It wants either an integer or the key missing entirely.If we filter this array to remove null values the subscription is updated as intended.
If we do not then we get a Stripe exception
Stripe\Exception\InvalidRequestException
with the messageStacktrace
This is not an issue when creating a new subscription as we only add the quantity key if the value is not null.
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: