solidus_nexio 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/solidus_nexio/nexio_data.rb +6 -2
- data/lib/solidus_nexio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 631f05a5c2610a299ed012e54c815a2846f2092d882c390149158e982a9d371e
|
4
|
+
data.tar.gz: db0f26c05deee4bb9eaf35bdfbdaf90d4bccdafb066bcb6fc940655232f6c045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92023146702086cc3c04e094c1cbeb2b9d9d842655e25575c25f137568c2b1c0189b9eab79e2b4e2e772212be395e11b242d2d2dd4592ac65b6eea2c7568d1f1
|
7
|
+
data.tar.gz: 42d6cb1799e73db71d43989c3415760a02bbbaff17baff00ac787f62210de28367b444c0e0f1a90033b45a94bb25352273b19a206496fb7df51ecb94e4385cb2
|
@@ -5,7 +5,7 @@ module SolidusNexio
|
|
5
5
|
extend self
|
6
6
|
|
7
7
|
def one_time_token(order:, user:)
|
8
|
-
acc =
|
8
|
+
acc = build_config
|
9
9
|
|
10
10
|
if order
|
11
11
|
add_order_data(acc, order)
|
@@ -20,7 +20,7 @@ module SolidusNexio
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def purchase(order)
|
23
|
-
acc =
|
23
|
+
acc = build_config
|
24
24
|
add_order_data(acc, order)
|
25
25
|
add_order_cart(acc, order)
|
26
26
|
add_customer_data(acc, order)
|
@@ -29,6 +29,10 @@ module SolidusNexio
|
|
29
29
|
|
30
30
|
private
|
31
31
|
|
32
|
+
def build_config
|
33
|
+
{ customer: {}, currency: Spree::Config.currency }
|
34
|
+
end
|
35
|
+
|
32
36
|
def add_order_data(acc, order)
|
33
37
|
acc[:currency] = order.currency
|
34
38
|
acc[:customer].merge!(email: order.email)
|