paykassa 0.1.7 → 0.1.10

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: 237330a88755e8d2a985c548f85fa1204680bdc2e8ceb29c520794e21ff52434
4
- data.tar.gz: 91be904d830aea449b0eb9f854e746cebd3a856d9585c64e716987e65c37309f
3
+ metadata.gz: 2c0f2498ccdce8c0c0832a7f19fa3584d1fc325196b1f75c21a822da9858de18
4
+ data.tar.gz: 00ce0871d37bdf255ff45611af9676fd7abeefe497f59cbb5ce316a1a956eb4e
5
5
  SHA512:
6
- metadata.gz: 84a4764fc5899a4b6b5831073ccb4f2bda2ec27faff2fca3619123059533ddf50459f497ea7599dc556c186e35b551ff5628394673aedf90ac88e34429299f0a
7
- data.tar.gz: 9cad08c1dd4ef6e9a95409fbc4a5a2b5d1bb958ce0f5b0fd4c6a877dea3bb216c4f5f151c1fadebbc1347c2f67f3cd21769a3ab2671bce5939363b0306ad84f4
6
+ metadata.gz: abdc74633407d1181db6cc9dc83955db47969936b50e5528b5e15b2704f82265ce2e842b411d8b6d50919ac87abf823b50ed6f09c9cc281b40306e6553946a32
7
+ data.tar.gz: 100f0cff3c7fe02e23f29a77cab144ada554bb675e9d7c7ba663b07ace2cc03b80b487180d2f38c51f266e8e67f691099f1ac951a3b2b6a7f2c7728077867b6f
data/lib/paykassa/pay.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require 'net/http'
2
2
 
3
3
  class PaykassaPay
4
- BASE_URL = "https://paykassa.app/api/0.5/index.php"
5
- RATE_URL = "https://currency.paykassa.pro/index.php"
4
+ BASE_URL = URI("https://paykassa.app/api/0.5/index.php")
5
+ RATE_URL = URI("https://currency.paykassa.pro/index.php")
6
+ BASE_SCI_URI = URI('https://paykassa.pro/sci/0.3/index.php')
6
7
  CURRENCIES=[
7
8
  "USD", "RUB", "BTC", "ETH", "LTC", "DOGE", "DASH", "BCH", "ZEC",
8
9
  "XRP", "TRX", "XLM", "BNB", "USDT", "ADA", "EOS", "GBP", "EUR",
@@ -46,8 +47,8 @@ class PaykassaPay
46
47
  def balance(shop: )
47
48
  data = {
48
49
  shop: shop,
49
- pi_id: api_id,
50
- api_key: api_key
50
+ pi_id: @_auth[:api_id],
51
+ api_key: @_auth[:api_key]
51
52
  }
52
53
  make_request("api_get_shop_balance", data, false)
53
54
  end
@@ -71,7 +72,7 @@ class PaykassaPay
71
72
  end
72
73
  private
73
74
  def make_request(func,data,merge_auth = true, url= nil)
74
- data = data.merge({func: func}) if func
75
+ data = data.merge({func: func}) if !func.nil?
75
76
  data = data.merge(@_auth) if merge_auth
76
77
  url = BASE_SCI_URI if url.nil?
77
78
  res = Net::HTTP.post_form(url, data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paykassa
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.10"
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.7
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - nottewae