Skip to content

Commit 5f6c30a

Browse files
committed
chore: run linter
1 parent 90a324b commit 5f6c30a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

app/models/payment.rb

+14-14
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Payment < ApplicationRecord
1010
validates :payment_type, presence: true
1111

1212
enum status: { failed: 0, in_progress: 1, successful: 2 }
13-
13+
1414
# Keep payconiq_online because it is still present in the database
1515
enum payment_type: { ideal: 0, payconiq_online: 1, pin: 3 }
1616
enum transaction_type: { checkout: 0, activity: 1 }
@@ -50,22 +50,22 @@ def request_payment
5050
self.token = Digest::SHA256.hexdigest("#{ member.id }#{ Time.now.to_f }#{ redirect_uri }")
5151

5252
webhook_url = if Rails.env.development?
53-
"#{ ENV['NGROK_HOST'] }/api/hook/mollie"
54-
else
55-
Rails.application.routes.url_helpers.mollie_hook_url
56-
end
53+
"#{ ENV['NGROK_HOST'] }/api/hook/mollie"
54+
else
55+
Rails.application.routes.url_helpers.mollie_hook_url
56+
end
5757

5858
payment = Mollie::Payment.create(
5959
amount: { value: amount.to_s, currency: 'EUR' },
6060
description: description,
6161
webhookUrl: webhook_url,
62-
redirectUrl: Rails.application.routes.url_helpers.payment_redirect_url(token: token),
62+
redirectUrl: Rails.application.routes.url_helpers.payment_redirect_url(token: token)
6363
)
6464

6565
self.trxid = payment.id
6666
self.payment_uri = payment._links['checkout']['href']
6767
self.status = :in_progress
68-
68+
6969
# pin payment shouldn't have any extra work
7070
when :pin
7171
end
@@ -159,12 +159,12 @@ def activities
159159

160160
def status_update(new_status)
161161
self.status = case new_status.downcase
162-
when "succeeded", "paid"
163-
:successful
164-
when "expired", "canceled", "failed", "cancelled", "authorization_failed"
165-
:failed
166-
else
167-
:in_progress
168-
end
162+
when "succeeded", "paid"
163+
:successful
164+
when "expired", "canceled", "failed", "cancelled", "authorization_failed"
165+
:failed
166+
else
167+
:in_progress
168+
end
169169
end
170170
end

0 commit comments

Comments
 (0)