samurai 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/samurai/gateway.rb +4 -3
- data/lib/samurai/version.rb +1 -1
- metadata +4 -4
data/lib/samurai/gateway.rb
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
class Samurai::Gateway < Samurai::Base
|
2
2
|
|
3
3
|
def self.the_gateway
|
4
|
-
|
4
|
+
Samurai::Gateway.new(:id => Samurai.gateway_token)
|
5
5
|
end
|
6
6
|
|
7
|
-
def purchase(payment_method_token, amount)
|
7
|
+
def purchase(payment_method_token, amount, descriptor)
|
8
8
|
# send a purchase request
|
9
9
|
resp = post(:purchase,
|
10
10
|
:transaction => {
|
11
11
|
:amount => amount,
|
12
12
|
:type => 'purchase',
|
13
13
|
:payment_method_token => payment_method_token,
|
14
|
-
:currency_code => 'USD'
|
14
|
+
:currency_code => 'USD',
|
15
|
+
:descriptor => descriptor
|
15
16
|
}
|
16
17
|
)
|
17
18
|
# return the response, wrapped in a Samurai::Transaction
|
data/lib/samurai/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samurai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Graeme Rouse
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-07-
|
19
|
+
date: 2011-07-15 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|