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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64de34c3cebe3f4835c39cd3659518efbe64ebbf
4
- data.tar.gz: a4595959420d01ab457f9d58082c4fb71e1e3a75
3
+ metadata.gz: 9ba28ead27673f3946abbed42987fecc0a4a0b35
4
+ data.tar.gz: 1b57c52e3a007d1eec6a16ffd994d302a794bccd
5
5
  SHA512:
6
- metadata.gz: f4a9dec92d7b849e11e08291c251458322b10f24fc72d68c359e0e2c992cce4ef033dc2e1361f5814ce03e5450a62b982d2f635a8a585d95ed99318b7618f801
7
- data.tar.gz: cacde54e0c30fd1bc2f0af4f841b328dce83c00f2eefd0f953ce95ed3befffeceaf30c14e8b0cca51a92c3b8a774494ae8b5a25ab2aae7d4dbfe77d1e0aa8940
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
@@ -1,3 +1,3 @@
1
1
  module Paymaster
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
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.0.0
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-02-13 00:00:00.000000000 Z
11
+ date: 2016-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday