I'm starting work on the payments portion of our saas load testing app. My partner and I have been dogfooding our app for a while on our own load test consulting gigs and we're at the point where we want to roll it out. The app is written in rails. I was planning to use a "credits" system, and thinking about using Braintree.
I'm wondering what things I need to consider, and trying to reinvent as little as possible. I'm wondering if there any full example apps I could work from. Maybe something with templates for Success emails? Failure emails? Card expiry? One time payment/monthly payments. Also wondering what libraries I should look at, etc.
I'm interested in pointers to libraries, samples, what to look at and think about, etc? Thanks!
1. Keeping the credentials (account number, name, telephone number, credit card number, routing number and account number, etc etc). You may have legal duties to perform certain things, or to delete them every so often.
2. Retries of failed payment authorizations. The ACH and credit card systems ARE NOT THAT RELIABLE. Your code will need to take account of network failure (failed to contact Paymentech or AmEx) vs a declined payment. Not the same things at all. You need to have the ability to retry an authorization.
3. Your own software failures can leave a "batch" of payments in an inconsistent state. The dangers here are double-billing a human, and on the other hand, not billing a human. In one case, your clients cry out, in the other, you miss some money.
4. Give your clients the ability to cancel a scheduled payment right up to the deadline, but don't let them schedule a payment too close to the deadline. Horrible race conditions that are hard to imagine ensue.