solidus_nexio 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/solidus_nexio/alternative_payments_controller.rb +1 -6
- data/app/models/solidus_nexio/alternative_payment_method.rb +4 -0
- data/app/models/solidus_nexio/nexio_payment_commons.rb +6 -1
- data/app/models/solidus_nexio/payment_method.rb +4 -0
- data/lib/solidus_nexio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8361f30a70f96efe591f9c8eca63cb42e4a68e67ba7b41b206679a709427a4a
|
4
|
+
data.tar.gz: 383d7aef60ffdb1d6ddd155f5d44e1b2e90723cb00dcf031f4b6dc26582cbda2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a79da759f9619d873eaf2a9300144bbb4794c653e2fc44461369e333e55d524ddc83dbfc4ada5ad66e7bf71f9cf4640067619657f40be619ea8d65f8034e4c6
|
7
|
+
data.tar.gz: 312b0740baf6cf7b42e1e05a73b4cadefb15fb3edbe022a0d0bb1c56dd5dd2e6c60116592328ff3243e4d7e2c7aa1f0fc1d0fb556b4b8ceaefe70c27548545fd
|
@@ -24,12 +24,7 @@ module SolidusNexio
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def current_order_params
|
27
|
-
|
28
|
-
currency: current_pricing_options.currency,
|
29
|
-
guest_token: cookies.signed[:guest_token],
|
30
|
-
store_id: current_store.id,
|
31
|
-
user_id: try_spree_current_user.try(:id)
|
32
|
-
}.tap do |order_params|
|
27
|
+
super.tap do |order_params|
|
33
28
|
order_params.delete(:user_id) if order_params[:guest_token].present? && order_params[:user_id].blank?
|
34
29
|
end
|
35
30
|
end
|
@@ -12,7 +12,7 @@ module SolidusNexio
|
|
12
12
|
|
13
13
|
def cancel(id)
|
14
14
|
transaction = gateway.get_transaction(id)
|
15
|
-
return unless transaction
|
15
|
+
return error_response(id, 'not found') unless transaction
|
16
16
|
|
17
17
|
if Mappings.settled?(transaction.status)
|
18
18
|
credit(transaction.amount.to_money.cents, id)
|
@@ -33,5 +33,10 @@ module SolidusNexio
|
|
33
33
|
end
|
34
34
|
result
|
35
35
|
end
|
36
|
+
|
37
|
+
def error_response(transaction_id, code)
|
38
|
+
error_mess = "The transaction ID:#{transaction_id} is #{code} with Nexio API"
|
39
|
+
OpenStruct.new('success?': false, to_yml: error_mess)
|
40
|
+
end
|
36
41
|
end
|
37
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_nexio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Whitespectre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nexio_activemerchant
|