Revert "TD-831: Allow adjustment change of amount in Payment in failed state …" (#127)

This reverts commit 507084b8e1.
This commit is contained in:
ndiezel0 2024-05-07 18:59:20 +05:00 committed by GitHub
parent b5488dea6c
commit 1442bbcc3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -1463,7 +1463,7 @@ create_adjustment(Timestamp, Params, St, Opts) ->
create_cash_flow_adjustment(Timestamp, Params, DomainRevision, St, Opts) ->
Payment = get_payment(St),
Route = get_route(St),
_ = assert_payment_status([captured, refunded, charged_back, failed], Payment),
_ = assert_payment_status([captured, refunded, charged_back], Payment),
NewRevision = maybe_get_domain_revision(DomainRevision),
PartyRevision = get_opts_party_revision(Opts),
OldCashFlow = get_final_cashflow(St),

View File

@ -2361,8 +2361,7 @@ invalid_payment_adjustment(C) ->
_UserInteraction = await_payment_process_interaction(InvoiceID, PaymentID, Client),
PaymentID = await_payment_process_timeout(InvoiceID, PaymentID, Client),
%% no way to create adjustment for a failed payment
%% Correction. It was changed to failed payment not being in the way of adjustment
?adjustment(_AdjustmentID, ?adjustment_pending()) =
?invalid_payment_status(?failed(_)) =
hg_client_invoicing:create_payment_adjustment(InvoiceID, PaymentID, make_adjustment_params(), Client).
-spec payment_adjustment_success(config()) -> test_return().