samurai 0.2.17 → 0.2.18

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- samurai (0.2.17)
4
+ samurai (0.2.18)
5
5
  activeresource (>= 2.2.2)
6
6
 
7
7
  GEM
@@ -2,9 +2,10 @@
2
2
  sandbox ||= false
3
3
  ajax ||= false
4
4
  redirect_url ||= '#'
5
+ classes ||= ''
5
6
  %>
6
7
  <% payment_method ||= (@payment_method || Samurai::PaymentMethod.new) %>
7
- <form action="<%= Samurai.site %>/payment_methods" method="POST" class="samurai payment_method" <%='data-samurai-ajax' if ajax %>>
8
+ <form action="<%= Samurai.site %>/payment_methods" method="POST" class="samurai <%= classes %>" <%='data-samurai-ajax' if ajax %>>
8
9
  <fieldset>
9
10
  <input name="redirect_url" type="hidden" value="<%= redirect_url %>" />
10
11
  <input name="merchant_key" type="hidden" value="<%= Samurai.options[:merchant_key] %>" />
@@ -14,60 +15,62 @@
14
15
 
15
16
  <fieldset>
16
17
  <div class="field-group" id="credit_card_name_group">
17
- <span>
18
+ <div>
18
19
  <label for="credit_card_first_name">First name</label>
19
20
  <input id="credit_card_first_name" name="credit_card[first_name]" size="30" type="text" value="<%= payment_method.first_name %>" />
20
- </span>
21
- <span>
21
+ </div>
22
+ <div>
22
23
  <label for="credit_card_last_name">Last name</label>
23
24
  <input id="credit_card_last_name" name="credit_card[last_name]" size="30" type="text" value="<%= payment_method.last_name %>" />
24
- </span>
25
+ </div>
25
26
  </div>
26
27
 
27
28
  <div class="field-group" id="credit_card_address_group">
28
29
  <div>
29
30
  <label for="credit_card_address_1">Address 1</label>
30
- <input class="" id="credit_card_address_1" name="credit_card[address_1]" size="30" type="text" value="<%= payment_method.address_1 %>" />
31
+ <input class="div-6" id="credit_card_address_1" name="credit_card[address_1]" size="30" type="text" value="<%= payment_method.address_1 %>" />
31
32
  </div>
32
33
  <div>
33
34
  <label for="credit_card_address_2">Address 2</label>
34
- <input class="" id="credit_card_address_2" name="credit_card[address_2]" size="30" type="text" value="<%= payment_method.address_2 %>" />
35
+ <input class="div-6" id="credit_card_address_2" name="credit_card[address_2]" size="30" type="text" value="<%= payment_method.address_2 %>" />
35
36
  </div>
36
37
  </div>
37
38
 
38
39
  <div class="field-group" id="location_group">
39
- <span>
40
+ <div>
40
41
  <label for="credit_card_city">City</label>
41
42
  <input id="credit_card_city" name="credit_card[city]" size="30" type="text" value="<%= payment_method.city %>" />
42
- </span>
43
- <span>
43
+ </div>
44
+ <div>
44
45
  <label for="credit_card_state">State</label>
45
46
  <input class="" id="credit_card_state" name="credit_card[state]" size="30" type="text" value="<%= payment_method.state %>" />
46
- </span>
47
- <span>
47
+ </div>
48
+ <div>
48
49
  <label for="credit_card_zip">Zip</label>
49
50
  <input class="" id="credit_card_zip" name="credit_card[zip]" size="30" type="text" value="<%= payment_method.zip %>" />
50
- </span>
51
+ </div>
51
52
  </div>
52
53
  </fieldset>
53
54
 
54
55
  <fieldset>
55
56
  <div class="field-group" id="credit_card_info_group">
56
- <span>
57
+ <div>
57
58
  <label for="credit_card_card_number">Card Number</label>
