diff --git a/apps/hellgate/src/hg_invoice_registered_payment.erl b/apps/hellgate/src/hg_invoice_registered_payment.erl index 613ff759..29aa4fdf 100644 --- a/apps/hellgate/src/hg_invoice_registered_payment.erl +++ b/apps/hellgate/src/hg_invoice_registered_payment.erl @@ -41,7 +41,8 @@ init_(PaymentID, Params, Opts = #{timestamp := CreatedAt0}) -> context = Context, transaction_info = TransactionInfo, risk_score = RiskScore, - occurred_at = OccurredAt + occurred_at = OccurredAt, + recurrent_token = RecToken } = Params, CreatedAt1 = genlib:define(OccurredAt, CreatedAt0), Revision = hg_domain:head(), @@ -93,7 +94,10 @@ init_(PaymentID, Params, Opts = #{timestamp := CreatedAt0}) -> [ ?route_changed(Route), ?cash_flow_changed(FinalCashflow), - hg_session:wrap_event(?processed(), hg_session:create()), + hg_session:wrap_event(?processed(), hg_session:create()) + ] ++ + maybe_rec_token_event_list(RecToken) ++ + [ hg_session:wrap_event(?processed(), ?trx_bound(TransactionInfo)), hg_session:wrap_event(?processed(), ?session_finished(?session_succeeded())), ?payment_status_changed(?processed()), @@ -181,6 +185,11 @@ maybe_risk_score_event_list(undefined) -> maybe_risk_score_event_list(RiskScore) -> [?risk_score_changed(RiskScore)]. +maybe_rec_token_event_list(undefined) -> + []; +maybe_rec_token_event_list(RecToken) -> + [?rec_token_acquired(RecToken)]. + get_merchant_payment_terms(Revision, Shop, VS) -> TermSet = hg_invoice_utils:compute_shop_terms(Revision, Shop, VS), TermSet#domain_TermSet.payments. diff --git a/compose.yaml b/compose.yaml index e5aff656..9f43b942 100644 --- a/compose.yaml +++ b/compose.yaml @@ -27,7 +27,7 @@ services: command: /sbin/init dmt: - image: ghcr.io/valitydev/dominant-v2:sha-bfed984 + image: ghcr.io/valitydev/dominant-v2:sha-4fb87ed-epic-fix_remove command: /opt/dmt/bin/dmt foreground healthcheck: test: "/opt/dmt/bin/dmt ping" diff --git a/rebar.config b/rebar.config index 07f69d4f..5565b1cc 100644 --- a/rebar.config +++ b/rebar.config @@ -31,7 +31,7 @@ {gproc, "0.9.0"}, {genlib, {git, "https://github.com/valitydev/genlib.git", {tag, "v1.1.0"}}}, {woody, {git, "https://github.com/valitydev/woody_erlang.git", {tag, "v1.1.0"}}}, - {damsel, {git, "https://github.com/valitydev/damsel.git", {tag, "v2.2.12"}}}, + {damsel, {git, "https://github.com/valitydev/damsel.git", {tag, "v2.2.14"}}}, {payproc_errors, {git, "https://github.com/valitydev/payproc-errors-erlang.git", {branch, "master"}}}, {mg_proto, {git, "https://github.com/valitydev/machinegun-proto.git", {branch, "master"}}}, {dmt_client, {git, "https://github.com/valitydev/dmt-client.git", {tag, "v2.0.3"}}}, diff --git a/rebar.lock b/rebar.lock index 3ef41c84..ecd05817 100644 --- a/rebar.lock +++ b/rebar.lock @@ -27,7 +27,7 @@ {<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2}, {<<"damsel">>, {git,"https://github.com/valitydev/damsel.git", - {ref,"8cab698cd78125ac47489d0ba81169df376757a4"}}, + {ref,"1d0c1eceed23cedb46583ca67519b11abd69867a"}}, 0}, {<<"dmt_client">>, {git,"https://github.com/valitydev/dmt-client.git",