From a0cc1339c89b97c925ec364a4bae06c6c028d914 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Thu, 2 Nov 2023 12:15:19 +0200 Subject: [PATCH] fixed issues --- app/jobs/payment_lhv_connect_job.rb | 6 +++--- db/schema.rb | 18 ------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/app/jobs/payment_lhv_connect_job.rb b/app/jobs/payment_lhv_connect_job.rb index 5b06c32..708f388 100644 --- a/app/jobs/payment_lhv_connect_job.rb +++ b/app/jobs/payment_lhv_connect_job.rb @@ -43,7 +43,7 @@ def payment_process sorted_by_ref_number = incoming_transactions.group_by { |x| x[:payment_reference_number] } sorted_by_ref_number.each do |s| - Rails.logger.info '=========== Sending to registry ===========' + Rails.logger.info '=========== Sending transaction ===========' Rails.logger.info s[1] Rails.logger.info '===========================================' @@ -95,7 +95,7 @@ def open_ssl_keystore def send_transactions(params:, payment_reference_number:) reference = Reference.find_by(reference_number: payment_reference_number) - uri = URI.parse(url[reference.initiator]) + uri = URI.parse(url[reference.initiator.to_sym]) http = Net::HTTP.new(uri.host, uri.port) unless Rails.env.development? || Rails.env.test? @@ -103,7 +103,7 @@ def send_transactions(params:, payment_reference_number:) http.verify_mode = OpenSSL::SSL::VERIFY_NONE end - res = http.post(url[reference.initiator], params.to_json, headers) + res = http.post(url[reference.initiator.to_sym], params.to_json, headers) Rails.logger.info '>>>>>>' Rails.logger.info res.body diff --git a/db/schema.rb b/db/schema.rb index a9b4c4a..d747010 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -42,14 +42,6 @@ t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end - create_table "app_sessions", force: :cascade do |t| - t.bigint "user_id", null: false - t.string "token_digest" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["user_id"], name: "index_app_sessions_on_user_id" - end - create_table "invoices", force: :cascade do |t| t.integer "invoice_number", null: false t.string "initiator", null: false @@ -94,18 +86,8 @@ t.string "password_digest" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.string "identity_code" - t.string "uid", default: "", null: false - t.string "provider", default: "", null: false - end - - create_table "white_codes", force: :cascade do |t| - t.string "code", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false end add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" - add_foreign_key "app_sessions", "users" end