spree_mollie_gateway 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 785a4f3e96e91da89386b6e7f12d9916303c00dcfb4acc8e0e6cdefefc184274
4
- data.tar.gz: 9cb65667775353fb1ab80197c1163f7a9c7ed6611602ec42d8ec51c043cb894e
3
+ metadata.gz: 4e2cca6790b23f484d63d21c1a4fd7b2bf0395669451747997ea74defc395bb1
4
+ data.tar.gz: b72b07e1cd8f1031778836a93921bd7051b3a8342cff0fad5391b3251421f85b
5
5
  SHA512:
6
- metadata.gz: bed74ed98aab91919c41988214901c60b87c990c1a099d9ba5e7df47cfc7204f5567de1ecf0c6630681a13065f9b4915f22eece38e8122d364748a3c0ca9094c
7
- data.tar.gz: e5ec9096cb268de67b1b61f90e1b6ba9ac56b721a84ce478955c878b819571dfd77a7afebe45a34640807076468740d7cefd5a0cd86a644f949d31608ef9f621
6
+ metadata.gz: 496d9da85c83ccaae696231b382595e9967a8ee78c9e5a2e5fc6181aec5d5ff789e636123265e80f2d5bf3d6758d4e3c7d15d2004aab2df6c80811740cae2a47
7
+ data.tar.gz: c46c73fccbd1f90d853bb7ddcdcc6637911e52bd99338d7376cfad33397df95c47bd6fa0b30096130e706400360b4ca379df240d53eae60a591f5f804c794ecf
data/README.md CHANGED
@@ -84,7 +84,7 @@ If you wish to learn more about our API, please visit the [Mollie API Documentat
84
84
  Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-ruby/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a technology oriented organization? Mollie is hiring developers and system engineers. [Check out our vacancies](https://jobs.mollie.com/) or [get in touch](mailto:recruitment@mollie.com).
85
85
 
86
86
  ## License
87
- [BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php). Copyright (c) 2014-2018, Mollie B.V.
87
+ [BSD (Berkeley Software Distribution) License](https://opensource.org/licenses/bsd-license.php). Copyright (c) 2014-2019, Mollie B.V.
88
88
 
89
89
  ## Support
90
90
  Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20-612 88 55
@@ -105,3 +105,5 @@ Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20
105
105
  + [More information about Gift cards via Mollie](https://www.mollie.com/en/payments/gift-cards)
106
106
  + [More information about EPS via Mollie](https://www.mollie.com/en/payments/eps)
107
107
  + [More information about Giropay via Mollie](https://www.mollie.com/en/payments/giropay)
108
+ + [More information about Apple Pay via Mollie](https://www.mollie.com/en/payments/apple-pay)
109
+ + [More information about Przelewy24 via Mollie](https://www.mollie.com/en/payments/przelewy24)
@@ -27,7 +27,7 @@ Spree::Order.class_eval do
27
27
  end
28
28
 
29
29
  def is_paid_with_mollie?
30
- payments.collect(&:payment_method).any? {|pm| pm.type == 'Spree::Gateway::MollieGateway'}
30
+ payments.any? && payments.last&.payment_method&.type == 'Spree::Gateway::MollieGateway'
31
31
  end
32
32
 
33
33
  def send_confirmation_email!
@@ -50,21 +50,21 @@
50
50
  <div class="col-xs-12 col-md-4">
51
51
  <div class="form-group">
52
52
  <%= label_tag :q_state_eq, Spree.t(:status) %>
53
- <%= f.select :state_eq, Spree::Order.state_machines[:state].states.map {|s| [Spree.t("order_state.#{s.name}"), s.value]}, { include_blank: true }, class: 'select2 js-filterable' %>
53
+ <%= f.select :state_eq, Spree::Order.state_machines[:state].states.map { |s| [Spree.t("order_state.#{s.name}"), s.value] }, {include_blank: true}, class: 'select2 js-filterable' %>
54
54
  </div>
55
55
  </div>
56
56
 
57
57
  <div class="col-xs-12 col-md-4">
58
58
  <div class="form-group">
59
59
  <%= label_tag :q_payment_state_eq, Spree.t(:payment_state) %>
60
- <%= f.select :payment_state_eq, Spree::Order::PAYMENT_STATES.map {|s| [Spree.t("payment_states.#{s}"), s]}, { include_blank: true }, class: 'select2 js-filterable' %>
60
+ <%= f.select :payment_state_eq, Spree::Order::PAYMENT_STATES.map { |s| [Spree.t("payment_states.#{s}"), s] }, {include_blank: true}, class: 'select2 js-filterable' %>
61
61
  </div>
62
62
  </div>
63
63
 
64
64
  <div class="col-xs-12 col-md-4">
65
65
  <div class="form-group">
66
66
  <%= label_tag :q_shipment_state_eq, Spree.t(:shipment_state) %>
67
- <%= f.select :shipment_state_eq, Spree::Order::SHIPMENT_STATES.map {|s| [Spree.t("shipment_states.#{s}"), s]}, { include_blank: true }, class: 'select2 js-filterable' %>
67
+ <%= f.select :shipment_state_eq, Spree::Order::SHIPMENT_STATES.map { |s| [Spree.t("shipment_states.#{s}"), s] }, {include_blank: true}, class: 'select2 js-filterable' %>
68
68
  </div>
69
69
  </div>
70
70
 
@@ -107,14 +107,14 @@
107
107
  <div class="col-xs-12 col-md-4">
108
108
  <div class="form-group">
109
109
  <%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
110
- <%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2' %>
110
+ <%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), {include_blank: true}, class: 'select2' %>
111
111
  </div>
112
112
  </div>
113
113
 
114
114
  <div class="col-xs-12 col-md-4">
115
115
  <div class="form-group">
116
116
  <%= label_tag :q_store_id_in, Spree.t(:store) %>
117
- <%= f.select :store_id_in, Spree::Store.order("#{Spree::Store.table_name}.name").pluck(:name, :id), { include_blank: true }, class: 'select2' %>
117
+ <%= f.select :store_id_in, Spree::Store.order("#{Spree::Store.table_name}.name").pluck(:name, :id), {include_blank: true}, class: 'select2' %>
118
118
  </div>
119
119
  </div>
120
120
 
@@ -159,19 +159,19 @@
159
159
  <thead>
160
160
  <tr data-hook="admin_orders_index_headers">
161
161
  <% if @show_only_completed %>
162
- <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order') %></th>
162
+ <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order') %></th>
163
163
  <% else %>
164
- <th><%= sort_link @search, :created_at, I18n.t(:created_at, scope: 'activerecord.attributes.spree/order') %></th>
164
+ <th><%= sort_link @search, :created_at, I18n.t(:created_at, scope: 'activerecord.attributes.spree/order') %></th>
165
165
  <% end %>
166
- <th><%= sort_link @search, :number, I18n.t(:number, scope: 'activerecord.attributes.spree/order') %></th>
166
+ <th><%= sort_link @search, :number, I18n.t(:number, scope: 'activerecord.attributes.spree/order') %></th>
167
167
  <th><%= sort_link @search, :considered_risky, I18n.t(:considered_risky, scope: 'activerecord.attributes.spree/order') %></th>
168
- <th><%= sort_link @search, :state, I18n.t(:state, scope: 'activerecord.attributes.spree/order') %></th>
169
- <th><%= sort_link @search, :payment_state, I18n.t(:payment_state, scope: 'activerecord.attributes.spree/order') %></th>
168
+ <th><%= sort_link @search, :state, I18n.t(:state, scope: 'activerecord.attributes.spree/order') %></th>
169
+ <th><%= sort_link @search, :payment_state, I18n.t(:payment_state, scope: 'activerecord.attributes.spree/order') %></th>
170
170
  <% if Spree::Order.checkout_step_names.include?(:delivery) %>
171
171
  <th><%= sort_link @search, :shipment_state, I18n.t(:shipment_state, scope: 'activerecord.attributes.spree/order') %></th>
172
172
  <% end %>
173
- <th><%= sort_link @search, :email, I18n.t(:email, scope: 'activerecord.attributes.spree/order') %></th>
174
- <th><%= sort_link @search, :total, I18n.t(:total, scope: 'activerecord.attributes.spree/order') %></th>
173
+ <th><%= sort_link @search, :email, I18n.t(:email, scope: 'activerecord.attributes.spree/order') %></th>
174
+ <th><%= sort_link @search, :total, I18n.t(:total, scope: 'activerecord.attributes.spree/order') %></th>
175
175
  <th data-hook="admin_orders_index_header_actions" class="actions"></th>
176
176
  </tr>
177
177
  </thead>
@@ -192,12 +192,17 @@
192
192
  <span class="icon icon-filter filterable js-add-filter" data-ransack-field="q_state_eq" data-ransack-value="<%= order.state %>"></span>
193
193
  </td>
194
194
  <td>
195
- <% if order.payments.count > 0 && order.payments.last.source.present? %>
196
- <% if order.payments.last.after_pay_method? && order.payments.last.authorized? %>
197
- <span class="label label-authorized"><%= link_to 'authorized', admin_order_payments_path(order) %></span>
198
- <% else %>
199
- <span class="label label-<%= order.payments.last.source.status %>"><%= link_to order.payments.last.source.status, admin_order_payments_path(order) %></span>
195
+ <% if order.is_paid_with_mollie? %>
196
+ <% if order.payments.count > 0 && order.payments.last.source.present? %>
197
+ <% if order.payments.last.after_pay_method? && order.payments.last.authorized? %>
198
+ <span class="label label-authorized"><%= link_to 'authorized', admin_order_payments_path(order) %></span>
199
+ <% else %>
200
+ <span class="label label-<%= order.payments.last.source.status %>"><%= link_to order.payments.last.source.status, admin_order_payments_path(order) %></span>
201
+ <% end %>
200
202
  <% end %>
203
+ <% else %>
204
+ <span class="label label-<%= order.payment_state %>"><%= link_to Spree.t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) %></span>
205
+ <span class="icon icon-filter filterable js-add-filter" data-ransack-field="q_payment_state_eq" data-ransack-value="<%= order.payment_state %>"></span>
201
206
  <% end %>
202
207
  </td>
203
208
  <% if Spree::Order.checkout_step_names.include?(:delivery) %>
@@ -1,3 +1,3 @@
1
1
  module SpreeMollieGateway
2
- VERSION = '3.2.0'.freeze
2
+ VERSION = '3.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_mollie_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vernon de Goede
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2019-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_backend
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
399
399
  - !ruby/object:Gem::Version
400
400
  version: '0'
401
401
  requirements: []
402
- rubygems_version: 3.0.4
402
+ rubygems_version: 3.0.6
403
403
  signing_key:
404
404
  specification_version: 4
405
405
  summary: Mollie payments for Spree Commerce.