laundry 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/README.md +41 -5
- data/lib/laundry/payments_gateway/models/response_model.rb +1 -1
- data/lib/laundry/version.rb +1 -1
- data/lib/laundry.rb +7 -0
- metadata +4 -3
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
#Laundry [![Build Status](https://secure.travis-ci.org/supapuerco/laundry.png)](http://travis-ci.org/supapuerco/laundry) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/supapuerco/laundry)
|
2
2
|
|
3
|
-
|
3
|
+
Have you ever wanted to use [ACH Direct](http://www.achdirect.com)'s [Payments Gateway](http://paymentsgateway.com) SOAP API? Neither did anyone. However, with this little gem you should be able to interact with it without going too terribly nuts.
|
4
4
|
|
5
|
-
|
6
|
-
merchant.clients.find(10).accounts.create!
|
5
|
+
The basic idea is to have a somewhat ActiveRecord-y syntax to making payments, updating client information, etc.
|
7
6
|
|
8
7
|
[View the Rdoc](http://rdoc.info/github/supapuerco/laundry/master/frames)
|
9
8
|
|
@@ -23,7 +22,44 @@ Or install it yourself as:
|
|
23
22
|
|
24
23
|
## Usage
|
25
24
|
|
26
|
-
|
25
|
+
First, set up your merchant **account details**, possibly in a Rails initializer. (You're not limited to this singleton thing, but it's pretty useful if you just have one account.)
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
Laundry::PaymentsGateway::Merchant.default_merchant({
|
29
|
+
id: '123456',
|
30
|
+
api_login_id: 'abc123',
|
31
|
+
api_password: 'secretsauce',
|
32
|
+
transaction_password: 'moneymoneymoney'
|
33
|
+
})
|
34
|
+
```
|
35
|
+
|
36
|
+
In development? You should probably **sandbox** this baby:
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
Laundry.sandboxed = !Rails.env.production?
|
40
|
+
```
|
41
|
+
|
42
|
+
Then you can **find a client**:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
client = Laundry::PaymentsGateway::Merchant.default_merchant.clients.find(10)
|
46
|
+
```
|
47
|
+
|
48
|
+
Create a **bank account**:
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
client.accounts.create!({
|
52
|
+
acct_holder_name: user.name,
|
53
|
+
ec_account_number: '12345678912345689',
|
54
|
+
ec_account_trn: '123457890',
|
55
|
+
ec_account_type: "CHECKING"
|
56
|
+
})
|
57
|
+
```
|
58
|
+
|
59
|
+
**Send some money**:
|
60
|
+
```ruby
|
61
|
+
account.debit_cents 1250
|
62
|
+
```
|
27
63
|
|
28
64
|
## Contributing
|
29
65
|
|
@@ -31,4 +67,4 @@ TODO: Write usage instructions here
|
|
31
67
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
68
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
69
|
4. Push to the branch (`git push origin my-new-feature`)
|
34
|
-
5. Create new Pull Request
|
70
|
+
5. Create a new Pull Request
|
data/lib/laundry/version.rb
CHANGED
data/lib/laundry.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: laundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -35,6 +35,7 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
|
+
- CHANGELOG.md
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE
|
40
41
|
- README.md
|
@@ -69,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
70
|
version: '0'
|
70
71
|
segments:
|
71
72
|
- 0
|
72
|
-
hash:
|
73
|
+
hash: 2170319772523828423
|
73
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
75
|
none: false
|
75
76
|
requirements:
|
@@ -78,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
79
|
version: '0'
|
79
80
|
segments:
|
80
81
|
- 0
|
81
|
-
hash:
|
82
|
+
hash: 2170319772523828423
|
82
83
|
requirements: []
|
83
84
|
rubyforge_project:
|
84
85
|
rubygems_version: 1.8.24
|