paykassa 0.1.20 → 0.1.23

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: cc289024a105bba1fbf962902eaef1c009639112521717c706fc4f2dfb0c4f05
4
- data.tar.gz: cadef35697b660e15cc8f4a87a0205b42aae75c6673030b6e7d9cf790962df67
3
+ metadata.gz: 47f2cdcdc2333b4c6a65a97c7bd2f2da5fb06480ddefef2f0bca83ee096ec013
4
+ data.tar.gz: d0a11b736ee62417e9e506e1ca1ea5dd752916477066389de4aa83839a132317
5
5
  SHA512:
6
- metadata.gz: f37b6032da1a743e004b659c6ac7e9e77f314e0ff1e6082e66c0630113192f89beffb3a054e3bf906e78f9a302c5df81cb2854b4ad1df77a8af006e1905cc7b3
7
- data.tar.gz: 80770b980ce9100337e6569febede4954f023d1d62fd2e91810d8c455fd495474302b12f55fde170abf2769f4f425989266c41a219c550ce6cdcc5c2b79e6f29
6
+ metadata.gz: f5731572f3652c25125c87b85ecfa18f8df57acfe6dde1a0dbc40e28df9ca953cbc9209000b1c3a1ad767ad1821906b454409d7042cc0db8f957ee655aad1418
7
+ data.tar.gz: a28f2d1c3a8cebede63588751399033dcf62ec3f1c7fec0fe1291365229208e4df1a89b4654e0405aae178b4741bb7fe999221b2d2e26ba2bdfcb57d72d3adc9
@@ -36,32 +36,36 @@ class PaykassaOrder
36
36
 
37
37
  # Request for create order
38
38
  def create_order(amount: , currency:, order_id:, paid_commision: , comment:, system:)
39
+ puts "system: #{system}"
40
+ data = {
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
+ }
50
+ puts data.inspect
39
51
  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
- }
52
+ data
50
53
  )
51
54
  end
52
55
  def get_data(amount: , currency:, order_id:, paid_commission: , comment:, system:)
53
- make_request(
54
- {
55
- func: :sci_create_order_get_data,
56
- amount: amount,
57
- currency: currency,
58
- order_id: order_id,
59
- phone: "false",
60
- paid_commission: paid_commission,
61
- comment: comment,
62
- system: SYSTEM_IDS[system]
63
- }
64
- )
56
+ puts "system: #{system}"
57
+ data = {
58
+ func: :sci_create_order_get_data,
59
+ amount: amount,
60
+ currency: currency,
61
+ order_id: order_id,
62
+ phone: "false",
63
+ paid_commission: paid_commission,
64
+ comment: comment,
65
+ system: SYSTEM_IDS[system]
66
+ }
67
+ puts data.inspect
68
+ make_request(data)
65
69
  end
66
70
 
67
71
  # Check order status
@@ -72,7 +76,10 @@ class PaykassaOrder
72
76
  private
73
77
 
74
78
  def make_request(data)
75
- res = Net::HTTP.post_form(BASE_SCI_URI, data.merge(@_auth))
79
+ full_data = data.merge(@_auth)
80
+ puts BASE_SCI_URI
81
+ puts full_data.inspect
82
+ res = Net::HTTP.post_form(BASE_SCI_URI, full_data)
76
83
  JSON.parse(res.body).deep_symbolize_keys
77
84
  end
78
85
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paykassa
4
- VERSION = "0.1.20"
4
+ VERSION = "0.1.23"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paykassa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - nottewae