question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update validateCartItems to use Stripe V2 format

See original GitHub issue

Problem

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 of id.

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 and getCheckoutData 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:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dayhaysooscommented, Jul 4, 2021

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!

0reactions
andria-devcommented, Mar 21, 2021

I think we just need to finish scrubbing sku from the library and then we should be able to close this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found