58
- <input id="credit_card_card_number" name="credit_card[card_number]" size="30" type="text" value="<%= payment_method.card_number %>" />
59
- <label data-samurai="card_previews">
59
+ <input id="credit_card_card_number" name="credit_card[card_number]" size="30" type="text" value="<%= payment_method.card_number %>" autocomplete="off" />
60
+ <label data-samurai-card-previews class="show-accepted">
60
61
  <span class='visa'></span>
61
62
  <span class='mastercard'></span>
62
63
  <span class='amex'></span>
63
64
  <span class='discover'></span>
64
65
  </label>
65
- </span>
66
- <span>
66
+ </div>
67
+ <div id="samurai_card_cvv">
67
68
  <label for="credit_card_cvv">CVV</label>
68
- <input class="" id="credit_card_cvv" name="credit_card[cvv]" size="30" type="text" value="<%= payment_method.cvv %>" />
69
- </span>
70
- <span>
69
+ <input class="div-1" id="credit_card_cvv" name="credit_card[cvv]" size="30" type="text" value="<%= payment_method.cvv %>" autocomplete="off" />
70
+ </div>
71
+ </div>
72
+ <div class="field-group" id="credit_card_expiration">
73
+ <div>
71
74
  <label for="credit_card_expiry_month">Expires on</label>
72
75
  <select id="credit_card_expiry_month" name="credit_card[expiry_month]">
73
76
  <option value="1" <%= 'selected' if payment_method.expiry_month.to_s=='1' %>>01</option>
@@ -91,9 +94,11 @@
91
94
  <option value="2015" <%= 'selected' if payment_method.expiry_year.to_s=='2015' %>>2015</option>
92
95
  <option value="2016" <%= 'selected' if payment_method.expiry_year.to_s=='2016' %>>2016</option>
93
96
  </select>
94
- </span>
97
+ </div>
95
98
  </div>
96
99
  </fieldset>
97
100
 
98
- <p><button type='submit' class='button blue'>Submit Payment</button></p>
101
+ <button type='submit' class='button'>Submit Payment</button>
102
+ <span class='loading' style="display: none;"></span>
103
+ <span class='results' style="display: none;"></span>
99
104
  </form>
@@ -4,7 +4,7 @@ module Samurai::Rails
4
4
  class Views
5
5
  class << self
6
6
 
7
- PARTIALS = [ 'payment_method_form', 'transaction_form', 'errors', 'transaction' ]
7
+ PARTIALS = [ 'payment_form', 'errors', 'transaction' ]
8
8
 
9
9
  PARTIALS.each do |partial|
10
10
  define_method partial do |attrs|
@@ -1,3 +1,3 @@
1
1
  module Samurai
2
- VERSION = "0.2.17".freeze
2
+ VERSION = "0.2.18".freeze
3
3
  end
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.17
4
+ version: 0.2.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-09-23 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activeresource
17
- requirement: &70155158960740 !ruby/object:Gem::Requirement
17
+ requirement: &70208853483000 !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: *70155158960740
25
+ version_requirements: *70208853483000
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &70155158960240 !ruby/object:Gem::Requirement
28
+ requirement: &70208853482320 !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: *70155158960240
36
+ version_requirements: *70208853482320
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &70155158959760 !ruby/object:Gem::Requirement
39
+ requirement: &70208853481580 !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: *70155158959760
47
+ version_requirements: *70208853481580
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: fakeweb
50
- requirement: &70155158959240 !ruby/object:Gem::Requirement
50
+ requirement: &70208853481120 !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: *70155158959240
58
+ version_requirements: *70208853481120
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: ruby-debug19
61
- requirement: &70155158958500 !ruby/object:Gem::Requirement
61
+ requirement: &70208853480620 !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: *70155158958500
69
+ version_requirements: *70208853480620
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.
@@ -85,7 +85,7 @@ files:
85
85
  - Rakefile
86
86
  - app/assets/stylesheets/samurai.css
87
87
  - app/views/application/_errors.html.erb
88
- - app/views/application/_payment_method_form.html.erb
88
+ - app/views/application/_payment_form.html.erb
89
89
  - app/views/application/_transaction.html.erb
90
90
  - lib/samurai.rb
91
91
  - lib/samurai/base.rb