This is a credit card processing library. I needed this for airflowing an application from flowing.
I've only needed to use AprovaFacil so let me know if you want to support another gateway (there is a skeleton for this one)
###Loading
Use this snippet to load it into your Pharo* image:
Gofer it
smalltalkhubUser: 'Pharo'
project: 'MetaRepoForPharo30';
package: 'ConfigurationOfMerchant';
load.
(Smalltalk at: #ConfigurationOfMerchant) load
###Example
gateway := MERAprovaFacilGateway new
merchantUsername: merchantUsername;
beProduction;
yourself.
Having the credit card and order objects allows you to do something like this:
gateway purchase: anOrder andStore: aCreditCard.
Which will make Merchant to actually not store credit cards on your servers but the token given by your gateway so you can later make a capture to take the money using:
gateway capture: anOrder token: aToken.
After that doIt, if authorised, you are 'anOrder value' richer*
Performing a doIt in a Smalltalk workspace never felt so good :)
*okay, minus costs
The rest is a couple of additional commands and protocol and handling errors elegantly
Have a happy business :D
###Contributions
...are welcomed, send that push request and hopefully we can review it together
###*Pharo Smalltalk Getting a fresh Pharo Smalltalk image and its virtual machine is as easy as running in your terminal:
wget -O- get.pharo.org/30+vm | bash
MIT - License
2014 - sebastian
o/