przelewy24 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/przelewy24/transaction.rb +21 -1
- data/lib/przelewy24/version.rb +1 -1
- metadata +1 -1
@@ -1,7 +1,9 @@
|
|
1
1
|
module Przelewy24
|
2
2
|
class Transaction
|
3
3
|
attr_reader :session_id, :merchant_id, :amount, :crc, :description, :email, :signature,
|
4
|
-
:url_return, :url_status, :wait_for_result, :currency, :country, :encoding
|
4
|
+
:url_return, :url_status, :wait_for_result, :currency, :country, :encoding,
|
5
|
+
:client_name, :client_address, :client_zip, :client_city, :client_phone, :language,
|
6
|
+
:method, :time_limit, :channel
|
5
7
|
|
6
8
|
def initialize(data = {})
|
7
9
|
@data ||= {}
|
@@ -18,6 +20,15 @@ module Przelewy24
|
|
18
20
|
@currency = data[:currency]
|
19
21
|
@country = data[:country]
|
20
22
|
@encoding = data[:encoding]
|
23
|
+
@client_name = data[:client_name]
|
24
|
+
@client_address = data[:client_address]
|
25
|
+
@client_zip = data[:client_zip]
|
26
|
+
@client_city = data[:client_city]
|
27
|
+
@client_phone = data[:client_phone]
|
28
|
+
@language = data[:language]
|
29
|
+
@method = data[:method]
|
30
|
+
@time_limit = data[:time_limit]
|
31
|
+
@channel = data[:channel]
|
21
32
|
|
22
33
|
@signature = calculate_signature
|
23
34
|
end
|
@@ -31,10 +42,19 @@ module Przelewy24
|
|
31
42
|
p24_currency: currency,
|
32
43
|
p24_description: description,
|
33
44
|
p24_email: email,
|
45
|
+
p24_client: client_name,
|
46
|
+
p24_address: client_address,
|
47
|
+
p24_zip: client_zip,
|
48
|
+
p24_city: client_city,
|
34
49
|
p24_country: country,
|
50
|
+
p24_phone: client_phone,
|
51
|
+
p24_language: language,
|
52
|
+
p24_method: method,
|
35
53
|
p24_url_return: url_return,
|
36
54
|
p24_url_status: url_status,
|
55
|
+
p24_time_limit: time_limit,
|
37
56
|
p24_wait_for_result: wait_for_result,
|
57
|
+
p24_channel: channel,
|
38
58
|
p24_sign: signature,
|
39
59
|
p24_encoding: encoding,
|
40
60
|
p24_api_version: '3.2'
|
data/lib/przelewy24/version.rb
CHANGED