Closed ustorf closed 12 years ago
Hi Bernd,
Glad you are having success with the gem.
I haven't yet come across that issue. When I get home tonight, I'll check it out. Thanks for letting me know about it!
Your fix is probably fine for now.
Adam
On Thu, Jan 5, 2012 at 5:14 PM, ustorf reply@reply.github.com wrote:
Hey Adam,
Just started messing around with the gem today and got pretty far: thanks for the good work.
Had one problem though: I called init_checkout_and_send_user_to_wepay and the response came back fine, however, I got an AR error when the WepayCheckoutRecord was being created saying that there is no such attribute as access_token. If I remove that assignment (by remming out line 49 in lib/helpers/controller_helpers.rb) checkout seems to work and a valid WepayCheckoutRecord is created.
Am I doing something wrong?
Hope all is well, Bernd
Reply to this email directly or view it on GitHub: https://github.com/adamthedeveloper/wepay-rails/issues/7
A.R. Medeiros
Hello Bernd,
I looked into this - you definitely want the wepay_checkout_records table to have the access_token column. It's strange to me that you don't have that column after the migration. What version of wepay-rails are you using? You may have first installed an older version that didn't have that column and then later, pulled in one of the new versions with code in it that relies on it being there.
The fix for you is simple - just create another migration with the access_token column in it. It needs to be a string.
Please let me know how it goes. I will be available all night to answer any questions you have or help you along.
Adam
On Thu, Jan 5, 2012 at 5:33 PM, Adam Medeiros adammede@gmail.com wrote:
Hi Bernd,
Glad you are having success with the gem.
I haven't yet come across that issue. When I get home tonight, I'll check it out. Thanks for letting me know about it!
Your fix is probably fine for now.
Adam
On Thu, Jan 5, 2012 at 5:14 PM, ustorf reply@reply.github.com wrote:
Hey Adam,
Just started messing around with the gem today and got pretty far: thanks for the good work.
Had one problem though: I called init_checkout_and_send_user_to_wepay and the response came back fine, however, I got an AR error when the WepayCheckoutRecord was being created saying that there is no such attribute as access_token. If I remove that assignment (by remming out line 49 in lib/helpers/controller_helpers.rb) checkout seems to work and a valid WepayCheckoutRecord is created.
Am I doing something wrong?
Hope all is well, Bernd
Reply to this email directly or view it on GitHub: https://github.com/adamthedeveloper/wepay-rails/issues/7
A.R. Medeiros
A.R. Medeiros
Hey Adam,
Looks like version 2.4.2. When I look at the migration template, it does not have a access_token column.
Hope all is well, Bernd
You are right - looking back through my commits, I removed it and the auth token from the migration. It was a long day - so please forgive me. You don't need the access_token column. I was getting it confused in my mind with the security_token - which you definitely need!
If you would like to remove that line from the helper and give me a pull request, I will gladly accept it.
Thanks for the catch - I am suprised it didn't give me a problem on a recent install for one of my projects - it definitely should have - it warrants some research on my part.
Adam
Can you tell me what versions of ruby and rails you are running? That piece of code doesn't complain at all for me - I am running Ruby 1.9.2-p290 and Rails 3.1
Regardless, that line needs to be removed.
Thanks again for all of your help.
Adam
Hey Adam,
I'm using ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] and Rails 3.1.3 and running on Ubuntu.
FYI, noticed a couple of things that I'm going to do on my fork. One is that in wepay.yml, dev and prod enviros point to api.wepay - I'm pointing mine to stage.wepay. Also, I got some errors back from the API yesterday by sending a bad token which were not handled by the checkout_controller#index method. Might put some error handling in there.
Hope all is well, Bernd
Sounds great. Wepay.yml is really more of a guide and meant to be unique for every install. Making it better initially sounds great though. While you are there, please change the production api uri. It's not api.wepay.com. It's www.wepay.com/api/v2. Thanks for helping. If you would like me to do a pull, i'll do it and add you to the read me as a contributer. (If you want).
Let me know how it goes and if the gem helps your success.
Adam On Jan 6, 2012 9:28 AM, "ustorf" < reply@reply.github.com> wrote:
Hey Adam,
I'm using ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] and Rails 3.1.3 and running on Ubuntu.
FYI, noticed a couple of things that I'm going to do on my fork. One is that in wepay.yml, dev and prod enviros point to api.wepay - I'm pointing mine to stage.wepay. Also, I got some errors back from the API yesterday by sending a bad token which were not handled by the checkout_controller#index method. Might put some error handling in there.
Hope all is well, Bernd
Reply to this email directly or view it on GitHub:
https://github.com/adamthedeveloper/wepay-rails/issues/7#issuecomment-3387712
Hey Adam,
That sounds great. Just made a pull request.
Hope all is well, Bernd
Merged. Closing this bug. Thanks again!!
Bernd,
Our project was awarded Rubymine License Keys to all contributors of wepay-rails from Jetbrains. Are you interested?
Thanks,
Adam
Hey Adam,
Just started messing around with the gem today and got pretty far: thanks for the good work.
Had one problem though: I called init_checkout_and_send_user_to_wepay and the response came back fine, however, I got an AR error when the WepayCheckoutRecord was being created saying that there is no such attribute as access_token. If I remove that assignment (by remming out line 49 in lib/helpers/controller_helpers.rb) checkout seems to work and a valid WepayCheckoutRecord is created.
Am I doing something wrong?
Hope all is well, Bernd