Update validateCartItems to use Stripe V2 format
See original GitHub issueProblem
use-shopping-cart was made with the SKU
API in mind. We need to deprecate SKU
within USC, and provide the required object structure for Stripe V2 session IDs.
Also need to make sure we are backwards compatible with the SKU API.
Work Required
- Scrub
sku
from the library in favor ofid
.
Sku is also used to describe the entire product in some places. In those places it should just say item
. I would like to use product
but Stripe has a whole Product API, don’t want to confuse that.
- Make sure
validateCartItems
andgetCheckoutData
use the appropriate format for creating sessions with Stripe V2
Should probably have some kind of conditional for sku
so that if sku
exists, use the current function we have set up.
Details on how V2 should be here: https://stripe.com/docs/api/checkout/sessions/create
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
API upgrades | Stripe Documentation
Upgrading your API version. If you're running an older version of the API, upgrade to the latest version to take advantage of new...
Read more >Stripe API reference – curl
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries....
Read more >Stripe JS Reference
This reference documents every object and method available in Stripe's browser-side JavaScript library, Stripe.js. Use our React Stripe.js reference if you ...
Read more >Checkout migration guide | Stripe Documentation
If you use one of our Client libraries, upgrade to the latest version of the ... 30 days trial" data-amount="2000" data-label="Subscribe"> </script> </form>....
Read more >Stripe Elements | Stripe Documentation
Automatic input formatting as customers type; Complete UI translations to match your customer's ... Accept card payments, including advanced card use cases.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just FYI, the Stripe SKU API will continue to be deprecated, but
sku
is going to come back as a value. Not sure what kind of issues will arise there, but we’ll see!I think we just need to finish scrubbing
sku
from the library and then we should be able to close this.