spree-bank-transfer 2.2.5 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4fa25569a7ac44a3723b4affec974a511d7b02eb
4
+ data.tar.gz: f78fb01a0f4b5375f2c13419417aff3ae66ff07a
5
+ SHA512:
6
+ metadata.gz: 83904e55a27b12adc57f909ed2095ccd6a3211342fc54970b799b0d6a70d4b8782191633d98374abdd6e03ee160dee245bd6b67fd8a42dc84a71ebd1facf65ba
7
+ data.tar.gz: 8e32bbcec544217180bae9e48bf6f8137b447bdfa6b0500431b8fc4c0b4a3d21f694b97158ee4c6502512ef4fb703df588649e1167b022e92bfa6eb2f440ca0f
data/.gitignore CHANGED
@@ -1 +1,15 @@
1
- *.DS_Store
1
+ \#*
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+ .idea
6
+ .project
7
+ .sass-cache
8
+ coverage
9
+ Gemfile.lock
10
+ tmp
11
+ nbproject
12
+ pkg
13
+ *.swp
14
+ spec/dummy
15
+ *.gem
data/Gemfile CHANGED
@@ -1,15 +1,17 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Provides basic authentication functionality for testing parts of your engine
4
- gem 'spree', '2.2.0'
5
- gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
4
+ gem 'spree', '~> 2.3.0'
5
+ gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-3-stable'
6
6
  gem 'mysql2'
7
7
 
8
- group :assets do
8
+ group :assets do
9
9
  gem 'coffee-rails', '4.0.1'
10
+ gem 'sass-rails', '~> 4.0.2'
10
11
  end
11
12
 
12
13
  group :test do
14
+ gem 'minitest'
13
15
  gem 'rspec-rails', '~> 2.10'
14
16
  gem 'shoulda-matchers', '2.2.0'
