mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Add explicit return to fix failing test
This commit is contained in:
parent
5dea92c0d8
commit
d7eca597d1
3 changed files with 7 additions and 7 deletions
|
@ -45,11 +45,9 @@ class Registrar
|
|||
|
||||
if @payment.valid_response_from_intermediary? && @payment.settled_payment?
|
||||
@payment.complete_transaction
|
||||
|
||||
if invoice.binded?
|
||||
render status: 200, json: { ok: :ok }
|
||||
end
|
||||
end
|
||||
|
||||
render status: 200, json: { status: 'ok' }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -65,7 +65,8 @@ module Payments
|
|||
transaction.paid_at = Time.parse(response["VK_T_DATETIME"])
|
||||
|
||||
transaction.save!
|
||||
transaction.autobind_invoice
|
||||
account_activity = transaction.autobind_invoice
|
||||
account_activity
|
||||
end
|
||||
|
||||
def settled_payment?
|
||||
|
|
|
@ -40,9 +40,10 @@ module Payments
|
|||
transaction.sum = response[:amount]
|
||||
transaction.paid_at = DateTime.strptime(response[:timestamp], '%s')
|
||||
transaction.buyer_name = response[:cc_holder_name]
|
||||
transaction.save!
|
||||
|
||||
transaction.autobind_invoice
|
||||
transaction.save!
|
||||
account_activity = transaction.autobind_invoice
|
||||
account_activity
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue