-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
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
Using a fixed_amount in Checkout for shipping causes version error #1485
Comments
@airjoshb Can you share the exact code you are using end-to-end to reproduce this? The code you shared looks like part of our Test suite so I'm not really grasping what the bug is |
Sorry for the confusion @remi-stripe, I was using the test code to point out where the v1 error was coming from. Here is my code and I suspect it is some sort of syntax change from a previous version as it was working before I did a long overdue upgrade.
|
The code you shared isn't sufficient to reproduce unfortunately. Multiple of those lines reference variables that aren't set first so I am not sure how to reproduce. My gut says that the code erroring is not what you think it is, that Checkout Session creation works properly and something else in your code is erroring or failing. Can you try and provide a really simple end to end reproduction script with clear logs showing which part is crashing. I did look into our logs and I see some requests where the parameters look like this:
So right now it does look like your own code is passing a parameter/hash named |
I hear ya, @remi-stripe, however, if I replace this block,
with
It works perfectly fine, so there doesn't seem to be another place where v1 is being passed except by the url the gem is posting from. |
@airjoshb Can I ask you to share an exact script to reproduce this? Your earlier example had local variables that don't exist. Unfortunately without a clear repro I'm coming up empty right now on what could cause this. |
Describe the bug
When describing shipping_options in a Stripe::Checkout::Session.create call in Checkout, using "type: 'fixed_amount'" triggers the following error,
Received unknown parameter: v1
When looking through the code, I found the issue in testing, which looks like it is appending "v1" to the url
To Reproduce
Add a "fixed_amount" type to shipping_rate_data in a create Checkout session call
Expected behavior
We should get the fixed amount information as an option.
Code snippets
Update 3:50pm PST: It appears that this error is triggered when more than one shipping_rate_data is described in a hash.
OS
macOS
Language version
ruby 3.2.5
Library version
13.1.1, 13.1.0
API version
2024-10-28.acacia
Additional context
No response
The text was updated successfully, but these errors were encountered: