ruby-gpwebpay 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gp_webpay/payment.rb +1 -1
- data/lib/gp_webpay/payment_attributes.rb +21 -0
- data/lib/gp_webpay/verification.rb +1 -1
- data/lib/gp_webpay/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: 8c66ec822c799ec910c28ee98ba43fb4a106e1458ac9c4e12c419d3989e495c5
|
4
|
+
data.tar.gz: 986bcd67283921d0c3c8122cf61d9b728ba0c7f3243e0ecc8cdcdd7f8f13416d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b73eb3b3191b1b2e25b536931fdbdc0eac14d4bc6783cb3460280a75a6173b6b7d0981bc9b9cf42f96f52a8ebdcd9caf6d0ae5cb9db2ed092a4dc248bc65b0d
|
7
|
+
data.tar.gz: 7dd9b34112990ea1c058fa5818b6c5ad6df43241ec4780bf0f2a4cadbc46c020ef730b277c9a84c9fa7d8b7ad9e9d15b0cb0917a78c8c8e1cd5b848f37e6f6d9
|
data/lib/gp_webpay/payment.rb
CHANGED
@@ -16,6 +16,21 @@ module GpWebpay
|
|
16
16
|
|
17
17
|
MASTER_KEYS = %i(user_param)
|
18
18
|
|
19
|
+
TRANSITIONS = {
|
20
|
+
:merchant_number => 'MERCHANTNUMBER',
|
21
|
+
:order_number => 'ORDERNUMBER',
|
22
|
+
:master_order_number => 'MASTERORDERNUMBER',
|
23
|
+
:amount_in_cents => 'AMOUNT',
|
24
|
+
:deposit_flag => 'DEPOSITFLAG',
|
25
|
+
:merchant_order_number => 'MERORDERNUM',
|
26
|
+
:redirect_url => 'URL',
|
27
|
+
:merchant_description => 'MD',
|
28
|
+
:message_id => 'MESSAGEID',
|
29
|
+
:bank_id => 'BANKID',
|
30
|
+
:currency => 'CURRENCY',
|
31
|
+
:operation => 'OPERATION'
|
32
|
+
}
|
33
|
+
|
19
34
|
def initialize(payment, ws_flag = false, type = "")
|
20
35
|
@payment = payment
|
21
36
|
@ws_flag = ws_flag
|
@@ -54,5 +69,11 @@ module GpWebpay
|
|
54
69
|
hash
|
55
70
|
end
|
56
71
|
end
|
72
|
+
|
73
|
+
def self.map_to_keys(hash)
|
74
|
+
hash.each_with_object({}) do |(method, value), transformed|
|
75
|
+
transformed[TRANSITIONS[method]] = value
|
76
|
+
end
|
77
|
+
end
|
57
78
|
end
|
58
79
|
end
|
data/lib/gp_webpay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-gpwebpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrej Antas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|