GithubHelp home page GithubHelp logo

stripe-samples / checkout-netlify-serverless Goto Github PK

View Code? Open in Web Editor NEW
95.0 6.0 24.0 1.02 MB

Sell products on the Jamstack with Netlify Functions and Stripe Checkout!

Home Page: https://checkout-netlify-serverless.netlify.com/

License: MIT License

JavaScript 40.35% CSS 10.47% HTML 45.92% Shell 3.25%
stripe jamstack ecommerce stripe-checkout serverless netlify-functions

checkout-netlify-serverless's People

Contributors

ch-stripe avatar cjavilla-stripe avatar dawn-stripe avatar jlengstorf avatar thorsten-stripe avatar trag-stripe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

checkout-netlify-serverless's Issues

I see this error after deploying to netlify . .. I did add business name as request as well in stripe

I have the account set up .. still its giving the error

I see these in the Developer Tools ..
{"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'stripe'\nRequire stack:\n- /var/task/create-checkout.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","trace":["Runtime.ImportModuleError: Error: Cannot find module 'stripe'","Require stack:","- /var/task/create-checkout.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js"," at _loadUserApp (/var/runtime/UserFunction.js💯13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object. (/var/runtime/index.js:43:30)"," at Module._compile (internal/modules/cjs/loader.js:999:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)"," at Module.load (internal/modules/cjs/loader.js:863:32)"," at Function.Module._load (internal/modules/cjs/loader.js:708:14)"," at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)"," at internal/main/run_main_module.js:17:47"]}

And another
(index):1 Uncaught (in promise) IntegrationError: Missing value for Stripe(): apiKey should be a string.
at V ((index):1)
at J ((index):1)
at new e ((index):1)
at Ic ((index):1)
at HTMLFormElement.handleSubmit ((index):186)

This example seems to be broken. IntegrationError

Bug report

Describe the bug

This example seems to be broken. I have tried following along in the tutorial and deploying straight to Netlify from this repository.

To Reproduce

  1. Click 'Deploy to Netlify'
  2. Enter your test keys and deploy
  3. When you submit the form to add product and go to checkout and nothing happens
  4. Console log is reporting error:
Uncaught (in promise) IntegrationError: Invalid value for Stripe(): apiKey should be a string. You specified: undefined.
    at new r (https://js.stripe.com/v3/:1:5998)
    at ne (https://js.stripe.com/v3/:1:15554)
[inspiring-nightingale-14c416.netlify.app-1600401639578.log](https://github.com/stripe-samples/checkout-netlify-serverless/files/5243289/inspiring-nightingale-14c416.netlify.app-1600401639578.log)

    at ue (https://js.stripe.com/v3/:1:15998)
    at new uc (https://js.stripe.com/v3/:1:181160)
    at lc (https://js.stripe.com/v3/:1:182415)
    at HTMLFormElement.handleSubmit (https://inspiring-nightingale-14c416.netlify.app/:96:24)

Expected behavior

I expect the form to submit and to be forwarded to Stripe Checkout.

Cannot read property 'name' of undefined

The error:

Error during invocation: {
errorMessage: "Cannot read property 'name' of undefined",
errorType: 'TypeError'

After following the final video in the series on egghead.io, Im getting an error in the final netlify call.

my code look slike this:

    name: product.name,
    description: product.description,
    images: [product.image],
    amount: product.amount,
    currency: product.currency,
    quantity: validatedQuantity,

Getting a Bad Request, Missing form - Integrating Stripe

Hey, so I am creating a simple e-commerce site by integrating stripe. My problem is that every time I click “checkout” it throws me an error of “Bad request, missing form error”. I was told I didn’t need any redirects for stripe because it’s a serverless function and was also told that I place the .env file before my .gitignore which could be causing problems as well. I’ve been working on this for months and am trying to finish this up.

I didn't exactly follow what you have but it's similar.

Intermittent 502 error from serverless function

Hi @thorsten-stripe & @jlengstorf thanks for this tutorial it was super helpful!

I used it as a starting point to get a site up and running, but I've noticed an issue where the "buy" button doesn't work sometimes. It looks like the serverless function is returning a 502 error, very intermittently.

I clicked around on the demo, and was able to replicate the problem there. It seems to happen after I've visited the checkout page and come back to the product page. But that might just be a coincidence. I had someone in another location confirm they are seeing the same issue.

Here is a screenshot of the error:
Screen Shot 2020-05-27 at 6 48 04 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.