Initial commit
This commit is contained in:
18
app/workers/kyc/local/owner_mobile_worker.rb
Normal file
18
app/workers/kyc/local/owner_mobile_worker.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'sidekiq'
|
||||
module KYC
|
||||
module Local
|
||||
class OwnerMobileWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(mobile_id)
|
||||
mobile = Phone.find_by(id: mobile_id)
|
||||
return unless mobile.user.verified_profile.present?
|
||||
|
||||
jibit = JibitService.new
|
||||
response = jibit.mobile_info(mobile.national_number, mobile.user.verified_profile.national_code)
|
||||
|
||||
mobile.update(step: 'owner_phone') if JSON.parse(response.body).dig('matched').present?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user