Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

stripe payments error

I tried your stripe payments tutorial and got the following error:

StripePayment_JS.js:9 Uncaught TypeError: Cannot read property 'message' of undefined

Image

There appears to be two issues here:

  1. your error handler doesn't work correctly (doesn't like error.object.message).

  2. the first issue would not have shown itself apart from the fact that there was an error:

    The xhr.responseText is: {"code":"AE009","message":"Incorrect service configuration","status":"BAD_REQUEST"}

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

stripe payments error

OK fixed 1.

line 9 of your js file should read

$('[name=errorCardLabel]').text(obj.message);

not

$('[name=errorCardLabel]').text(obj.error.message);

however, i still unsure as to why I have an error

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

stripe payments error

I tested you service with sample data and it doesn't work:

Image

eric_nnv
Posts: 0
Joined: Tue Sep 16, 2014 3:40 am

stripe payments error

Hi Terry - We had the exact same experience that you did and your line 9 code change fixed the first issue for us as well. Were you ever able to fix the second issue? Thanks

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

stripe payments error

Actually I reverted back to an older version of their code which i had used before. I wanted to make the stripe payment reference as part of the database. I did not use their method using the API express service.

i got the stripe token from the database (so that each user of the app could have their own stripe payment set up) I passed the stripe secret key prepended it with "Bearer " (Bearer with a space after it and then passed it in the header as the "Authorization" and this worked. The first error that I debugged had actually been in the code previously, but it never came to light as the error never occurred.

If you need any more help, let me know and I will see if I can put together some screenshots

Image

Image

eric_nnv
Posts: 0
Joined: Tue Sep 16, 2014 3:40 am

stripe payments error

Thanks very much Terry. This is really helpful. I will give your approach a try.

Return to “Issues”