change logic, added tests

This commit is contained in:
olegphenomenon 2023-02-07 16:10:20 +02:00
parent e00e87a15c
commit d28afca00f
5 changed files with 115 additions and 52 deletions

View file

@ -64,6 +64,10 @@ class PaymentOrder < ApplicationRecord
false
end
def payment_reference?
response && response['payment_reference'].present?
end
def base_transaction(sum:, paid_at:, buyer_name:)
BankTransaction.new(
description: invoice.order,