Skip to content

Commit

Permalink
Merge pull request #2572 from internetee/skip-csrf-verification
Browse files Browse the repository at this point in the history
comment out payment check verification
  • Loading branch information
vohmar authored May 5, 2023
2 parents 8027dde + fecc306 commit 00c068d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion app/models/payment_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PaymentOrder < ApplicationRecord
belongs_to :invoice, optional: false

validate :invoice_cannot_be_already_paid, on: :create
validate :supported_payment_method
# validate :supported_payment_method

enum status: { issued: 'issued', paid: 'paid', cancelled: 'cancelled',
failed: 'failed' }
Expand Down
6 changes: 0 additions & 6 deletions test/models/payment_orders_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ def test_can_not_create_order_for_paid_invoice
assert_includes payment_order.errors[:invoice], 'is already paid'
end

def test_order_without_channel_is_invalid
payment_order = PaymentOrder.new
assert payment_order.invalid?
assert_includes payment_order.errors[:type], 'is not supported'
end

def test_can_not_create_order_with_invalid_type
assert_raise NameError do
PaymentOrder.new_with_type(type: 'not_implemented', invoice: Invoice.new)
Expand Down

0 comments on commit 00c068d

Please sign in to comment.