paykassa 0.1.19 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paykassa/order.rb +28 -23
- data/lib/paykassa/version.rb +1 -1
- data/lib/paykassa.rb +0 -2
- 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: 6db58c00ff623144722ae7c9692a171d0ec1db0941cbb7dcae43746b7900a8c6
|
4
|
+
data.tar.gz: 3129f5623d1a824b0622e51723a79a0901247b24c968f010fca8caeddb3be8b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ddeb31c84524f3fe76ed9ce4424fc05d88422f8068a5ad2e85db6386747112a1f1e32fce70ef21773d45ae18a6f968a80a68b1293a7338978ceef781b438277
|
7
|
+
data.tar.gz: d247490f6fc518d4462a672b40287ceda6f252faba2ee5ec2731be4854780dd7b0f7115845c26296ec88a204d36b420292703c68b6eb3f04e6a6699e4af801aa
|
data/lib/paykassa/order.rb
CHANGED
@@ -36,32 +36,34 @@ class PaykassaOrder
|
|
36
36
|
|
37
37
|
# Request for create order
|
38
38
|
def create_order(amount: , currency:, order_id:, paid_commision: , comment:, system:)
|
39
|
+
data = {
|
40
|
+
func: :sci_create_order,
|
41
|
+
amount: amount,
|
42
|
+
currency: currency,
|
43
|
+
order_id: order_id,
|
44
|
+
phone: "false",
|
45
|
+
paid_commission: paid_commision,
|
46
|
+
comment: comment,
|
47
|
+
system: SYSTEM_IDS[system]
|
48
|
+
}
|
49
|
+
puts data.inspect
|
39
50
|
make_request(
|
40
|
-
|
41
|
-
func: :sci_create_order,
|
42
|
-
amount: amount,
|
43
|
-
currency: currency,
|
44
|
-
order_id: order_id,
|
45
|
-
phone: "false",
|
46
|
-
paid_commission: paid_commision,
|
47
|
-
comment: comment,
|
48
|
-
system: SYSTEM_IDS[system]
|
49
|
-
}
|
51
|
+
data
|
50
52
|
)
|
51
53
|
end
|
52
54
|
def get_data(amount: , currency:, order_id:, paid_commission: , comment:, system:)
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
)
|
55
|
+
data = {
|
56
|
+
func: :sci_create_order_get_data,
|
57
|
+
amount: amount,
|
58
|
+
currency: currency,
|
59
|
+
order_id: order_id,
|
60
|
+
phone: "false",
|
61
|
+
paid_commission: paid_commission,
|
62
|
+
comment: comment,
|
63
|
+
system: SYSTEM_IDS[system]
|
64
|
+
}
|
65
|
+
puts data.inspect
|
66
|
+
make_request(data)
|
65
67
|
end
|
66
68
|
|
67
69
|
# Check order status
|
@@ -72,7 +74,10 @@ class PaykassaOrder
|
|
72
74
|
private
|
73
75
|
|
74
76
|
def make_request(data)
|
75
|
-
|
77
|
+
full_data = data.merge(@_auth)
|
78
|
+
puts BASE_SCI_URI
|
79
|
+
puts full_data.inspect
|
80
|
+
res = Net::HTTP.post_form(BASE_SCI_URI, full_data)
|
76
81
|
JSON.parse(res.body).deep_symbolize_keys
|
77
82
|
end
|
78
83
|
end
|
data/lib/paykassa/version.rb
CHANGED
data/lib/paykassa.rb
CHANGED
@@ -46,7 +46,6 @@ module Paykassa
|
|
46
46
|
order = @paykassa_order.get_data( amount: amount,
|
47
47
|
currency: currency,
|
48
48
|
order_id: order_id,
|
49
|
-
phone: "false",
|
50
49
|
paid_commission: paid_commission,
|
51
50
|
comment: comment,
|
52
51
|
system: system
|
@@ -59,7 +58,6 @@ module Paykassa
|
|
59
58
|
amount: amount,
|
60
59
|
currency: currency,
|
61
60
|
order_id: order_id,
|
62
|
-
phone: "false",
|
63
61
|
paid_commission: paid_commision,
|
64
62
|
comment: comment,
|
65
63
|
system: system
|