Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ft preapprovals #26

Merged
merged 37 commits into from Feb 23, 2013
Merged

Conversation

lvxn0va
Copy link
Contributor

@lvxn0va lvxn0va commented Sep 24, 2012

Hi I've gotten Wepay pre-approvals and delayed charge working on my end. I've also included sample code for the controllers which can be stripped if needed and put in the wiki to help people test. My understanding is the controllers aren't generated with the gem installation so are optional for people to copy if they want from the Github source.

Most of the code matches the master branch checkout methods except for the redirects to the "Success" actions which renders text confirmation. I've also adjusted code to the wepay-rails.rb and WepayCheckoutRecord.

The most difficult part of pre-approvals and delayed charging is that when adding a pre-approval to a checkout/create call, it's not necessary to send the user to Wepay, and the charge is made immediately. I redirected to the success action on the charge_controller to merge new checkout_id into the full record from the preapproval call.

Anyway, I'm a beginner at rails so none of the code is precious to me! If you see how to do something better please feel free to change it accordingly..Thanks mate

@adamthedeveloper
Copy link
Owner

I'll take a look at all of this and get back to you. Thanks for your contribution!
Once it's merged, please create a wiki addition to showcase how to use your pre-approval feature.

@lvxn0va
Copy link
Contributor Author

lvxn0va commented Sep 24, 2012

Yes I will..sorry about all the strange commits, really had to tweak the redirects to get the checkout record to update satisfactorily.

@adamthedeveloper
Copy link
Owner

How is your change working out for you? Are you using it in production ok?

@lvxn0va
Copy link
Contributor Author

lvxn0va commented Oct 30, 2012

Thx it works great. No production yet, still in stage, but all the preapp and charge code work good for the catarse application so far. I will try to tackle some tests for the Wepay rails code when I come up for air on the other project.

As a side note, the master branch in my fork is edging toward the catarse customizations and crowdfunding..I've had to make changes that suited my application.

Even though the master branch is more current, the code in the ft-preapprovals branch is more aligned with the Wepay-rails gem and better suited for the users in case you decide to push it.

adamthedeveloper added a commit that referenced this pull request Feb 23, 2013
@adamthedeveloper adamthedeveloper merged commit 0b1243f into adamthedeveloper:master Feb 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants