Skip to content

Commit 24f9f6b

Browse files
authored
IMP-278: Reverts damsel w/ legacy payouts supports (#143)
* IMP-278: Reverts damsel w/ legacy payouts supports * Bumps damsel * Bumps damsel
1 parent dfb5eb3 commit 24f9f6b

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

apps/hellgate/test/hg_ct_helper.erl

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,13 @@ create_shop_(
425425
) ->
426426
ShopID = hg_utils:unique_id(),
427427
ContractID = hg_utils:unique_id(),
428+
PayoutToolID = hg_utils:unique_id(),
428429

429-
ShopParams = make_shop_params(Category, ContractID),
430+
ShopParams = make_shop_params(Category, ContractID, PayoutToolID),
430431
ShopAccountParams = #payproc_ShopAccountParams{currency = ?cur(Currency)},
431432

432433
ContractParams = make_contract_params(TemplateRef, PaymentInstRef),
434+
PayoutToolParams = make_payout_tool_params(),
433435

434436
TurnoverLimits1 = genlib:define(TurnoverLimits0, ordsets:new()),
435437

@@ -438,6 +440,14 @@ create_shop_(
438440
id = ContractID,
439441
modification = {creation, ContractParams}
440442
}},
443+
{contract_modification, #payproc_ContractModificationUnit{
444+
id = ContractID,
445+
modification =
446+
{payout_tool_modification, #payproc_PayoutToolModificationUnit{
447+
payout_tool_id = PayoutToolID,
448+
modification = {creation, PayoutToolParams}
449+
}}
450+
}},
441451
?shop_modification(ShopID, {creation, ShopParams}),
442452
?shop_modification(ShopID, {shop_account_creation, ShopAccountParams}),
443453
?shop_modification(ShopID, {turnover_limits_modification, TurnoverLimits1})
@@ -460,12 +470,13 @@ create_party_and_shop(PartyID, Category, Currency, TemplateRef, PaymentInstRef,
460470
_ = create_party(PartyID, Client),
461471
create_shop(PartyID, Category, Currency, TemplateRef, PaymentInstRef, Client).
462472

463-
make_shop_params(Category, ContractID) ->
473+
make_shop_params(Category, ContractID, PayoutToolID) ->
464474
#payproc_ShopParams{
465475
category = Category,
466476
location = {url, <<>>},
467477
details = #domain_ShopDetails{name = <<"Battle Ready Shop">>},
468-
contract_id = ContractID
478+
contract_id = ContractID,
479+
payout_tool_id = PayoutToolID
469480
}.
470481

471482
make_party_params() ->
@@ -548,6 +559,19 @@ make_contractor() ->
548559
russian_bank_account = BankAccount
549560
}}}.
550561

562+
-spec make_payout_tool_params() -> dmsl_payproc_thrift:'PayoutToolParams'().
563+
make_payout_tool_params() ->
564+
#payproc_PayoutToolParams{
565+
currency = ?cur(<<"RUB">>),
566+
tool_info =
567+
{russian_bank_account, #domain_RussianBankAccount{
568+
account = <<"4276300010908312893">>,
569+
bank_name = <<"SomeBank">>,
570+
bank_post_account = <<"123129876">>,
571+
bank_bik = <<"66642666">>
572+
}}
573+
}.
574+
551575
-spec make_invoice_params(party_id(), shop_id(), binary(), cash()) -> invoice_params().
552576
make_invoice_params(PartyID, ShopID, Product, Cost) ->
553577
make_invoice_params(PartyID, ShopID, Product, make_due_date(), Cost).

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ services:
9797
disable: true
9898

9999
party-management:
100-
image: ghcr.io/valitydev/party-management:sha-e16301b
100+
image: ghcr.io/valitydev/party-management:sha-9af7d71
101101
command: /opt/party-management/bin/party-management foreground
102102
depends_on:
103103
machinegun:

rebar.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2},
2222
{<<"damsel">>,
2323
{git,"https://github.com/valitydev/damsel.git",
24-
{ref,"8e034bc74b1f4ed0e00dd63d0c3ca9c922be1c47"}},
24+
{ref,"9d4aa513fcbc1cc7ba5eedd9f96d8bc8590a6ac2"}},
2525
0},
2626
{<<"dmt_client">>,
2727
{git,"https://github.com/valitydev/dmt-client.git",

0 commit comments

Comments
 (0)