leetchi-wallet-services 1.0.0 → 1.1.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 +7 -0
- data/Gemfile +1 -11
- data/Gemfile.lock +27 -18
- data/README.md +3 -3
- data/Rakefile +3 -6
- data/lib/leetchi/beneficiary.rb +0 -1
- data/lib/leetchi/expense.rb +2 -2
- data/lib/leetchi/recurrent_contribution.rb +24 -0
- data/lib/leetchi/ressource.rb +24 -3
- data/lib/leetchi/strong_authentication.rb +13 -0
- data/lib/leetchi/withdrawal.rb +0 -1
- data/lib/leetchi/withdrawal_contribution.rb +32 -0
- data/lib/leetchi-wallet-services.rb +2 -2
- data/spec/cassettes/card.yml +1381 -0
- data/spec/cassettes/contribution.yml +691 -0
- data/spec/cassettes/expense.yml +89 -0
- data/spec/cassettes/operation.yml +89 -0
- data/spec/cassettes/transfer.yml +347 -0
- data/spec/cassettes/user.yml +1262 -0
- data/spec/cassettes/wallet.yml +863 -0
- data/spec/cassettes/withdrawal.yml +433 -0
- data/spec/lib/leetchi/beneficiary_spec.rb +26 -32
- data/spec/lib/leetchi/card_spec.rb +8 -14
- data/spec/lib/leetchi/contribution_spec.rb +11 -17
- data/spec/lib/leetchi/expense_spec.rb +0 -7
- data/spec/lib/leetchi/operation_spec.rb +0 -6
- data/spec/lib/leetchi/recurrent_contribution_spec.rb +48 -41
- data/spec/lib/leetchi/ressource_spec.rb +1 -3
- data/spec/lib/leetchi/strong_authentication_spec.rb +50 -10
- data/spec/lib/leetchi/transfer_spec.rb +9 -14
- data/spec/lib/leetchi/user_spec.rb +27 -34
- data/spec/lib/leetchi/wallet_spec.rb +16 -22
- data/spec/lib/leetchi/withdrawal_contribution_spec.rb +44 -0
- data/spec/lib/leetchi/withdrawal_spec.rb +13 -19
- data/spec/spec_helper.rb +60 -24
- data/spec/support-files/test_upload.gif +0 -0
- data/spec/support-files/test_upload.jpg +0 -0
- data/spec/support-files/test_upload.pdf +0 -0
- data/spec/support-files/test_upload.png +0 -0
- metadata +150 -170
- data/spec/fixtures/leetchi_cassettes/beneficiary.yml +0 -40500
- data/spec/fixtures/leetchi_cassettes/card.yml +0 -15985
- data/spec/fixtures/leetchi_cassettes/contribution.yml +0 -35737
- data/spec/fixtures/leetchi_cassettes/expense-site.yml +0 -45
- data/spec/fixtures/leetchi_cassettes/expense.yml +0 -495
- data/spec/fixtures/leetchi_cassettes/operation.yml +0 -495
- data/spec/fixtures/leetchi_cassettes/recurrent_contribution.yml +0 -2060
- data/spec/fixtures/leetchi_cassettes/strong_authentication.yml +0 -577
- data/spec/fixtures/leetchi_cassettes/transfer.yml +0 -31387
- data/spec/fixtures/leetchi_cassettes/user.yml +0 -44428
- data/spec/fixtures/leetchi_cassettes/wallet.yml +0 -35099
- data/spec/fixtures/leetchi_cassettes/withdrawal.yml +0 -20722
@@ -0,0 +1,433 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/users?ts=1363949089
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"Tag":"test","Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true}'
|
9
|
+
headers:
|
10
|
+
X-Leetchi-Signature:
|
11
|
+
- Hq02T80O3aJwjbi+G16ry0mhlQFL7WctoYesWPJWr7GK4Wl2M/VgyWbUEuJWh3+uat4p+niv/LKhajPOYFARz0/mfWsEOI3yBJPWl3lNV5EgjYflbycq/Y6OBwXll7A5Wfekz3RPj2YbL2PCdwEXlZacWMLBEpEKM6Je5Y9fQ8FSGpj3Dojm20B+bjtFBf+T79NCPs7Fe1Mv2wvZYS6L5/pXq55alJLUbpaSIPJP/Jc9TDizKrcmEQlhpYsAGNY+RaYIa9v40kIw4TDp7sUGvOMqAumOxnWMRke6kIiHIAvdEiOpdBSNTfx6L/PwuG2VMugrQBD1SqQZNhxNIXPnXg==
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
26
|
+
- private
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Server:
|
30
|
+
- Microsoft-IIS/8.0
|
31
|
+
X-Aspnetmvc-Version:
|
32
|
+
- '2.0'
|
33
|
+
X-Aspnet-Version:
|
34
|
+
- 4.0.30319
|
35
|
+
X-Powered-By:
|
36
|
+
- ASP.NET
|
37
|
+
Date:
|
38
|
+
- Fri, 22 Mar 2013 10:44:49 GMT
|
39
|
+
Content-Length:
|
40
|
+
- '365'
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true,"HasRegisteredMeansOfPayment":false,"IP":null,"Birthday":null,"Password":"EyPvWZVSMqteqd8Y6vMwK7AMJhOdSg","PersonalWalletAmount":0,"IsStrongAuthenticated":false,"Nationality":null,"PersonType":null,"ID":226625,"Tag":"test","CreationDate":1363949088,"UpdateDate":1363949088}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Fri, 22 Mar 2013 10:44:49 GMT
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/contributions?ts=1363949089
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"Tag":"test_contribution","UserID":226625,"WalletID":0,"Amount":10000,"ReturnURL":"https://leetchi.com","BankAccountBIC":"AGRIFRPP879"}'
|
52
|
+
headers:
|
53
|
+
X-Leetchi-Signature:
|
54
|
+
- LGngMf5xcTJ0yr2QCxgxXS5ZZ9a1iTRZL0cXf0QGGUz5/2Zj4TLTB5nCVbqGitCxSV1ndE7s1gpubFNaeNuNfHn3mqFDjOIxaEH4/xd+2vApuC0jOCrmx6cU9PCwByBcF48HRLd0KZ2FkTNTpVQGZoic6cGJ3jaeaae4M1tGwlfn5n+9dZcG8qsgf325ezWD+JhC4BkAediQsa3ZZvJMwc1+DJ3AZSC9CY0btVt+WabAL8S1agw2mM4N5pDe+xuewwvSxV7j9E+49mG4Ksq/AeG1f6Zz6YxtJ9dq/Q7P2GBMljjJQZOpjjr/QPMKRM2V/UIQDWFYqsoCho/clrSi/A==
|
55
|
+
Content-Type:
|
56
|
+
- application/json
|
57
|
+
Accept-Encoding:
|
58
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
59
|
+
Accept:
|
60
|
+
- '*/*'
|
61
|
+
User-Agent:
|
62
|
+
- Ruby
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 200
|
66
|
+
message: OK
|
67
|
+
headers:
|
68
|
+
Cache-Control:
|
69
|
+
- private
|
70
|
+
Content-Type:
|
71
|
+
- application/json; charset=utf-8
|
72
|
+
Server:
|
73
|
+
- Microsoft-IIS/8.0
|
74
|
+
X-Aspnetmvc-Version:
|
75
|
+
- '2.0'
|
76
|
+
X-Aspnet-Version:
|
77
|
+
- 4.0.30319
|
78
|
+
X-Powered-By:
|
79
|
+
- ASP.NET
|
80
|
+
Date:
|
81
|
+
- Fri, 22 Mar 2013 10:44:50 GMT
|
82
|
+
Content-Length:
|
83
|
+
- '601'
|
84
|
+
body:
|
85
|
+
encoding: UTF-8
|
86
|
+
string: '{"UserID":226625,"WalletID":0,"Amount":10000,"ClientFeeAmount":0,"LeetchiFeeAmount":0,"IsSucceeded":false,"IsCompleted":false,"PaymentURL":"https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=1HZ3nNJd4RhFsYuX3fdR1363949089613","TemplateURL":null,"ReturnURL":"https://leetchi.com/?ContributionID=226626","RegisterMeanOfPayment":false,"Error":null,"PaymentCardID":0,"Culture":"fr","Type":"Payline","PaymentMethodType":"cb_visa_mastercard","AnswerCode":null,"AnswerMessage":null,"ID":226626,"Tag":"test_contribution","CreationDate":1363949089,"UpdateDate":1363949090}'
|
87
|
+
http_version:
|
88
|
+
recorded_at: Fri, 22 Mar 2013 10:44:51 GMT
|
89
|
+
- request:
|
90
|
+
method: post
|
91
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/users?ts=1363949091
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"Tag":"test","Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true}'
|
95
|
+
headers:
|
96
|
+
X-Leetchi-Signature:
|
97
|
+
- KVRl+JtorPDMV4MRErrl3awpD1fJuP1kijUisG4F90vQVn9xLIqhNJVkJxTsuIkClaeeWn5NLxrOR6ilDF/EHdwWlsp25DMiH8GAGPczzqjRh4ahZop3SaKNrEGLpMQ0+CRrCRVhI9WYnnJgbG6F9m12Cwj4mBELyv6+5IxXlbC8TYXp5P2zQtlfJk17N4ap2PWSbaLvUMyJKHqv3Fd/D6yrWpOPGfIUie8YCty25CuJpdaRh7t6JlK75uxWrz8+m5Ja7JQ/Ho1EHAkB4kYwDa4zPecjoupo3RQgoDFYBuQODiJ57imgyRUJLVMlWC9r0Jf/wObApdBV3UZiDIM/jA==
|
98
|
+
Content-Type:
|
99
|
+
- application/json
|
100
|
+
Accept-Encoding:
|
101
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
102
|
+
Accept:
|
103
|
+
- '*/*'
|
104
|
+
User-Agent:
|
105
|
+
- Ruby
|
106
|
+
response:
|
107
|
+
status:
|
108
|
+
code: 200
|
109
|
+
message: OK
|
110
|
+
headers:
|
111
|
+
Cache-Control:
|
112
|
+
- private
|
113
|
+
Content-Type:
|
114
|
+
- application/json; charset=utf-8
|
115
|
+
Server:
|
116
|
+
- Microsoft-IIS/8.0
|
117
|
+
X-Aspnetmvc-Version:
|
118
|
+
- '2.0'
|
119
|
+
X-Aspnet-Version:
|
120
|
+
- 4.0.30319
|
121
|
+
X-Powered-By:
|
122
|
+
- ASP.NET
|
123
|
+
Date:
|
124
|
+
- Fri, 22 Mar 2013 10:44:50 GMT
|
125
|
+
Content-Length:
|
126
|
+
- '365'
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true,"HasRegisteredMeansOfPayment":false,"IP":null,"Birthday":null,"Password":"nUpBykrANxZ3fru9pO97ke9hXH8dWP","PersonalWalletAmount":0,"IsStrongAuthenticated":false,"Nationality":null,"PersonType":null,"ID":226627,"Tag":"test","CreationDate":1363949090,"UpdateDate":1363949090}'
|
130
|
+
http_version:
|
131
|
+
recorded_at: Fri, 22 Mar 2013 10:44:51 GMT
|
132
|
+
- request:
|
133
|
+
method: post
|
134
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/contributions?ts=1363949091
|
135
|
+
body:
|
136
|
+
encoding: UTF-8
|
137
|
+
string: '{"Tag":"test_contribution","UserID":226627,"WalletID":0,"Amount":10000,"ReturnURL":"https://leetchi.com","BankAccountBIC":"AGRIFRPP879"}'
|
138
|
+
headers:
|
139
|
+
X-Leetchi-Signature:
|
140
|
+
- XhIQEJi2DMbjh6t7aR5o+lN5pYb8O7KNqBh4d7miKE/icHxfOmgfh1zmu22zvrMPj5llDIIFzweN0px78FtzBYJs4vsEfrcHSP9QpSa14G3Juu+NIzw+VySW6DWil+0CdIpWV+6GUkmFJYE88qhYmAADDjTChVVFOz4EsX6gNJ8wVWJUrCESJ+YB8Rv/woZOKlBtTRkwtM3r2/t3qV0v4bqu4qBZHcQbUPOPhZp4CtgUqxkL45qim0vCE4KEv/rctHXSi7+p/z66qpoiE0Phmu/ME7pO7R/NOao60QZFnFXMidgx7vFTdFe24HKoaVQrYKm/mVoUwljXWjFZyKshkw==
|
141
|
+
Content-Type:
|
142
|
+
- application/json
|
143
|
+
Accept-Encoding:
|
144
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
145
|
+
Accept:
|
146
|
+
- '*/*'
|
147
|
+
User-Agent:
|
148
|
+
- Ruby
|
149
|
+
response:
|
150
|
+
status:
|
151
|
+
code: 200
|
152
|
+
message: OK
|
153
|
+
headers:
|
154
|
+
Cache-Control:
|
155
|
+
- private
|
156
|
+
Content-Type:
|
157
|
+
- application/json; charset=utf-8
|
158
|
+
Server:
|
159
|
+
- Microsoft-IIS/8.0
|
160
|
+
X-Aspnetmvc-Version:
|
161
|
+
- '2.0'
|
162
|
+
X-Aspnet-Version:
|
163
|
+
- 4.0.30319
|
164
|
+
X-Powered-By:
|
165
|
+
- ASP.NET
|
166
|
+
Date:
|
167
|
+
- Fri, 22 Mar 2013 10:44:55 GMT
|
168
|
+
Content-Length:
|
169
|
+
- '601'
|
170
|
+
body:
|
171
|
+
encoding: UTF-8
|
172
|
+
string: '{"UserID":226627,"WalletID":0,"Amount":10000,"ClientFeeAmount":0,"LeetchiFeeAmount":0,"IsSucceeded":false,"IsCompleted":false,"PaymentURL":"https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=1msFzJ7uXQg6ORu5PcNs1363949094896","TemplateURL":null,"ReturnURL":"https://leetchi.com/?ContributionID=226628","RegisterMeanOfPayment":false,"Error":null,"PaymentCardID":0,"Culture":"fr","Type":"Payline","PaymentMethodType":"cb_visa_mastercard","AnswerCode":null,"AnswerMessage":null,"ID":226628,"Tag":"test_contribution","CreationDate":1363949091,"UpdateDate":1363949095}'
|
173
|
+
http_version:
|
174
|
+
recorded_at: Fri, 22 Mar 2013 10:44:56 GMT
|
175
|
+
- request:
|
176
|
+
method: post
|
177
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/users?ts=1363949096
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: '{"Tag":"test","Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true}'
|
181
|
+
headers:
|
182
|
+
X-Leetchi-Signature:
|
183
|
+
- QdX8o7XhWQpgexItd9z16OgQ2/4Ei0BSIGQdUl8YM5GAbjTL4GjPxXWrP9jqPrfhTkxDlC3rAQFaSxq9B3qewPlQOwlIzCxSlLuQWvNi/I70FYh+CgP1OJAK5jpnwlI4hQ9YcYKDtDV7tYfC57hmYhjhItzL8lzqPArldCSJirJrU9K+BD0pm+giev40w/KlPMFPtOH03AcfJphBbIC6DnCKKABpiEmM69C7LayVAHm5/ZaHccS5arfIxrmcJ8J1QIYeV7p+7POx65Ymq43WTAKSTXFMW0lI53ami3f8ZpNnrRBb156qERuD1vbrveToTrZamWTbj3ZxBW3PRIiIRg==
|
184
|
+
Content-Type:
|
185
|
+
- application/json
|
186
|
+
Accept-Encoding:
|
187
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
188
|
+
Accept:
|
189
|
+
- '*/*'
|
190
|
+
User-Agent:
|
191
|
+
- Ruby
|
192
|
+
response:
|
193
|
+
status:
|
194
|
+
code: 200
|
195
|
+
message: OK
|
196
|
+
headers:
|
197
|
+
Cache-Control:
|
198
|
+
- private
|
199
|
+
Content-Type:
|
200
|
+
- application/json; charset=utf-8
|
201
|
+
Server:
|
202
|
+
- Microsoft-IIS/8.0
|
203
|
+
X-Aspnetmvc-Version:
|
204
|
+
- '2.0'
|
205
|
+
X-Aspnet-Version:
|
206
|
+
- 4.0.30319
|
207
|
+
X-Powered-By:
|
208
|
+
- ASP.NET
|
209
|
+
Date:
|
210
|
+
- Fri, 22 Mar 2013 10:44:55 GMT
|
211
|
+
Content-Length:
|
212
|
+
- '365'
|
213
|
+
body:
|
214
|
+
encoding: UTF-8
|
215
|
+
string: '{"Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true,"HasRegisteredMeansOfPayment":false,"IP":null,"Birthday":null,"Password":"kS9EcJ0YQYGGSpGR2isK29dV5iVhP0","PersonalWalletAmount":0,"IsStrongAuthenticated":false,"Nationality":null,"PersonType":null,"ID":226629,"Tag":"test","CreationDate":1363949095,"UpdateDate":1363949095}'
|
216
|
+
http_version:
|
217
|
+
recorded_at: Fri, 22 Mar 2013 10:44:56 GMT
|
218
|
+
- request:
|
219
|
+
method: post
|
220
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/contributions?ts=1363949096
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: '{"Tag":"test_contribution","UserID":226629,"WalletID":0,"Amount":10000,"ReturnURL":"https://leetchi.com","BankAccountBIC":"AGRIFRPP879"}'
|
224
|
+
headers:
|
225
|
+
X-Leetchi-Signature:
|
226
|
+
- mbRgM++3aHmOSVcGbqOwvZIurhyLYK4bDNXRYAqOGSSPbY3N6A8uVWBHbBXNZC7O7u/8+YWaEaWz/UZeGBQYTBApW1UaLtCp3XX7M3R5cnQZcUoQ6SKmfBXZTp1jQ8gZ2WqjcCJGx+O7xuKGGI5WuxdIGkIWy4hhwI0AhIw7YbUNE/2Hk0l1WG9HmE01GNhNOg2++lLYpMXkjbDLqWX6kaKTIrlPC3ebc3uf4Iw8Jd/LyN1sk96Dm8HlqAT7hMQii0BKnzT84WvHUJ/rL2pxBOZA4ej2LDZNnGNg+WoVmVrmxnIjPNIYmoaVM0adpHmO/FqppULvPAxIL0H5zoFhAw==
|
227
|
+
Content-Type:
|
228
|
+
- application/json
|
229
|
+
Accept-Encoding:
|
230
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
231
|
+
Accept:
|
232
|
+
- '*/*'
|
233
|
+
User-Agent:
|
234
|
+
- Ruby
|
235
|
+
response:
|
236
|
+
status:
|
237
|
+
code: 200
|
238
|
+
message: OK
|
239
|
+
headers:
|
240
|
+
Cache-Control:
|
241
|
+
- private
|
242
|
+
Content-Type:
|
243
|
+
- application/json; charset=utf-8
|
244
|
+
Server:
|
245
|
+
- Microsoft-IIS/8.0
|
246
|
+
X-Aspnetmvc-Version:
|
247
|
+
- '2.0'
|
248
|
+
X-Aspnet-Version:
|
249
|
+
- 4.0.30319
|
250
|
+
X-Powered-By:
|
251
|
+
- ASP.NET
|
252
|
+
Date:
|
253
|
+
- Fri, 22 Mar 2013 10:44:57 GMT
|
254
|
+
Content-Length:
|
255
|
+
- '601'
|
256
|
+
body:
|
257
|
+
encoding: UTF-8
|
258
|
+
string: '{"UserID":226629,"WalletID":0,"Amount":10000,"ClientFeeAmount":0,"LeetchiFeeAmount":0,"IsSucceeded":false,"IsCompleted":false,"PaymentURL":"https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=1qFdRcZd0UnO4lGwu5xZ1363949096921","TemplateURL":null,"ReturnURL":"https://leetchi.com/?ContributionID=226630","RegisterMeanOfPayment":false,"Error":null,"PaymentCardID":0,"Culture":"fr","Type":"Payline","PaymentMethodType":"cb_visa_mastercard","AnswerCode":null,"AnswerMessage":null,"ID":226630,"Tag":"test_contribution","CreationDate":1363949096,"UpdateDate":1363949097}'
|
259
|
+
http_version:
|
260
|
+
recorded_at: Fri, 22 Mar 2013 10:44:58 GMT
|
261
|
+
- request:
|
262
|
+
method: post
|
263
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/users?ts=1363949098
|
264
|
+
body:
|
265
|
+
encoding: UTF-8
|
266
|
+
string: '{"Tag":"test","Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true}'
|
267
|
+
headers:
|
268
|
+
X-Leetchi-Signature:
|
269
|
+
- F9BVb4XBGGmq/EuRwmOSN+fvvGorFqOQfT4d9OofPFH5iFghVPc8w4LfchpB/RFwjP8REDwFp0zTLLneJEYfNaNpzvUjBvwhkYneOfPCv5tzGOcSC5yr26cYmx48NGJRkRGBFFLuPiq79YCWDr5Q/FSeUwx63dmMKyDkuCZ/0ko0ql5keocsiBHQeWCx17ZEMgTqaW6VRh8GuoGFloltckwG63Wh9yE5IPRL8yOGtc+SWFsR2kX3FPATxzbQQfUbWgOKRNMJTiZBM2Gzg3xudyOsuVbXaPDimjAqysMq5cqGIt3UXqG9C+luumT3YVCl/OCLRmVj+qe+OY0DO9CzHQ==
|
270
|
+
Content-Type:
|
271
|
+
- application/json
|
272
|
+
Accept-Encoding:
|
273
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
274
|
+
Accept:
|
275
|
+
- '*/*'
|
276
|
+
User-Agent:
|
277
|
+
- Ruby
|
278
|
+
response:
|
279
|
+
status:
|
280
|
+
code: 200
|
281
|
+
message: OK
|
282
|
+
headers:
|
283
|
+
Cache-Control:
|
284
|
+
- private
|
285
|
+
Content-Type:
|
286
|
+
- application/json; charset=utf-8
|
287
|
+
Server:
|
288
|
+
- Microsoft-IIS/8.0
|
289
|
+
X-Aspnetmvc-Version:
|
290
|
+
- '2.0'
|
291
|
+
X-Aspnet-Version:
|
292
|
+
- 4.0.30319
|
293
|
+
X-Powered-By:
|
294
|
+
- ASP.NET
|
295
|
+
Date:
|
296
|
+
- Fri, 22 Mar 2013 10:44:57 GMT
|
297
|
+
Content-Length:
|
298
|
+
- '365'
|
299
|
+
body:
|
300
|
+
encoding: UTF-8
|
301
|
+
string: '{"Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true,"HasRegisteredMeansOfPayment":false,"IP":null,"Birthday":null,"Password":"moO8mh4LpVjA7mAPwVLfQ0WnWmOoJ3","PersonalWalletAmount":0,"IsStrongAuthenticated":false,"Nationality":null,"PersonType":null,"ID":226631,"Tag":"test","CreationDate":1363949097,"UpdateDate":1363949097}'
|
302
|
+
http_version:
|
303
|
+
recorded_at: Fri, 22 Mar 2013 10:44:59 GMT
|
304
|
+
- request:
|
305
|
+
method: post
|
306
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/contributions?ts=1363949099
|
307
|
+
body:
|
308
|
+
encoding: UTF-8
|
309
|
+
string: '{"Tag":"test_contribution","UserID":226631,"WalletID":0,"Amount":10000,"ReturnURL":"https://leetchi.com","BankAccountBIC":"AGRIFRPP879"}'
|
310
|
+
headers:
|
311
|
+
X-Leetchi-Signature:
|
312
|
+
- dbV7+/Zopfsz/9idkVZ3DyA/rUsNm9ZG9xS2jb+Qd/AcRVj1gSPYzsdk7S763h0gumar4cFX0XgfSMhS8kwBXqfj2nxvWzzgJGp3HCptjFX1g7YeBBUWebj2n3WS51oKpuVZ2QQC1kVJdR3RzbTLBpDSZq/m+0bhxqiO3UdWDzmX9E0LBUH7Og25qctkxa8ddiIlC8GyVOrN65tYEC64KDhz5TJvNlVUhQvV6DvoXfQwlZCwZikKLcG3VEaGsQR0iUQgoM9KVK4KZBFoHPCpVN71LPbBGvQLFPx0TA5RxCooQzot2nCbzBJhPalmdrsZLV16rn8brR2uQAXCVbC11A==
|
313
|
+
Content-Type:
|
314
|
+
- application/json
|
315
|
+
Accept-Encoding:
|
316
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
317
|
+
Accept:
|
318
|
+
- '*/*'
|
319
|
+
User-Agent:
|
320
|
+
- Ruby
|
321
|
+
response:
|
322
|
+
status:
|
323
|
+
code: 200
|
324
|
+
message: OK
|
325
|
+
headers:
|
326
|
+
Cache-Control:
|
327
|
+
- private
|
328
|
+
Content-Type:
|
329
|
+
- application/json; charset=utf-8
|
330
|
+
Server:
|
331
|
+
- Microsoft-IIS/8.0
|
332
|
+
X-Aspnetmvc-Version:
|
333
|
+
- '2.0'
|
334
|
+
X-Aspnet-Version:
|
335
|
+
- 4.0.30319
|
336
|
+
X-Powered-By:
|
337
|
+
- ASP.NET
|
338
|
+
Date:
|
339
|
+
- Fri, 22 Mar 2013 10:44:59 GMT
|
340
|
+
Content-Length:
|
341
|
+
- '601'
|
342
|
+
body:
|
343
|
+
encoding: UTF-8
|
344
|
+
string: '{"UserID":226631,"WalletID":0,"Amount":10000,"ClientFeeAmount":0,"LeetchiFeeAmount":0,"IsSucceeded":false,"IsCompleted":false,"PaymentURL":"https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=12E09GbETIKjUQWvsbM11363949098914","TemplateURL":null,"ReturnURL":"https://leetchi.com/?ContributionID=226632","RegisterMeanOfPayment":false,"Error":null,"PaymentCardID":0,"Culture":"fr","Type":"Payline","PaymentMethodType":"cb_visa_mastercard","AnswerCode":null,"AnswerMessage":null,"ID":226632,"Tag":"test_contribution","CreationDate":1363949098,"UpdateDate":1363949099}'
|
345
|
+
http_version:
|
346
|
+
recorded_at: Fri, 22 Mar 2013 10:45:00 GMT
|
347
|
+
- request:
|
348
|
+
method: post
|
349
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/users?ts=1363949100
|
350
|
+
body:
|
351
|
+
encoding: UTF-8
|
352
|
+
string: '{"Tag":"test","Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true}'
|
353
|
+
headers:
|
354
|
+
X-Leetchi-Signature:
|
355
|
+
- Cet19zYSED6A5/ueVM5LfJyGaQ6201PPgtz2UEihfuPNP8Q34dNe6eU1RlR9bffIo6oYRsWuQC25vwFjWFeeandhh8ocVmS1yH8C0EndowKceRVdqOkl4+HTuCQ82C4QPupertt2VAXhDYc8e4JyMn5CocB1EXH0355ouT7gd5Q/qfYHrCw3uUFR6U3+L+C8uP3SkcDUaeG4m56eszCT1dT1Equ1BzQn/S2NoKStX+s1tMRbsYn8EWz25wkaeFYkyWKwRxn48cZAM4aBsgLCjgpNhB7vr261FV3GIvmVJ0rE0FYD9t4lCvucHKLlDt4zoTtoF8ylQQ9CJSYZ7RRNIg==
|
356
|
+
Content-Type:
|
357
|
+
- application/json
|
358
|
+
Accept-Encoding:
|
359
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
360
|
+
Accept:
|
361
|
+
- '*/*'
|
362
|
+
User-Agent:
|
363
|
+
- Ruby
|
364
|
+
response:
|
365
|
+
status:
|
366
|
+
code: 200
|
367
|
+
message: OK
|
368
|
+
headers:
|
369
|
+
Cache-Control:
|
370
|
+
- private
|
371
|
+
Content-Type:
|
372
|
+
- application/json; charset=utf-8
|
373
|
+
Server:
|
374
|
+
- Microsoft-IIS/8.0
|
375
|
+
X-Aspnetmvc-Version:
|
376
|
+
- '2.0'
|
377
|
+
X-Aspnet-Version:
|
378
|
+
- 4.0.30319
|
379
|
+
X-Powered-By:
|
380
|
+
- ASP.NET
|
381
|
+
Date:
|
382
|
+
- Fri, 22 Mar 2013 10:45:00 GMT
|
383
|
+
Content-Length:
|
384
|
+
- '365'
|
385
|
+
body:
|
386
|
+
encoding: UTF-8
|
387
|
+
string: '{"Email":"my@email.com","FirstName":"John","LastName":"Doe","CanRegisterMeanOfPayment":true,"HasRegisteredMeansOfPayment":false,"IP":null,"Birthday":null,"Password":"YSjZNt3UcyWs3GABb2vrWaGJkvCBma","PersonalWalletAmount":0,"IsStrongAuthenticated":false,"Nationality":null,"PersonType":null,"ID":226633,"Tag":"test","CreationDate":1363949100,"UpdateDate":1363949100}'
|
388
|
+
http_version:
|
389
|
+
recorded_at: Fri, 22 Mar 2013 10:45:01 GMT
|
390
|
+
- request:
|
391
|
+
method: post
|
392
|
+
uri: https://api-preprod.leetchi.com/v1/partner/example/contributions?ts=1363949101
|
393
|
+
body:
|
394
|
+
encoding: UTF-8
|
395
|
+
string: '{"Tag":"test_contribution","UserID":226633,"WalletID":0,"Amount":10000,"ReturnURL":"https://leetchi.com","BankAccountBIC":"AGRIFRPP879"}'
|
396
|
+
headers:
|
397
|
+
X-Leetchi-Signature:
|
398
|
+
- ly21UUTUbQnvLBSZAjGja05Kmocx6w91tC3VdQYXgSbjq3Dhf8/0ASScf/RZobLxn5th8wJCtPq4ufdeL7CjzTYrLoZL6gJusPCkE3iO0V3KgruIUDkgAnUxPAv62eWOqEqVp+uE0TrvUr1IeOmt1S/ADftf5w4PIuMNkBrTEXqaFN1gWvpUaQIJRDvV3rVmnQsIHZecvtBwYUta6zn5V19mfeT7KlObRzGbXGsfa8/++1nzTX9v1mabnn9ubM6Cm+A5m9VXr7qTVBpnaJTpbVHlKLVu06yyTUSF59kBE5keyK12wCfJQnLlDHj/cyZFsMq6GJJ13ffy6SjMHP3c4w==
|
399
|
+
Content-Type:
|
400
|
+
- application/json
|
401
|
+
Accept-Encoding:
|
402
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
403
|
+
Accept:
|
404
|
+
- '*/*'
|
405
|
+
User-Agent:
|
406
|
+
- Ruby
|
407
|
+
response:
|
408
|
+
status:
|
409
|
+
code: 200
|
410
|
+
message: OK
|
411
|
+
headers:
|
412
|
+
Cache-Control:
|
413
|
+
- private
|
414
|
+
Content-Type:
|
415
|
+
- application/json; charset=utf-8
|
416
|
+
Server:
|
417
|
+
- Microsoft-IIS/8.0
|
418
|
+
X-Aspnetmvc-Version:
|
419
|
+
- '2.0'
|
420
|
+
X-Aspnet-Version:
|
421
|
+
- 4.0.30319
|
422
|
+
X-Powered-By:
|
423
|
+
- ASP.NET
|
424
|
+
Date:
|
425
|
+
- Fri, 22 Mar 2013 10:45:01 GMT
|
426
|
+
Content-Length:
|
427
|
+
- '601'
|
428
|
+
body:
|
429
|
+
encoding: UTF-8
|
430
|
+
string: '{"UserID":226633,"WalletID":0,"Amount":10000,"ClientFeeAmount":0,"LeetchiFeeAmount":0,"IsSucceeded":false,"IsCompleted":false,"PaymentURL":"https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=1M2nFy0Fiod8Wblw7Ras1363949101124","TemplateURL":null,"ReturnURL":"https://leetchi.com/?ContributionID=226634","RegisterMeanOfPayment":false,"Error":null,"PaymentCardID":0,"Culture":"fr","Type":"Payline","PaymentMethodType":"cb_visa_mastercard","AnswerCode":null,"AnswerMessage":null,"ID":226634,"Tag":"test_contribution","CreationDate":1363949100,"UpdateDate":1363949101}'
|
431
|
+
http_version:
|
432
|
+
recorded_at: Fri, 22 Mar 2013 10:45:02 GMT
|
433
|
+
recorded_with: VCR 2.4.0
|
@@ -29,17 +29,11 @@ describe Leetchi::Beneficiary do
|
|
29
29
|
})
|
30
30
|
}
|
31
31
|
|
32
|
-
before do
|
33
|
-
VCR.insert_cassette 'beneficiary', :record => :new_episodes
|
34
|
-
end
|
35
|
-
after do
|
36
|
-
VCR.eject_cassette
|
37
|
-
end
|
38
|
-
|
39
32
|
describe "CREATE" do
|
33
|
+
|
40
34
|
it "create a beneficiary" do
|
41
|
-
new_beneficiary['ID'].
|
42
|
-
new_beneficiary['UserID'].
|
35
|
+
expect(new_beneficiary['ID']).not_to be_nil
|
36
|
+
expect(new_beneficiary['UserID']).to eq(new_user['ID'])
|
43
37
|
end
|
44
38
|
|
45
39
|
it "fails and returns a 2004 error code" do
|
@@ -50,7 +44,7 @@ describe Leetchi::Beneficiary do
|
|
50
44
|
'BankAccountIBAN' => 'FR76 1790 6000 3200 0833 5232 973',
|
51
45
|
'BankAccountBIC' => 'AGRIFRPP879'
|
52
46
|
})
|
53
|
-
fail_beneficiary["ErrorCode"].
|
47
|
+
expect(fail_beneficiary["ErrorCode"]).to eq(2004)
|
54
48
|
end
|
55
49
|
|
56
50
|
it "fails and returns a 2005 error code" do
|
@@ -61,7 +55,7 @@ describe Leetchi::Beneficiary do
|
|
61
55
|
'BankAccountIBAN' => 'FR76 1790 6000 3200 0833 5232 973',
|
62
56
|
'BankAccountBIC' => 'AGRIFRPP879'
|
63
57
|
})
|
64
|
-
fail_beneficiary["ErrorCode"].
|
58
|
+
expect(fail_beneficiary["ErrorCode"]).to eq(2005)
|
65
59
|
end
|
66
60
|
|
67
61
|
it "fail and returns a 2006 error code" do
|
@@ -73,7 +67,7 @@ describe Leetchi::Beneficiary do
|
|
73
67
|
'BankAccountIBAN' => 'FR76 1790 6000 3200 0833 5232 973',
|
74
68
|
'BankAccountBIC' => 'RPPdsakdnsajkdna79'
|
75
69
|
})
|
76
|
-
fail_beneficiary["ErrorCode"].
|
70
|
+
expect(fail_beneficiary["ErrorCode"]).to eq(2006)
|
77
71
|
end
|
78
72
|
|
79
73
|
it "fail and returns a 2007 error code" do
|
@@ -85,7 +79,7 @@ describe Leetchi::Beneficiary do
|
|
85
79
|
'BankAccountIBAN' => 'OIJDSAOIJDSAOIDJSAOIJDSA',
|
86
80
|
'BankAccountBIC' => 'AGRIFRPP879'
|
87
81
|
})
|
88
|
-
fail_beneficiary["ErrorCode"].
|
82
|
+
expect(fail_beneficiary["ErrorCode"]).to eq(2007)
|
89
83
|
end
|
90
84
|
|
91
85
|
it "fail and returns a 2008 error code" do
|
@@ -97,34 +91,34 @@ describe Leetchi::Beneficiary do
|
|
97
91
|
'BankAccountIBAN' => 'GB87 BARC 2065 8244 9716 55',
|
98
92
|
'BankAccountBIC' => 'CRLYFRPP'
|
99
93
|
})
|
100
|
-
fail_beneficiary["ErrorCode"].
|
94
|
+
expect(fail_beneficiary["ErrorCode"]).to eq(2008)
|
101
95
|
end
|
102
96
|
end
|
103
97
|
|
104
98
|
describe "GET" do
|
105
99
|
it "it gets a beneficiary" do
|
106
100
|
beneficiary = Leetchi::Beneficiary.details(new_beneficiary["ID"])
|
107
|
-
beneficiary["ID"].
|
101
|
+
expect(beneficiary["ID"]).to eq(new_beneficiary['ID'])
|
108
102
|
end
|
109
103
|
end
|
110
104
|
|
111
105
|
describe "StrongAuthentication" do
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
106
|
+
it "creates the beneficiary strong authentication request" do
|
107
|
+
expect(new_strong_authentication).not_to be_nil
|
108
|
+
expect(new_strong_authentication['BeneficiaryID']).to eq(new_beneficiary['ID'])
|
109
|
+
end
|
110
|
+
it "gets the beneficiary strong authentication request" do
|
111
|
+
strong_authentication = Leetchi::Beneficiary.get_strong_authentication(new_strong_authentication['BeneficiaryID'])
|
112
|
+
expect(strong_authentication['ID']).to eq(new_strong_authentication['ID'])
|
113
|
+
end
|
114
|
+
it "updated the beneficiary strong authentication request" do
|
115
|
+
strong_authentication = Leetchi::Beneficiary.update_strong_authentication(new_strong_authentication['BeneficiaryID'], {
|
116
|
+
'Tag' => 'test_beneficiary_strong_authentication2',
|
117
|
+
'IsDocumentsTransmitted' => true
|
118
|
+
})
|
119
|
+
expect(strong_authentication['ID']).to eq(new_strong_authentication['ID'])
|
120
|
+
expect(strong_authentication['Tag']).to eq('test_beneficiary_strong_authentication2')
|
121
|
+
expect(strong_authentication['IsDocumentsTransmitted']).to be_true
|
122
|
+
end
|
128
123
|
end
|
129
124
|
end
|
130
|
-
end
|