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 +4 -4
- data/lib/paykassa/pay.rb +6 -5
- data/lib/paykassa/version.rb +1 -1
- 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: 2c0f2498ccdce8c0c0832a7f19fa3584d1fc325196b1f75c21a822da9858de18
|
4
|
+
data.tar.gz: 00ce0871d37bdf255ff45611af9676fd7abeefe497f59cbb5ce316a1a956eb4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/paykassa/version.rb
CHANGED