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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70a713697194fdb5fd26d597affdbd11f99ede103c580120f9ec6a4ede4c8b4e
4
- data.tar.gz: 850ad95ef63c237a96723798d274b86c187c99887ca6485b36639ee1341e9f9c
3
+ metadata.gz: 6db58c00ff623144722ae7c9692a171d0ec1db0941cbb7dcae43746b7900a8c6
4
+ data.tar.gz: 3129f5623d1a824b0622e51723a79a0901247b24c968f010fca8caeddb3be8b0
5
5
  SHA512:
6
- metadata.gz: ec7af94670998882aa912ff51649bba3644298a12cdaea7798d396087dcbc6bb6da8f336265cc0ffdb3514911cb4f0e69de096f0b4029d76f7099aaf018754c1
7
- data.tar.gz: 6e8cf3a0a482bffd547fd9755fc9811a1b854b0a9525b0f44517fac4ad1728e051965ea2e065e8d9bd55ce007bf6fb14182982fd35b871b1670f0f0323a282b1
6
+ metadata.gz: 6ddeb31c84524f3fe76ed9ce4424fc05d88422f8068a5ad2e85db6386747112a1f1e32fce70ef21773d45ae18a6f968a80a68b1293a7338978ceef781b438277
7
+ data.tar.gz: d247490f6fc518d4462a672b40287ceda6f252faba2ee5ec2731be4854780dd7b0f7115845c26296ec88a204d36b420292703c68b6eb3f04e6a6699e4af801aa
@@ -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
- 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
- )
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
- res = Net::HTTP.post_form(BASE_SCI_URI, data.merge(@_auth))
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paykassa
4
- VERSION = "0.1.19"
4
+ VERSION = "0.1.22"
5
5
  end
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
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.19
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - nottewae