Closed fredguest closed 11 years ago
that last bit is in my routes.rb not config.rb obv. brain is fried
Hi Fred,
Did you close this because you figured out what was wrong or are you still stuck? Thanks!
Adam
i never did figure out what i was doing wrong, but i realized i didn't really need a robust gem, i just need to make a few straightforward calls, and i couldn't really use the official wepay documentation because i was interacting with their API through the gem's code more than my own, so i tried just using the wepay SDK instead of wepay-rails and it's worked out much better in my particular case. i definitely appreciate that this gem is here in case i need it in the future though, it seems like you've done a nice job with it.
so i'm having an issue completing a checkout call, and i'm sure it's user error rather than the gem, but i can't figure out what i'm screwing up.
the first error i was getting when i hit the checkout url was this:
which i fixed by adding this:
to my application.rb, but it might be worth adding that step to the readme. so now that's fixed but the new error i'm getting is this:
and after looking at controller_helpers.rb inside the wepay-rails gem it seems pretty clear that the init_checkout(params, access_token=nil) method is failing to return a record with a value in the checkout_uri column to the init_checkout_and_send_user_to_wepay(params, access_token=nil) method, so when init_checkout_and_send_user_to_wepay calls redirct_to record.checkout_uri it's getting nil.
if i log into my developer console on stage.wepay.com and look at the API calls i can see the call i just made. here are the details of the call:
and if i open a heroku pg:psql session and run SELECT * FROM wepay_checkout_records; i can see records are being created in my database for all the calls i've made, but none of the columns have any data in them except created_at and update_at. somehow i'm creating wepay_checkout_records with a bunch of nil params.
here is the checkout_controller in my app:
here is the finalize_controller in my app:
here's what i have in my config.rb:
…any help would be greatly appreciated, i'm out of ideas at the moment.