Skip to content

Commit

Permalink
added everypay params
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Mar 18, 2024
1 parent 3db8895 commit 599dac2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def perform(pending_action)
next if v['contact']['_destroy'] == 'true'

contact = Contact.find_by(ident: v['contact']['ident'])

if contact.nil?
contacts_what_not_exists << v
elsif contact.code.blank?
Expand Down Expand Up @@ -81,7 +82,7 @@ def create_contact(contact)
end

after_perform do |job|
EstonianTld::DomainCreationProcess::CreateDomainJob.perform_later(@pending_action)
EstonianTld::DomainCreationProcess::CreateDomainJob.perform_now(@pending_action)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class Contact < ApplicationRecord
validates :name, presence: true
validates :role, inclusion: { in: Contact.roles }

def self.create_contact_from_registrant_perform_later(registrant_user:)
def self.create_contact_from_registrant_perform_now(registrant_user:)
c = Contact.find_by(ident: registrant_user.ident)
return c if c && c.code.present?

CreateContactJob.perform_later(registrant_user)
CreateContactJob.perform_now(registrant_user)
end

def self.search(query)
Expand Down
2 changes: 1 addition & 1 deletion app/services/domain_services/create_domain_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(pending_action)
end

def call
EstonianTld::DomainCreationProcess::CreateContactsJob.perform_later(pending_action)
EstonianTld::DomainCreationProcess::CreateContactsJob.perform_now(pending_action)
# EstonianTld::DomainCreationProcess::CreateDomainJob.perform_later(pending_action)
end
end
Expand Down
7 changes: 6 additions & 1 deletion config/application.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@ tara_jwks_uri: '/.well-known/jwks.json'
tara_token_endpoint: '/oauth2/token'
tara_auth_endpoint: '/oauth2/auth'
tara_base_redirect_url: 'https://st-eedirekt.infra.tld.ee'
tara_redirect_path: '/tara/callback'
tara_redirect_path: '/tara/callback'

everypay_key: ""
api_username: ''
everypay_base: https://igw-demo.every-pay.com/api/v4
account_name: 'EUR3D1'

0 comments on commit 599dac2

Please sign in to comment.