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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8be4719a535970d4506b3971e3491334ba7e9b2f8aba01e4139f30e91247cda9
4
- data.tar.gz: a850df14477d43e85e07b351f79c6a3e0449b6ff4f241ae38247c8ed7d6415f7
3
+ metadata.gz: 631f05a5c2610a299ed012e54c815a2846f2092d882c390149158e982a9d371e
4
+ data.tar.gz: db0f26c05deee4bb9eaf35bdfbdaf90d4bccdafb066bcb6fc940655232f6c045
5
5
  SHA512:
6
- metadata.gz: 7b31c38993042d694e39081ccdf1a891d8c0434e779e193f1b36cdeb109e942cca2cfd82962762a0ea25cd3006fee6367e54d3be0cdef7fd1dc6f1c2494e20b9
7
- data.tar.gz: 7ac9a9c7044b7905855b5977576b91850efe1a0ea574cde02f47d4a0ad314906fec616c08f726c7699c96c1531f4e7d8b0cdc94809350ac3be7fd0e9e80906e9
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 = { customer: {} }
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 = { customer: {} }
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusNexio
4
- VERSION = '0.4.2'
4
+ VERSION = '0.4.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_nexio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Whitespectre