platidoma 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/platidoma/client.rb +2 -3
- data/lib/platidoma/version.rb +1 -1
- data/test/lib/platidoma/client_test.rb +1 -1
- metadata +1 -1
data/lib/platidoma/client.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
module Platidoma
|
2
2
|
|
3
3
|
class Client
|
4
|
-
attr_accessor :shop_id, :login, :gate_password
|
4
|
+
attr_accessor :shop_id, :login, :gate_password
|
5
5
|
|
6
6
|
def initialize(args)
|
7
7
|
self.shop_id = args[:shop_id]
|
8
8
|
self.login = args[:login]
|
9
9
|
self.gate_password = args[:gate_password]
|
10
|
-
self.url = args[:url]
|
11
10
|
end
|
12
11
|
|
13
12
|
def build_payment_sign(args)
|
@@ -39,7 +38,7 @@ module Platidoma
|
|
39
38
|
uri = ::Addressable::URI.new
|
40
39
|
uri.query_values = params
|
41
40
|
|
42
|
-
"https://#{Platidoma.configuration.host}?#{uri.query}"
|
41
|
+
"https://#{Platidoma.configuration.host}/payment.php?#{uri.query}"
|
43
42
|
|
44
43
|
end
|
45
44
|
|
data/lib/platidoma/version.rb
CHANGED
@@ -34,7 +34,7 @@ class ClientTest < TestCase
|
|
34
34
|
}
|
35
35
|
|
36
36
|
url = @client.build_payment_url params
|
37
|
-
expected_url = "https://#{Platidoma.configuration.host}?pd_amount=1.00&pd_email=email&pd_login=test&pd_order_id=1&pd_rnd=rnd&pd_shop_id=1&pd_sign=sign"
|
37
|
+
expected_url = "https://#{Platidoma.configuration.host}/payment.php?pd_amount=1.00&pd_email=email&pd_login=test&pd_order_id=1&pd_rnd=rnd&pd_shop_id=1&pd_sign=sign"
|
38
38
|
assert_equal expected_url, url
|
39
39
|
|
40
40
|
end
|