15
17
  gem 'simplecov', :require => false
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  Spree Bank Transfer [![Code Climate](https://codeclimate.com/github/vinsol/spree_bank_transfer.png)](https://codeclimate.com/github/vinsol/spree_bank_transfer) [![Build Status](https://travis-ci.org/vinsol/spree_bank_transfer.png?branch=master)](https://travis-ci.org/vinsol/spree_bank_transfer)
2
2
  =================
3
3
 
4
- Spree Bank Transfer extension creates a new payment method in Spree. This payment method allows customers to pay by transferring money directly into merchant’s bank account. It also allows admin to provide their Bank account's (Merchant Bank Account) details which will be displayed to customers while checkout, and they can use this information to make payment for their orders. This extension also facilitate admin to Activate/Deactivate Bank accounts.
4
+ Spree Bank Transfer is an extension which allows adding a new payment method “Bank Transfer” to existing spree e-commerce store. With the help of this payment method customer can place an order online and pay by transferring money directly into merchant’s Bank account. This extension allow merchants to provide their bank account(s) details which in turn is used by customers to order and pay using this method. This extension also facilitate admin to Activate/Deactivate attached Bank accounts. Admin can also filter orders on the basis of the available payment transaction reference numbers with this extension.
5
+
5
6
 
6
7
 
7
8
  Installation
@@ -9,13 +10,13 @@ Installation
9
10
 
10
11
  Add spree_bank_transfer to your Gemfile:
11
12
  ```ruby
12
- gem 'spree-bank-transfer'
13
+ gem 'spree-bank-transfer', require: 'spree_bank_transfer'
13
14
  ```
14
15
 
15
16
  For older versions of Spree.
16
17
  ```ruby
17
18
  # Spree 2.1.0
18
- gem 'spree-bank-transfer', '2.1.0'
19
+ gem 'spree-bank-transfer', '2.1.0', require: 'spree_bank_transfer'
19
20
  ```
20
21
 
21
22
  ```ruby
@@ -44,27 +45,43 @@ How it works:
44
45
  - Provide Name of the bank
45
46
  - Provide Account number
46
47
  - Select “Status” check box
48
+ - Provide “Additional Details”, like “Branch Name”, “Bank code” etc.
47
49
 
48
- ![Listing Banks](http://vinsol.com/gems_screenshots/spree-bank-transfer/list%20banks.png)
50
+ ![Listing Banks](http://vinsol.com/gems_screenshots/spree-bank-transfer/listing%20banks.png)
49
51
 
50
52
  **Bank Account will be visible on Checkout Page only if it is Active.**
51
53
  * After adding the payment method and bank details (as stated above), this payment method will be visible on Checkout page while making payment against an order.
52
54
 
53
55
  * Active merchant **accounts number** will also be visible on Checkout page under this method.
54
56
 
55
- ![Checkout](http://vinsol.com/gems_screenshots/spree-bank-transfer/checkout%20page.png)
57
+ ![Checkout](http://vinsol.com/gems_screenshots/spree-bank-transfer/checkout.png)
58
+
59
+ **“How Bank Transfer Works” link will open a pop-up window. It will list all steps to complete order with this method.**
60
+
61
+ * Customer will be able to order by completing the order with this method and can transfer money equal to total order
62
+ value directly into any one of the merchant’s bank account.
63
+
64
+ * After customer deposits money into merchant’s account, a payment transaction reference number is provided by the bank. Customer needs to add this payment reference details with the respective order by going to order detail page.
56
65
 
57
- * Customer will be able to order by completing the order with this method and can transfer money equal to total order value directly into any one of the merchant’s bank account.
66
+ My Account -> Order no. -> Add details (Payment information column) -> Submit
67
+
68
+ ![Order](http://vinsol.com/gems_screenshots/spree-bank-transfer/order.png)
58
69
 
59
- * After receiving amount into his account, admin can update order by following the steps:
70
+ * Admin will be able to see the payment reference details, added by customer, on the Order detail page.
60
71
 
61
- - On ‘Orders tab, click on order number to go to the order’s details page..
62
- - Select “Payments” link.
63
- - Mark the payment “Capture”
64
- ![Order Page](http://vinsol.com/gems_screenshots/spree-bank-transfer/order%20page.png)
72
+ Orders -> Order no. -> Payments
73
+
74
+ ![Payments](http://vinsol.com/gems_screenshots/spree-bank-transfer/payments.png)
65
75
 
66
76
  * The order will not be marked Completed until admin captures the payment as mentioned in step above.
67
77
 
78
+ Note: Admin needs to manually verify the transaction details from his bank account before capturing the payment
79
+
80
+ * Admin can filter orders which has payment transaction reference number by clicking the check box “only show orders with bank transfer payment reference number” on “Orders” page.
81
+
82
+ ![Orders](http://vinsol.com/gems_screenshots/spree-bank-transfer/orders.png)
83
+
84
+
68
85
 
69
86
 
70
87
 
@@ -3,11 +3,11 @@ module Spree
3
3
  module BanksHelper
4
4
 
5
5
  def bank_status(bank)
6
- bank.active? ? 'Active' : 'Inactive'
6
+ bank.active? ? Spree.t(:active) : Spree.t(:inactive)
7
7
  end
8
8
 
9
- def action_to_toggle_bank_status(bank)
10
- bank.active? ? 'Deactivate' : 'Activate'
9
+ def action_to_toggle_bank_status(bank)
10
+ bank.active? ? Spree.t(:deactivate) : Spree.t(:activate)
11
11
  end
12
12
 
13
13
  end
@@ -11,7 +11,7 @@ Deface::Override.new(
11
11
  <%= form_for bank_transfer_payment, :html => { :class => "bt_payment_form #{bank_transfer_payment.details_submitted? ? '' : 'hidden'}" } do |f| %>
12
12
  <table>
13
13
  <tr>
14
- <td><%= Spree.t(:deposited_on) %></td><td><%= f.date_field :deposited_on, :disabled => bank_transfer_payment.details_submitted?, :class => 'required_field', 'field-name' => 'Deposited on' %></td>
14
+ <td><%= Spree.t(:deposited_on) %></td><td><%= f.text_field :deposited_on, :disabled => bank_transfer_payment.details_submitted?, :class => 'required_field', 'field-name' => 'Deposited on' %></td>
15
15
  </tr>
16
16
  <tr>
17
17
  <td><%= Spree.t(:bank_name) %></td><td><%= f.text_field :bank_name, :disabled => bank_transfer_payment.details_submitted?, :class => 'required_field', 'field-name' => 'Bank name' %></td>
@@ -25,9 +25,9 @@ Deface::Override.new(
25
25
  </table>
26
26
  <br>
27
27
  <% unless bank_transfer_payment.details_submitted? %>
28
- <%= f.submit "Submit", :confirm => "Are you sure you want to Submit these details? You will not be able to Edit these details once Submitted. Press 'OK' to confirm." %>
28
+ <%= f.submit "Submit", :confirm => Spree.t(:confirm_details_submit) %>
29
29
  <% end %>
30
- <% end %>
31
- <% end %>
30
+ <% end %>
31
+ <% end %>
32
32
  }
33
- )
33
+ )
@@ -3,7 +3,9 @@ Deface::Override.new(
3
3
  :name => 'add_bank_transfer_instructions_link_to_payment',
4
4
  :insert_after => "#payment-method-fields",
5
5
  :text => %q{
6
- <p><%= link_to "How Bank Transfer works?", bank_transfer_instructions_path, :id => 'banktransfer_instructions', :target => "_blank" %></p>
6
+ <% if @order.available_payment_methods.any? { |pm| pm.type == 'Spree::PaymentMethod::BankTransfer' } %>
7
+ <p><%= link_to t(:how_bank_transfer_works), bank_transfer_instructions_path, :id => 'banktransfer_instructions', :target => "_blank" %></p>
8
+ <% end %>
7
9
  }
8
10
  )
9
11
 
@@ -5,7 +5,7 @@ Deface::Override.new(
5
5
  :text => %q{
6
6
  <% if bank_transfer_payment = @order.payments.from_bank_transfer.first %>
7
7
  <fieldset class="no-border-bottom" >
8
- <legend align="center"><%= Spree.t(:bank_transfer_payment_reference_details) %></legend>
8
+ <legend align="center"><%= Spree.t(:payment_reference_details) %></legend>
9
9
  <table class="index">
10
10
  <thead>
11
11
  <tr data-hook="payments_header">
@@ -13,7 +13,12 @@
13
13
  <%= f.label :account_no, Spree.t(:account_no) %><span class="required">*</span><br />
14
14
  <%= f.text_field :account_no, :class => 'fullwidth' %>
15
15
  <% end %>
16
-
16
+
17
+ <%= f.field_container :additional_details do %>
18
+ <%= f.label :additional_details, Spree.t(:additional_details) %><br />
19
+ <%= f.text_area :additional_details, :rows => 10, :class => 'fullwidth' %>
20
+ <% end %>
21
+
17
22
  <%= f.field_container :active do %>
18
23
  <%= f.check_box :active %>
19
24
  <%= f.label :active, Spree.t(:active) %>
@@ -15,17 +15,19 @@
15
15
  <table class='index'>
16
16
  <thead>
17
17
  <tr>
18
- <th>Name</th>
19
- <th>Account No</th>
20
- <th>Status</th>
18
+ <th><%= Spree.t(:bank_name) %></th>
19
+ <th><%= Spree.t(:account_no) %></th>
20
+ <th><%= Spree.t(:additional_details) %></th>
21
+ <th><%= Spree.t(:status) %></th>
21
22
  </tr>
22
23
  </thead>
23
-
24
+
24
25
  <tbody>
25
26
  <% @banks.each do |bank| %>
26
27
  <tr class="<%= cycle('odd', 'even') %>">
27
28
  <td class="align-center"><%= bank.name %></td>
28
29
  <td class="align-center"><%= bank.account_no %></td>
30
+ <td class="align-center"><%= bank.additional_details %></td>
29
31
  <td class="align-center" id='active-status-<%= bank.id %>'><%= bank_status(bank) %></td>
30
32
  <td class="actions"><%= link_to action_to_toggle_bank_status(bank), toggle_activation_admin_bank_path(bank), :remote => true, :method => :put %></td>
31
33
  <td class="actions"><%= link_to_edit bank, :no_text => true, :class => 'edit' %></td>
@@ -1,13 +1,15 @@
1
1
  <% if (banks = Spree::Bank.active).any? %>
2
2
  <table>
3
3
  <tr>
4
- <th>Name</th>
5
- <th>Account No</th>
4
+ <th><%= Spree.t(:bank_name) %></th>
5
+ <th><%= Spree.t(:account_no) %></th>
6
+ <th><%= Spree.t(:additional_details) %></th>
6
7
  </tr>
7
8
  <% banks.each do |bank| %>
8
9
  <tr>
9
10
  <td><%= bank.name %></td>
10
11
  <td><%= bank.account_no %></td>
12
+ <td><%= bank.additional_details %></td>
11
13
  </tr>
12
14
  <% end %>
13
15
  </table>
@@ -4,15 +4,17 @@
4
4
  <li>Deposit order total in one of the below mentioned bank accounts. After this payment a payment reference number will be provided by the bank.
5
5
  <% if (banks = Spree::Bank.active).any? %>
6
6
  <div style="padding:20px 0">
7
- <table border="1" align='center' width="60%">
7
+ <table border="1" align='center' width="80%">
8
8
  <tr>
9
- <th><center>Name</center></th>
10
- <th><center>Account No</center></th>
9
+ <th><%= Spree.t(:bank_name) %></th>
10
+ <th><%= Spree.t(:account_no) %></th>
11
+ <th><%= Spree.t(:additional_details) %></th>
11
12
  </tr>
12
13
  <% banks.each do |bank| %>
13
14
  <tr>
14
15
  <td><center><%= bank.name %></center></td>
15
16
  <td><center><%= bank.account_no %></center></td>
17
+ <td><center><%= bank.additional_details %></center></td>
16
18
  </tr>
17
19
  <% end %>
18
20
  </table>
@@ -22,7 +24,7 @@
22
24
  <li>Enter this payment reference number on Order Details page by following steps:
23
25
  <ol style="padding:10px 0 0 20px" type='a'>
24
26
  <li>Go to "My Account" page.</li>
25
- <li>Select Order for which you want to provide details.</li>
27
+ <li>Select Order for which you want to provide details.</li>
26
28
  <li>Click on "Add Details" link visible in "Payment Information" column.</li>
27
29
  <li>Provide payment details and Submit.</li>
28
30
  <br><br>
@@ -1,12 +1,24 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
1
  en:
5
- hello: "Hello world"
6
2
  spree:
7
- payment_not_found: "Payment not found"
8
- payment_successfully_updated: "Payment successfully updated"
9
- payment_reference_details: "Payment Reference Details"
10
- bank_name: "Bank Name"
11
- account_no: 'Account No'
12
- transaction_reference_no: 'Transaction Reference No'
3
+ account_no: Account No
4
+ add_details: Add details
5
+ additional_details: Additional Details
6
+ back_to_banks_list: Back to Banks list
7
+ banks: Banks
8
+ bank_name: Bank Name
9
+ confirm_details_submit: Are you sure you want to Submit these details? You will not be able to Edit these details once Submitted. Press 'OK' to confirm.
10
+ deactivate: Deactivate
11
+ deposited_on: Deposited on
12
+ how_bank_transfer_works: How Bank Transfer works?
13
+ listing_banks: Listing Banks
14
+ new_bank: New Bank
15
+ only_show_orders_with_bank_transfer_payment_reference_number: Only show orders with bank transfer payment reference number
16
+ payment_not_found: Payment not found
17
+ payment_successfully_updated: Payment successfully updated
18
+ payment_reference_details: Bank Transfer Payment Reference Details
19
+ transaction_reference_no: Transaction Reference No
20
+ activerecord:
21
+ models:
22
+ spree/bank:
23
+ one: Bank
24
+ other: Banks
@@ -0,0 +1,24 @@
1
+ it:
2
+ spree:
3
+ account_no: Numero Conto
4
+ add_details: Aggiungi dettagli
5
+ additional_details: Dettagli aggiuntivi
6
+ back_to_banks_list: Torna alla lista Banche
7
+ banks: Banche
8
+ bank_name: Nome Banca
9
+ confirm_details_submit: Sei sicuro di voler inserire i dettagli? Non sarà possibile modificarli successivamente. Premi 'OK' per confermare.
10
+ deactivate: Disattiva
11
+ deposited_on: Vresato il
12
+ how_bank_transfer_works: Come funziona il Bonifico Bancario?
13
+ listing_banks: Lista Banche
14
+ new_bank: Nuova Banca
15
+ only_show_orders_with_bank_transfer_payment_reference_number: Visualiza solo ordini con numero transazione bonifico
16
+ payment_not_found: Pagamento non trovato
17
+ payment_successfully_updated: Pagamento aggiornato con successo
18
+ payment_reference_details: Dettagli pagamento
19
+ transaction_reference_no: Numero transazione
20
+ activerecord:
21
+ models:
22
+ spree/bank:
23
+ one: Banca
24
+ other: Banche
@@ -0,0 +1,5 @@
1
+ class AddColAdditionalDetailsToBanks < ActiveRecord::Migration
2
+ def change
3
+ add_column :spree_banks, :additional_details, :text
4
+ end
5
+ end
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree-bank-transfer'
5
- s.version = '2.2.5'
5
+ s.version = '2.3.0'
6
6
  s.summary = 'Spree extension to create bank transfer payment method.'
7
7
  s.description = 'This Spree extension allows admin to provide bank transfer payment method to its users.'
8
8
  s.required_ruby_version = '>= 1.9.3'
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.require_path = 'lib'
17
17
  s.requirements << 'none'
18
18
 
19
- s.add_dependency 'spree_core', '~> 2.2.0'
19
+ s.add_dependency 'spree_core', '~> 2.3.0'
20
20
 
21
21
  end
metadata CHANGED
@@ -1,50 +1,39 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spree-bank-transfer
3
- version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
6
- segments:
7
- - 2
8
- - 2
9
- - 5
10
- version: 2.2.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.3.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Mohit Bansal
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2014-06-09 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: spree_core
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 7
29
- segments:
30
- - 2
31
- - 2
32
- - 0
33
- version: 2.2.0
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.3.0
34
20
  type: :runtime
35
- version_requirements: *id001
36
- description: This Spree extension allows admin to provide bank transfer payment method to its users.
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.3.0
27
+ description: This Spree extension allows admin to provide bank transfer payment method
28
+ to its users.
37
29
  email: info@vinsol.com
38
30
  executables: []
39
-
40
31
  extensions: []
41
-
42
32
  extra_rdoc_files: []
43
-
44
- files:
45
- - .gitignore
46
- - .rspec
47
- - .travis.yml
33
+ files:
34
+ - ".gitignore"
35
+ - ".rspec"
36
+ - ".travis.yml"
48
37
  - Gemfile
49
38
  - LICENSE
50
39
  - README.md
@@ -84,11 +73,13 @@ files:
84
73
  - app/views/spree/checkout/payment/_banktransfer.html.erb
85
74
  - app/views/spree/content/bank_transfer.html.erb
86
75
  - config/locales/en.yml
76
+ - config/locales/it.yml
87
77
  - config/routes.rb
88
78
  - db/migrate/20130717071443_create_table_bank.rb
89
79
  - db/migrate/20130717125312_add_index_on_active_on_spree_bank.rb
90
80
  - db/migrate/20140519125402_add_bank_name_account_number_and_transaction_reference_number_to_payments.rb
91
81
  - db/migrate/20140530055151_add_column_deposited_on_to_spree_payments.rb
82
+ - db/migrate/20140612131656_add_col_additional_details_to_banks.rb
92
83
  - lib/generators/spree_bank_transfer/.DS_Store
93
84
  - lib/generators/spree_bank_transfer/install/install_generator.rb
94
85
  - lib/payment_details.rb
@@ -107,39 +98,29 @@ files:
107
98
  - spec/spec_helper.rb
108
99
  - spree_bank_transfer.gemspec
109
100
  homepage: http://vinsol.com
110
- licenses:
101
+ licenses:
111
102
  - MIT
103
+ metadata: {}
112
104
  post_install_message:
113
105
  rdoc_options: []
114
-
115
- require_paths:
106
+ require_paths:
116
107
  - lib
117
- required_ruby_version: !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
120
110
  - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 53
123
- segments:
124
- - 1
125
- - 9
126
- - 3
111
+ - !ruby/object:Gem::Version
127
112
  version: 1.9.3
128
- required_rubygems_version: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
131
115
  - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
137
- requirements:
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements:
138
119
  - none
139
120
  rubyforge_project:
140
- rubygems_version: 1.8.24
121
+ rubygems_version: 2.2.2
141
122
  signing_key:
142
- specification_version: 3
123
+ specification_version: 4
143
124
  summary: Spree extension to create bank transfer payment method.
144
125
  test_files: []
145
-
126
+ has_rdoc: