samurai 0.2.11 → 0.2.12
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/README.markdown +3 -3
- data/app/views/application/_payment_method_form.html.erb +6 -2
- data/lib/samurai.rb +1 -1
- data/lib/samurai/payment_method.rb +1 -1
- data/lib/samurai/processor.rb +2 -2
- data/lib/samurai/transaction.rb +1 -1
- data/lib/samurai/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +13 -13
data/README.markdown
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Samurai
|
2
2
|
=======
|
3
3
|
|
4
|
-
If you are an online merchant and using
|
5
|
-
make your life easy. Integrate with the
|
4
|
+
If you are an online merchant and using FeeFighters' Samurai gateway, this gem will
|
5
|
+
make your life easy. Integrate with the samurai.feefighters.com portal and
|
6
6
|
process transactions.
|
7
7
|
|
8
8
|
|
@@ -57,7 +57,7 @@ in Samurai.
|
|
57
57
|
To let your customers create a Payment Method, place a credit card
|
58
58
|
entry form on your site like the one below.
|
59
59
|
|
60
|
-
<form action="https://samurai.feefighters.com/v1/payment_methods" method="POST">
|
60
|
+
<form action="https://api.samurai.feefighters.com/v1/payment_methods" method="POST">
|
61
61
|
<fieldset>
|
62
62
|
<input name="redirect_url" type="hidden" value="http://yourdomain.com/anywhere" />
|
63
63
|
<input name="merchant_key" type="hidden" value="[Your Merchant Key]" />
|
@@ -1,6 +1,10 @@
|
|
1
|
-
<%
|
1
|
+
<%
|
2
|
+
sandbox ||= false
|
3
|
+
ajax ||= false
|
4
|
+
redirect_url ||= '#'
|
5
|
+
%>
|
2
6
|
<% payment_method ||= (@payment_method || Samurai::PaymentMethod.new) %>
|
3
|
-
<form action="<%= Samurai.site %>/payment_methods" method="POST" class="samurai payment_method"
|
7
|
+
<form action="<%= Samurai.site %>/payment_methods" method="POST" class="samurai payment_method" <%='data-samurai-ajax' if ajax %>>
|
4
8
|
<fieldset>
|
5
9
|
<input name="redirect_url" type="hidden" value="<%= redirect_url %>" />
|
6
10
|
<input name="merchant_key" type="hidden" value="<%= Samurai.options[:merchant_key] %>" />
|
data/lib/samurai.rb
CHANGED
@@ -11,7 +11,7 @@ class Samurai::PaymentMethod < Samurai::Base
|
|
11
11
|
self.payment_method_token
|
12
12
|
end
|
13
13
|
|
14
|
-
# Retains the payment method on samurai.feefighters.com. Retain a payment method if
|
14
|
+
# Retains the payment method on api.samurai.feefighters.com. Retain a payment method if
|
15
15
|
# it will not be used immediately.
|
16
16
|
def retain
|
17
17
|
self.post(:retain)
|
data/lib/samurai/processor.rb
CHANGED
@@ -21,7 +21,7 @@ class Samurai::Processor < Samurai::Base
|
|
21
21
|
# +amount+:: amount to authorize
|
22
22
|
# options:: an optional has of additional values to pass in accepted values are:
|
23
23
|
# *+descriptor+:: descriptor for the transaction
|
24
|
-
# *+custom+:: custom data, this data does not get passed to the processor, it is stored within samurai.feefighters.com only
|
24
|
+
# *+custom+:: custom data, this data does not get passed to the processor, it is stored within api.samurai.feefighters.com only
|
25
25
|
# *+customer_reference+:: an identifier for the customer, this will appear in the processor if supported
|
26
26
|
# *+billing_reference::+ an identifier for the purchase, this will appear in the processor if supported
|
27
27
|
# Returns a Samurai::Transaction containing the processor's response.
|
@@ -35,7 +35,7 @@ class Samurai::Processor < Samurai::Base
|
|
35
35
|
# +amount+:: amount to authorize
|
36
36
|
# options:: an optional has of additional values to pass in accepted values are:
|
37
37
|
# *+descriptor+:: descriptor for the transaction
|
38
|
-
# *+custom+:: custom data, this data does not get passed to the processor, it is stored within samurai.feefighters.com only
|
38
|
+
# *+custom+:: custom data, this data does not get passed to the processor, it is stored within api.samurai.feefighters.com only
|
39
39
|
# *+customer_reference+:: an identifier for the customer, this will appear in the processor if supported
|
40
40
|
# *+billing_reference::+ an identifier for the purchase, this will appear in the processor if supported
|
41
41
|
# Returns a Samurai::Transaction containing the processor's response.
|
data/lib/samurai/transaction.rb
CHANGED
@@ -70,7 +70,7 @@ class Samurai::Transaction < Samurai::Base
|
|
70
70
|
end
|
71
71
|
protected :process_response_errors
|
72
72
|
|
73
|
-
# Builds an xml payload that represents the transaction data to submit to samurai.feefighters.com
|
73
|
+
# Builds an xml payload that represents the transaction data to submit to api.samurai.feefighters.com
|
74
74
|
def self.transaction_payload(options = {})
|
75
75
|
{
|
76
76
|
:amount => options[:amount],
|
data/lib/samurai/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -8,7 +8,7 @@ Debugger.settings[:reload_source_on_change] = true
|
|
8
8
|
|
9
9
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
10
10
|
|
11
|
-
SITE = ENV['site'] || 'https://samurai.feefighters.com/v1/'
|
11
|
+
SITE = ENV['site'] || 'https://api.samurai.feefighters.com/v1/'
|
12
12
|
USE_MOCK = !ENV['site']
|
13
13
|
|
14
14
|
PAYMENT_METHOD_TOKENS = {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samurai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-13 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activeresource
|
17
|
-
requirement: &
|
17
|
+
requirement: &70259906833500 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 2.2.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70259906833500
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: bundler
|
28
|
-
requirement: &
|
28
|
+
requirement: &70259906832780 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 1.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70259906832780
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rspec
|
39
|
-
requirement: &
|
39
|
+
requirement: &70259906832320 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 2.6.0
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70259906832320
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: fakeweb
|
50
|
-
requirement: &
|
50
|
+
requirement: &70259906831940 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70259906831940
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: ruby-debug19
|
61
|
-
requirement: &
|
61
|
+
requirement: &70259906831400 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70259906831400
|
70
70
|
description: If you are an online merchant and using samurai.feefighters.com, this
|
71
71
|
gem will make your life easy. Integrate with the samurai.feefighters.com portal
|
72
72
|
and process transaction.
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: 1.3.5
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.8.
|
131
|
+
rubygems_version: 1.8.10
|
132
132
|
signing_key:
|
133
133
|
specification_version: 3
|
134
134
|
summary: Integration gem for samurai.feefighters.com
|