paymaster 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/paymaster/url_generator.rb +8 -1
- data/lib/paymaster/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba28ead27673f3946abbed42987fecc0a4a0b35
|
4
|
+
data.tar.gz: 1b57c52e3a007d1eec6a16ffd994d302a794bccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c97fa094992c9c5f503f2d41f7b59e454c2c853b9de3c9d80617480fb02e68f6b3748535dcd52e76603736d4f8f7c2419ce1ad2f1dc5a0c6f8f31f01bd528e80
|
7
|
+
data.tar.gz: d8f1c394062daa3250fe72ee50b5cae3d9633e7f77e20dfe7b0af9c4c6b7bda58af63f94b74d8b8e575c069df9352f9e3f20aa5b16b101a98cf4eba07999431b
|
data/README.md
CHANGED
@@ -30,8 +30,8 @@ client = Paymaster::Client.new(merchant_id: 123, secret_key: "secret")
|
|
30
30
|
Then you can generate payment link:
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
url = client.generate_url(amount: 150, description: "Test", number: "7654321")
|
34
|
-
# => "https://lmi.paymaster.ua/index/get?LMI_MERCHANT_ID=123&LMI_PAYMENT_AMOUNT=150&LMI_PAYMENT_NO=7654321&LMI_PAYMENT_DESC=Test&LMI_HASH=473035659648C1F3AF99F1E2E7B1A2863144916C908AE990C5E8F42EF2577465"
|
33
|
+
url = client.generate_url(amount: 150, description: "Test", number: "7654321", locale: "uk")
|
34
|
+
# => "https://lmi.paymaster.ua/uk/index/get?LMI_MERCHANT_ID=123&LMI_PAYMENT_AMOUNT=150&LMI_PAYMENT_NO=7654321&LMI_PAYMENT_DESC=Test&LMI_HASH=473035659648C1F3AF99F1E2E7B1A2863144916C908AE990C5E8F42EF2577465"
|
35
35
|
```
|
36
36
|
|
37
37
|
Fetch information about existing transaction:
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Paymaster
|
2
2
|
class UrlGenerator < BaseRequest
|
3
|
+
attr_accessor :locale
|
3
4
|
attr_accessor :amount
|
4
5
|
attr_accessor :number
|
5
6
|
attr_accessor :description
|
@@ -14,7 +15,7 @@ module Paymaster
|
|
14
15
|
attr_accessor :sim_mode
|
15
16
|
|
16
17
|
def endpoint
|
17
|
-
"https://lmi.paymaster.ua/index/get"
|
18
|
+
"https://lmi.paymaster.ua/#{fetch_locale}/index/get"
|
18
19
|
end
|
19
20
|
|
20
21
|
def params
|
@@ -59,5 +60,11 @@ module Paymaster
|
|
59
60
|
def params_as_string
|
60
61
|
params.map { |k, v| "#{k}=#{v}" }.join("&")
|
61
62
|
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
def fetch_locale
|
67
|
+
locale.to_s.in?(%w[ru uk en]) ? locale : "ru"
|
68
|
+
end
|
62
69
|
end
|
63
70
|
end
|
data/lib/paymaster/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paymaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Platonov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|