spree_mollie_gateway 3.0.0.pre.beta → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/app/models/spree/mollie/order_serializer.rb +29 -0
- data/app/models/spree/order_decorator.rb +1 -1
- data/lib/spree_mollie_gateway/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b5e166026cbe5e73895dd1806d2f2a9de535116ce51b7f2b233c7d91c7b84b
|
4
|
+
data.tar.gz: f6462d90a2ed5aff5b237e98292e79f7281f5a29e3d95af028c02063a353743c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8e0f55fbfa671c855d140d63a5ba240cc1f23006611a0c7834b9be0ef44093c8b6216f199e6a2dd98a337a313c7301ae7632b7a3ab4ed24f390c8fa4a9dd217
|
7
|
+
data.tar.gz: 85d95df79e975054152b6b31a20b781738d9cf04b02201d37d95098c3e5c77caa4c1e6d15b5768e9051324dc074a5c3b0e108e3780aa5476917f88d6028fe767
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Please go to the [signup page](https://www.mollie.com/signup) to create a new Mo
|
|
37
37
|
* Allow returning customers to <a href="https://www.mollie.com/en/features/checkout" title="One-click payments">use their previous payment details</a> and pay instantly.
|
38
38
|
|
39
39
|
## Requirements
|
40
|
-
- Spree 3.
|
40
|
+
- Spree 3.3.x or newer.
|
41
41
|
|
42
42
|
## Installation
|
43
43
|
|
@@ -90,6 +90,8 @@ Want to help us make our API client even better? We take [pull requests](https:/
|
|
90
90
|
Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20-612 88 55
|
91
91
|
|
92
92
|
+ [More information about iDEAL via Mollie](https://www.mollie.com/en/payments/ideal/)
|
93
|
+
+ [More information about Klarna Pay Later via Mollie](https://www.mollie.com/en/payments/klarna-pay-later)
|
94
|
+
+ [More information about Klarna Slice It via Mollie](https://www.mollie.com/en/payments/klarna-slice-it)
|
93
95
|
+ [More information about Credit card via Mollie](https://www.mollie.com/en/payments/credit-card/)
|
94
96
|
+ [More information about Bancontact via Mollie](https://www.mollie.com/en/payments/bancontact/)
|
95
97
|
+ [More information about SOFORT Banking via Mollie](https://www.mollie.com/en/payments/sofort/)
|
@@ -83,8 +83,16 @@ module Spree
|
|
83
83
|
@order.line_items.each do |line|
|
84
84
|
order_lines << serialize_line_item(line)
|
85
85
|
end
|
86
|
+
|
86
87
|
order_lines << serialize_discounts if @order.has_order_adjustments?
|
88
|
+
|
87
89
|
order_lines << serialize_shipping_costs
|
90
|
+
|
91
|
+
if @order.shipping_discount.positive?
|
92
|
+
order_lines << serialize_shipping_discounts
|
93
|
+
end
|
94
|
+
|
95
|
+
order_lines
|
88
96
|
end
|
89
97
|
|
90
98
|
def serialize_address(address)
|
@@ -142,6 +150,27 @@ module Spree
|
|
142
150
|
}
|
143
151
|
end
|
144
152
|
|
153
|
+
def serialize_shipping_discounts
|
154
|
+
{
|
155
|
+
type: 'discount',
|
156
|
+
name: 'Shipping discount',
|
157
|
+
quantity: 1,
|
158
|
+
unitPrice: {
|
159
|
+
currency: @order.currency,
|
160
|
+
value: format_money(-@order.display_shipping_discount.money)
|
161
|
+
},
|
162
|
+
totalAmount: {
|
163
|
+
currency: @order.currency,
|
164
|
+
value: format_money(-@order.display_shipping_discount.money)
|
165
|
+
},
|
166
|
+
vatAmount: {
|
167
|
+
currency: @order.currency,
|
168
|
+
value: '0.00'
|
169
|
+
},
|
170
|
+
vatRate: '0'
|
171
|
+
}
|
172
|
+
end
|
173
|
+
|
145
174
|
def serialize_line_item(line)
|
146
175
|
{
|
147
176
|
type: 'physical',
|
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.0.0
|
4
|
+
version: 3.0.0
|
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: 2018-11-
|
11
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_backend
|
@@ -373,9 +373,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
373
373
|
version: '0'
|
374
374
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
375
375
|
requirements:
|
376
|
-
- - "
|
376
|
+
- - ">="
|
377
377
|
- !ruby/object:Gem::Version
|
378
|
-
version:
|
378
|
+
version: '0'
|
379
379
|
requirements: []
|
380
380
|
rubyforge_project:
|
381
381
|
rubygems_version: 2.7.8
|