This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Joe Van Dyk (author)
Tue Mar 10 14:46:32 -0700 2009
commit 9b66af4d7a20c1925fea8c58dfde62aa5f45e572
tree c1126d30118673f907410684e3b1806c42d04e71
parent d8e5abc847324b2565adeca27d864b393869ea56
tree c1126d30118673f907410684e3b1806c42d04e71
parent d8e5abc847324b2565adeca27d864b393869ea56
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Feb 25 04:11:08 -0800 2008 | |
| |
CHANGELOG | Thu Nov 22 23:18:10 -0800 2007 | |
| |
MIT-LICENSE | Thu Nov 22 23:18:10 -0800 2007 | |
| |
README | Tue Mar 10 14:46:32 -0700 2009 | |
| |
Rakefile | Thu Nov 22 23:18:10 -0800 2007 | |
| |
app/ | Wed Feb 20 07:46:57 -0800 2008 | |
| |
config/ | Wed Feb 20 07:46:57 -0800 2008 | |
| |
db/ | Thu Oct 23 12:28:48 -0700 2008 | |
| |
lib/ | Thu Nov 22 23:18:10 -0800 2007 | |
| |
public/ | Thu Nov 22 23:18:10 -0800 2007 | |
| |
script/ | Thu Nov 22 23:43:37 -0800 2007 | |
| |
spec/ | Wed Feb 20 17:36:40 -0800 2008 | |
| |
stories/ | Thu Nov 22 23:40:18 -0800 2007 | |
| |
test/ | Thu Nov 22 23:18:10 -0800 2007 | |
| |
vendor/ | Wed Feb 20 17:36:40 -0800 2008 |
README
MonkeyCharger is a small stand-alone RESTified Rails app that lets you store and charge credit cards. It uses the ActiveMerchant library for the authorizing and capturing of credit cards. You probably want to run this application on a super-secured machine that's firewalled like crazy and is not accessible from the internet. And follow the Visa CISP documentation. NOTE ON RUNNING TESTS: running 'rake' will run the integration tests, which do hit the remote payment gateways. You'll need a valid account with someone like authorize.net to successfully run those tests. Running 'rake spec' doesn't hit any remote gateways. Also, before running the tests, cp config/initializers/monkeycharger.rb.example to config/initializers/monkeycharger.rb. =API summary= ==Storing Credit Cards== * `POST /credit_cards.xml` use with parameters such as number, cvv, month, year, name, etc. You'll also need to supply a passphrase parameter. Use the passphrase parameter when authorizing against the saved card. Uses the ActiveResource conventions. But this might change -- ActiveResource might be overkill for this. ==Authorizing credit cards== * `POST /authorizations.xml` use parameters amount and the same credit card group as above. * `POST /authorizations.xml` use parameters amount and a credit_card_id. Both these return a transaction_id and a X-AuthorizationSuccess HTTP header on success, or text that represents the failure reason if it failed to authorize the card. ==Capturing== * `POST /captures.xml` use parameters amount and transaction_id. If the capture was successful, the X-CaptureSuccess HTTP header will be set. If not successful, will return the reason why. ==Cancelling== * `POST /cancelations.xml` use parameter transaction_id. ==Refunds== * `POST /refunds.xml` use parameters amount, transaction_id, and last_four_digits_of_credit_card ==Rails Way Writeup== Jamis Buck did a write-up on monkeycharger: http://www.therailsway.com/2007/9/3/using-activeresource-to-consume-web-services Also, MonkeyCharger was featured in "The Rails Way" book by Obie Fernandez on an example of how to write good, descriptive tests for a Rails application. Copyright (c) 2009 Joe Van Dyk, released under the MIT license







