Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my checkout button not work all of a sudden?

I have an app that I have been developing, that used to work up until some recent changes.

I ran a bundle update, and a bunch of gems updated. Since then (or around that time) my checkout process doesn't work and I can't figure out what is causing the issue.

I don't have any errors in my development.log file and no errors in my JS console.

You can check out the site here.

For login credentials, use: [email protected]/testing123 (where the email is user, and the latter is pw).

Add that item to your cart, then go through the checkout process.

Enter some fake credentials, and use the credit card number: 4111111111111111 (verification number can be any 3 digit number, expiry any date after today).

Once you click checkout, you will see that the form isn't submitted.

For the life of me, I can't figure out why.

Would love to hear some thoughts on how I may either further troubleshoot this or tell me what is causing this.

Thanks.

P.S. This isn't a Heroku issue - I have this problem locally too. I am using the piggybak shopping cart gem, and the gem maintainers have not been able to replicate this error on their end. So I am further flummoxed :(

like image 829
marcamillion Avatar asked Nov 12 '22 05:11

marcamillion


1 Answers

I followed your instructions and I got the error on clicking 'Create Order'.

sjsonp1369201390573({
        "error": {
        "message": "The 'exp_year' parameter should be an integer (instead, is undefined).",
        "type": "card_error",
        "param": "exp_year",
        "code": "invalid_expiry_year"
    }
}
, 402)

This is not coming in JS console. Instead your app is creating additional JS script file like:

https://api.stripe.com/v1/tokens?card[number]=undefined&card[cvc]=undefined&card[exp_month]=undefined&card[exp_year]=undefined&key=pk_u0E6vMzPGDJlYmyLqr83LCahMTL5e&callback=sjsonp1369201390573&_method=POST

Even though the error seems to be straight-forward, since I have not used AJAXQ or any other piggyback JS system, I guess you need to step through your program to catch this exception.

HTH.

like image 157
Harsh Gupta Avatar answered Nov 14 '22 23:11

Harsh Gupta