Skip to content

Commit cb0ce78

Browse files
authored
Merge pull request #128 from internetee/business-registry-api
Business registry api
2 parents 4ad257f + 0b1b2a7 commit cb0ce78

19 files changed

+203
-77
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/.idea
1010
/eestiInternetiSa
1111
/coverage
12+
.DS_Store
1213

1314
# Ignore all logfiles and tempfiles.
1415
/log/*

Dockerfile.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# EXPOSE 3000
1818

1919

20-
FROM ruby:3.2.0-slim-buster
20+
FROM ruby:3.2.2-slim-buster
2121

2222
ARG RAILS_ENV
2323
ARG SECRET_KEY_BASE

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ end
6161

6262
group :development do
6363
gem 'listen', '~> 3.3'
64-
gem 'spring'
64+
# gem 'spring'
6565
end
6666

6767
group :test do

Gemfile.lock

Lines changed: 64 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ GEM
112112
addressable (2.8.7)
113113
public_suffix (>= 2.0.2, < 7.0)
114114
aes_key_wrap (1.1.0)
115-
airbrussh (1.5.0)
115+
airbrussh (1.5.2)
116116
sshkit (>= 1.6.1, != 1.7.0)
117117
akami (1.3.3)
118118
base64
@@ -126,16 +126,9 @@ GEM
126126
base64 (0.3.0)
127127
bcrypt (3.1.19)
128128
benchmark (0.5.0)
129-
better_html (2.0.2)
130-
actionview (>= 6.0)
131-
activesupport (>= 6.0)
132-
ast (~> 2.0)
133-
erubi (~> 1.4)
134-
parser (>= 2.4)
135-
smart_properties
136129
bigdecimal (3.3.1)
137130
bindata (2.5.0)
138-
bootsnap (1.17.0)
131+
bootsnap (1.18.3)
139132
msgpack (~> 1.2)
140133
brakeman (6.0.1)
141134
builder (3.3.0)
@@ -145,7 +138,7 @@ GEM
145138
bundler (>= 1.2.0, < 3)
146139
thor (~> 1.0)
147140
byebug (11.1.3)
148-
capistrano (3.18.0)
141+
capistrano (3.19.1)
149142
airbrussh (>= 1.0.0)
150143
i18n
151144
rake (>= 10.0.0)
@@ -164,12 +157,13 @@ GEM
164157
connection_pool (2.5.4)
165158
countries (5.7.0)
166159
unaccent (~> 0.3)
167-
crack (0.4.5)
160+
crack (1.0.0)
161+
bigdecimal
168162
rexml
169163
crass (1.0.6)
170164
database_cleaner (2.0.2)
171165
database_cleaner-active_record (>= 2, < 3)
172-
database_cleaner-active_record (2.1.0)
166+
database_cleaner-active_record (2.2.0)
173167
activerecord (>= 5.a)
174168
database_cleaner-core (~> 2.0.0)
175169
database_cleaner-core (2.0.1)
@@ -189,15 +183,16 @@ GEM
189183
concurrent-ruby (~> 1.0)
190184
dry-core (~> 1.0, < 2)
191185
zeitwerk (~> 2.6)
192-
dry-schema (1.13.3)
186+
dry-schema (1.13.4)
193187
concurrent-ruby (~> 1.0)
194188
dry-configurable (~> 1.0, >= 1.0.1)
195189
dry-core (~> 1.0, < 2)
196190
dry-initializer (~> 3.0)
197191
dry-logic (>= 1.4, < 2)
198192
dry-types (>= 1.7, < 2)
199193
zeitwerk (~> 2.6)
200-
dry-types (1.7.1)
194+
dry-types (1.7.2)
195+
bigdecimal (~> 3.0)
201196
concurrent-ruby (~> 1.0)
202197
dry-core (~> 1.0)
203198
dry-inflector (~> 1.0)
@@ -209,14 +204,16 @@ GEM
209204
dry-initializer (~> 3.0)
210205
dry-schema (>= 1.12, < 2)
211206
zeitwerk (~> 2.6)
207+
email_validator (2.2.4)
208+
activemodel
212209
erb (5.0.2)
213210
erubi (1.13.1)
214-
factory_bot (6.2.1)
215-
activesupport (>= 5.0.0)
216-
factory_bot_rails (6.2.0)
217-
factory_bot (~> 6.2.0)
211+
factory_bot (6.5.6)
212+
activesupport (>= 6.1.0)
213+
factory_bot_rails (6.4.3)
214+
factory_bot (~> 6.4)
218215
railties (>= 5.0.0)
219-
faker (3.2.1)
216+
faker (3.4.2)
220217
i18n (>= 1.8.11, < 2)
221218
faraday (2.13.3)
222219
faraday-net_http (>= 2.0, < 3.5)
@@ -234,9 +231,10 @@ GEM
234231
gyoku (1.4.0)
235232
builder (>= 2.1.2)
236233
rexml (~> 3.0)
237-
hashdiff (1.0.1)
234+
hashdiff (1.1.0)
238235
hashie (5.0.0)
239-
highline (2.1.0)
236+
highline (3.1.0)
237+
reline
240238
hotwire-rails (0.1.3)
241239
rails (>= 6.0.0)
242240
stimulus-rails
@@ -248,18 +246,17 @@ GEM
248246
rack (>= 2.0, < 4)
249247
i18n (1.14.7)
250248
concurrent-ruby (~> 1.0)
251-
i18n-tasks (1.0.13)
249+
i18n-tasks (1.0.14)
252250
activesupport (>= 4.0.2)
253251
ast (>= 2.1.0)
254-
better_html (>= 1.0, < 3.0)
255252
erubi
256253
highline (>= 2.0.0)
257254
i18n
258255
parser (>= 3.2.2.1)
259256
rails-i18n
260257
rainbow (>= 2.2.2, < 4.0)
261258
terminal-table (>= 1.5.1)
262-
importmap-rails (1.2.3)
259+
importmap-rails (2.0.1)
263260
actionpack (>= 6.0.0)
264261
activesupport (>= 6.0.0)
265262
railties (>= 6.0.0)
@@ -276,9 +273,10 @@ GEM
276273
bindata
277274
faraday (~> 2.0)
278275
faraday-follow_redirects
279-
jwt (2.7.1)
276+
jwt (2.8.2)
277+
base64
280278
language_server-protocol (3.17.0.3)
281-
listen (3.8.0)
279+
listen (3.9.0)
282280
rb-fsevent (~> 0.10, >= 0.10.3)
283281
rb-inotify (~> 0.9, >= 0.9.10)
284282
logger (1.7.0)
@@ -309,6 +307,8 @@ GEM
309307
timeout
310308
net-scp (4.0.0)
311309
net-ssh (>= 2.6.5, < 8.0.0)
310+
net-sftp (4.0.0)
311+
net-ssh (>= 5.0.0, < 8.0.0)
312312
net-smtp (0.5.1)
313313
net-protocol
314314
net-ssh (7.2.0)
@@ -326,35 +326,36 @@ GEM
326326
hashie (>= 3.4.6)
327327
rack (>= 2.2.3)
328328
rack-protection
329-
omniauth-rails_csrf_protection (1.0.1)
329+
omniauth-rails_csrf_protection (1.0.2)
330330
actionpack (>= 4.2)
331331
omniauth (~> 2.0)
332-
openid_connect (2.2.0)
332+
openid_connect (2.3.0)
333333
activemodel
334334
attr_required (>= 1.0.0)
335+
email_validator
335336
faraday (~> 2.0)
336337
faraday-follow_redirects
337338
json-jwt (>= 1.16)
338-
net-smtp
339+
mail
339340
rack-oauth2 (~> 2.2)
340341
swd (~> 2.0)
341342
tzinfo
342-
validate_email
343343
validate_url
344344
webfinger (~> 2.0)
345345
pagy (9.3.3)
346346
parallel (1.23.0)
347-
parser (3.2.2.4)
347+
parser (3.3.10.0)
348348
ast (~> 2.4.1)
349349
racc
350350
pdfkit (0.8.7.3)
351-
pg (1.5.4)
351+
pg (1.5.6)
352352
pg_search (2.3.6)
353353
activerecord (>= 5.2)
354354
activesupport (>= 5.2)
355355
pp (0.6.2)
356356
prettyprint
357357
prettyprint (0.2.0)
358+
prism (1.6.0)
358359
psych (5.2.6)
359360
date
360361
stringio
@@ -414,7 +415,7 @@ GEM
414415
rainbow (3.1.1)
415416
rake (13.3.0)
416417
rb-fsevent (0.11.2)
417-
rb-inotify (0.10.1)
418+
rb-inotify (0.11.1)
418419
ffi (~> 1.0)
419420
rdoc (6.14.2)
420421
erb
@@ -427,40 +428,42 @@ GEM
427428
reline (0.6.2)
428429
io-console (~> 0.5)
429430
rexml (3.4.4)
430-
rspec-core (3.12.2)
431-
rspec-support (~> 3.12.0)
432-
rspec-expectations (3.12.3)
431+
rspec-core (3.13.6)
432+
rspec-support (~> 3.13.0)
433+
rspec-expectations (3.13.5)
433434
diff-lcs (>= 1.2.0, < 2.0)
434-
rspec-support (~> 3.12.0)
435-
rspec-mocks (3.12.6)
435+
rspec-support (~> 3.13.0)
436+
rspec-mocks (3.13.1)
436437
diff-lcs (>= 1.2.0, < 2.0)
437-
rspec-support (~> 3.12.0)
438-
rspec-rails (6.0.3)
438+
rspec-support (~> 3.13.0)
439+
rspec-rails (6.1.3)
439440
actionpack (>= 6.1)
440441
activesupport (>= 6.1)
441442
railties (>= 6.1)
442-
rspec-core (~> 3.12)
443-
rspec-expectations (~> 3.12)
444-
rspec-mocks (~> 3.12)
445-
rspec-support (~> 3.12)
446-
rspec-support (3.12.1)
447-
rubocop (1.57.2)
443+
rspec-core (~> 3.13)
444+
rspec-expectations (~> 3.13)
445+
rspec-mocks (~> 3.13)
446+
rspec-support (~> 3.13)
447+
rspec-support (3.13.1)
448+
rubocop (1.65.0)
448449
json (~> 2.3)
449450
language_server-protocol (>= 3.17.0)
450451
parallel (~> 1.10)
451-
parser (>= 3.2.2.4)
452+
parser (>= 3.3.0.2)
452453
rainbow (>= 2.2.2, < 4.0)
453-
regexp_parser (>= 1.8, < 3.0)
454+
regexp_parser (>= 2.4, < 3.0)
454455
rexml (>= 3.2.5, < 4.0)
455-
rubocop-ast (>= 1.28.1, < 2.0)
456+
rubocop-ast (>= 1.31.1, < 2.0)
456457
ruby-progressbar (~> 1.7)
457458
unicode-display_width (>= 2.4.0, < 3.0)
458-
rubocop-ast (1.30.0)
459-
parser (>= 3.2.1.0)
460-
rubocop-rails (2.22.1)
459+
rubocop-ast (1.48.0)
460+
parser (>= 3.3.7.2)
461+
prism (~> 1.4)
462+
rubocop-rails (2.25.1)
461463
activesupport (>= 4.2.0)
462464
rack (>= 1.1)
463465
rubocop (>= 1.33.0, < 2.0)
466+
rubocop-ast (>= 1.31.1, < 2.0)
464467
ruby-progressbar (1.13.0)
465468
rubyzip (2.3.2)
466469
savon (2.15.1)
@@ -483,19 +486,19 @@ GEM
483486
simplecov-html (~> 0.10.0)
484487
simplecov-html (0.10.2)
485488
simpleidn (0.2.3)
486-
smart_properties (1.17.0)
487-
spring (4.1.1)
488489
sprockets (4.2.1)
489490
concurrent-ruby (~> 1.0)
490491
rack (>= 2.2.4, < 4)
491-
sprockets-rails (3.4.2)
492-
actionpack (>= 5.2)
493-
activesupport (>= 5.2)
492+
sprockets-rails (3.5.1)
493+
actionpack (>= 6.1)
494+
activesupport (>= 6.1)
494495
sprockets (>= 3.0.0)
495-
sshkit (1.21.5)
496+
sshkit (1.23.0)
497+
base64
496498
net-scp (>= 1.1.2)
499+
net-sftp (>= 2.1.2)
497500
net-ssh (>= 2.8.0)
498-
stimulus-rails (1.3.0)
501+
stimulus-rails (1.3.3)
499502
railties (>= 6.0.0)
500503
stringio (3.1.7)
501504
strong_migrations (1.6.4)
@@ -519,9 +522,6 @@ GEM
519522
unicode-display_width (2.5.0)
520523
uri (1.0.4)
521524
useragent (0.16.11)
522-
validate_email (0.1.6)
523-
activemodel (>= 3.0)
524-
mail (>= 2.2.5)
525525
validate_url (1.0.15)
526526
activemodel (>= 3.0.0)
527527
public_suffix
@@ -533,11 +533,11 @@ GEM
533533
nokogiri (~> 1.6)
534534
rubyzip (>= 1.3.0)
535535
selenium-webdriver (~> 4.0, < 4.11)
536-
webfinger (2.1.2)
536+
webfinger (2.1.3)
537537
activesupport
538538
faraday (~> 2.0)
539539
faraday-follow_redirects
540-
webmock (3.19.1)
540+
webmock (3.23.1)
541541
addressable (>= 2.8.0)
542542
crack (>= 0.3.2)
543543
hashdiff (>= 0.4.0, < 2.0.0)
@@ -604,7 +604,6 @@ DEPENDENCIES
604604
selenium-webdriver
605605
simplecov (= 0.17.1)
606606
simpleidn (= 0.2.3)
607-
spring
608607
sprockets-rails
609608
strong_migrations
610609
tzinfo-data

app/controllers/api/v1/callback_handler/callback_handler_controller.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ class CallbackHandlerController < ApplicationController
3838
def callback
3939
payment_reference = params[:payment_reference]
4040
response = EverypayResponse.call(payment_reference)
41+
42+
puts '===='
43+
p response
44+
puts '===='
45+
4146
result = Notify.call(response: response)
4247

43-
render status: :ok, json: { message: result }
48+
render status: :ok, json: { message: result, user_unique_id: response.dig('linkpay_customer_data', 'custom_field_1') }
4449
end
4550

4651
private
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module Api
2+
module V1
3+
module Invoice
4+
class ReservedDomainCancellationStatusesController < ApplicationController
5+
def update
6+
domain_name = params[:domain_name]
7+
token = params[:token]
8+
9+
@invoices = ::Invoice.where('description LIKE ?', "%Reserved domain name: #{domain_name}, Token: #{token}%")
10+
render json: { message: 'No invoices found' }, status: :not_found and return if @invoices.empty?
11+
12+
@invoices.select(&:cancelled!)
13+
14+
render json: { message: 'All invoices cancelled' }, status: :ok
15+
end
16+
end
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)