yandex_kassa 0.1.13 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3acc38bb680379a4723ff8fd47c4de50345dbf24
4
- data.tar.gz: a56d250a3799ed2646a3f12349ef783a9fe356af
3
+ metadata.gz: 182c72bb99b467b0d18bd0b20b4448aa8e546f94
4
+ data.tar.gz: 780051ffd20af9da994091b5023e4dff2c6072fd
5
5
  SHA512:
6
- metadata.gz: ef268e24e689952577e826b5d5a99cf10b3032f159eebd568f67c735eee413a3910822e6e22c8c7765d74ae8bf14f87ace2c6d2798dce2b6085d81e862c0632b
7
- data.tar.gz: 0c7856f569af9965365584ef2b5be4a2f76a78357974cb4bba699d060d2228ba32654cd6f469bba38de2f750dbe254140396ebcdd4ab1cee8a444279d76b4412
6
+ metadata.gz: be8099c7ef03b644b5b0edc19561864f3977207792e2efa2b6a9ebb545228a261299cbfbac81b0526b61d2895c40f81bdac9de282d0d1358fe2b316d332f6f89
7
+ data.tar.gz: f51351900efe50e5e5c41b192c8b69f14993e828b5413f7ab324a604f6f892aa78f098e1e7bdac40a6921d4ee3bd54780571ea28a70e2030b1548d523757ea31
data/README.md CHANGED
@@ -39,6 +39,8 @@ YandexKassa.configure do |config|
39
39
  end
40
40
  ```
41
41
 
42
+ **testDeposition:**
43
+
42
44
  ```ruby
43
45
  #enable std loggin for Rest client
44
46
  RestClient.log = 'stdout'
@@ -67,6 +69,58 @@ data = api.test_deposition do |request|
67
69
  end
68
70
  # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<testDepositionResponse clientOrderId=\"1\" status=\"3\" error=\"41\" processedDT=\"2016-03-23T12:52:53.087+03:00\" identification=\"anonymous\" />\r\n"
69
71
  ```
72
+ **makeDeposition:**
73
+
74
+ ```ruby
75
+ #send make deposition request
76
+ payment_params = { "skr_destinationCardSynonim" => "b0af887ae9ad01fe01ca65df7cff19a7b5fcbf9b_scn",
77
+ "pdr_firstName" => "Владимир",
78
+ "pdr_middleName" => "Владимирович",
79
+ "pdr_docNumber" => "4002109067",
80
+ "pdr_postcode" => "194044",
81
+ "pdr_country" => "643",
82
+ "pdr_city" => "Москва",
83
+ "pdr_adress" => "ул. Какая-то",
84
+ "pdr_birthDate" => "24.05.1987",
85
+ "pdr_birthplace" => "Новосибирск",
86
+ "pdr_docIssueYear" => "1999",
87
+ "pdr_docIssueMonth" => "7",
88
+ "pdr_docIssueDay" => "30",
89
+ "pdr_docIssuedBy" => "ТП",
90
+ "pof_offerAccepted" => 1,
91
+ "smsPhoneNumber" => "79653457676"
92
+ }
93
+
94
+ make_deposition_params = {
95
+ dst_account: "410011234567", amount: "10.00", currency: 10643,
96
+ agent_id: "123123", contract: "Fun stuff", client_order_id: 1, request_dt: Time.now.iso8601,
97
+ payment_params: payment_params
98
+ }
99
+
100
+ data = api.make_deposition(make_deposition_params)
101
+ # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<makeDepositionResponse clientOrderId=\"1\" status=\"3\" error=\"41\" processedDT=\"2016-03-23T12:52:53.087+03:00\" identification=\"anonymous\" />\r\n"
102
+
103
+ #or equally
104
+ data = api.make_deposition do |request|
105
+ request.dst_account = 410011234567
106
+ request.amount = 10.00
107
+ request.currency = 10643
108
+ request.contract = "Fun stuff"
109
+ request.dst_account = 410011234567
110
+ request.client_order_id = 1
111
+ request.request_dt = Time.now.iso8601
112
+ set_payment_params payment_params
113
+ end
114
+ # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<makeDepositionResponse clientOrderId=\"1\" status=\"3\" error=\"41\" processedDT=\"2016-03-23T12:52:53.087+03:00\" identification=\"anonymous\" />\r\n"
115
+ ```
116
+
117
+ **Balance:**
118
+
119
+ ```ruby
120
+ balance_params = { dst_account: "410011234567", agent_id: "123123",client_order_id: 1 }
121
+ api.balance(balance_params)
122
+ # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<balanceResponse clientOrderId=\"1\" status=\"0\" processedDT=\"2016-03-24T14:15:43.484+03:00\" balance=\"-8320.00\" />\r\n"
123
+ ```
70
124
 
71
125
  ## License
72
126
 
@@ -1,3 +1,3 @@
1
1
  module YandexKassa
2
- VERSION = "0.1.13"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex_kassa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Burdaev