Hire expert -- fix my code!

I’ve been all over the forum for the last week, driving a few of you nuts already I’m sure… but I cannot figure out how to make this code work.

I need to:

  • Submit payment to Stripe
  • Make record of payment in DB
  • If successful, redirect to “success” page

What I really need is someone who can look at my code, make it work, and then briefly walk me through any questions so I know what I’ve been missing all this time.

sends the payment to Stripe and I receive the token ID in the console, but it doesn’t process and I don’t receive the charge response ID. Also, this currently submits the user’s name to a DB and always redirects to “success” page, but I recognize that these things should only happen if the payment is actually successful; otherwise, I need some kind of error message added.Right now I have 2 “versions” of this code, and both basically do the same thing:

Version 1:

Version 2:

Please help!! I’m happy to hire anyone who can get me through this for an hour or 2 of work if I can get this done ASAP!

Contact me here, or directly at annie@twentysevencreative.com

Thanks in advance!