mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
IMP-278: Reverts damsel w/ legacy payouts supports (#143)
* IMP-278: Reverts damsel w/ legacy payouts supports * Bumps damsel * Bumps damsel
This commit is contained in:
parent
dfb5eb3988
commit
24f9f6bd63
@ -425,11 +425,13 @@ create_shop_(
|
||||
) ->
|
||||
ShopID = hg_utils:unique_id(),
|
||||
ContractID = hg_utils:unique_id(),
|
||||
PayoutToolID = hg_utils:unique_id(),
|
||||
|
||||
ShopParams = make_shop_params(Category, ContractID),
|
||||
ShopParams = make_shop_params(Category, ContractID, PayoutToolID),
|
||||
ShopAccountParams = #payproc_ShopAccountParams{currency = ?cur(Currency)},
|
||||
|
||||
ContractParams = make_contract_params(TemplateRef, PaymentInstRef),
|
||||
PayoutToolParams = make_payout_tool_params(),
|
||||
|
||||
TurnoverLimits1 = genlib:define(TurnoverLimits0, ordsets:new()),
|
||||
|
||||
@ -438,6 +440,14 @@ create_shop_(
|
||||
id = ContractID,
|
||||
modification = {creation, ContractParams}
|
||||
}},
|
||||
{contract_modification, #payproc_ContractModificationUnit{
|
||||
id = ContractID,
|
||||
modification =
|
||||
{payout_tool_modification, #payproc_PayoutToolModificationUnit{
|
||||
payout_tool_id = PayoutToolID,
|
||||
modification = {creation, PayoutToolParams}
|
||||
}}
|
||||
}},
|
||||
?shop_modification(ShopID, {creation, ShopParams}),
|
||||
?shop_modification(ShopID, {shop_account_creation, ShopAccountParams}),
|
||||
?shop_modification(ShopID, {turnover_limits_modification, TurnoverLimits1})
|
||||
@ -460,12 +470,13 @@ create_party_and_shop(PartyID, Category, Currency, TemplateRef, PaymentInstRef,
|
||||
_ = create_party(PartyID, Client),
|
||||
create_shop(PartyID, Category, Currency, TemplateRef, PaymentInstRef, Client).
|
||||
|
||||
make_shop_params(Category, ContractID) ->
|
||||
make_shop_params(Category, ContractID, PayoutToolID) ->
|
||||
#payproc_ShopParams{
|
||||
category = Category,
|
||||
location = {url, <<>>},
|
||||
details = #domain_ShopDetails{name = <<"Battle Ready Shop">>},
|
||||
contract_id = ContractID
|
||||
contract_id = ContractID,
|
||||
payout_tool_id = PayoutToolID
|
||||
}.
|
||||
|
||||
make_party_params() ->
|
||||
@ -548,6 +559,19 @@ make_contractor() ->
|
||||
russian_bank_account = BankAccount
|
||||
}}}.
|
||||
|
||||
-spec make_payout_tool_params() -> dmsl_payproc_thrift:'PayoutToolParams'().
|
||||
make_payout_tool_params() ->
|
||||
#payproc_PayoutToolParams{
|
||||
currency = ?cur(<<"RUB">>),
|
||||
tool_info =
|
||||
{russian_bank_account, #domain_RussianBankAccount{
|
||||
account = <<"4276300010908312893">>,
|
||||
bank_name = <<"SomeBank">>,
|
||||
bank_post_account = <<"123129876">>,
|
||||
bank_bik = <<"66642666">>
|
||||
}}
|
||||
}.
|
||||
|
||||
-spec make_invoice_params(party_id(), shop_id(), binary(), cash()) -> invoice_params().
|
||||
make_invoice_params(PartyID, ShopID, Product, Cost) ->
|
||||
make_invoice_params(PartyID, ShopID, Product, make_due_date(), Cost).
|
||||
|
@ -97,7 +97,7 @@ services:
|
||||
disable: true
|
||||
|
||||
party-management:
|
||||
image: ghcr.io/valitydev/party-management:sha-e16301b
|
||||
image: ghcr.io/valitydev/party-management:sha-9af7d71
|
||||
command: /opt/party-management/bin/party-management foreground
|
||||
depends_on:
|
||||
machinegun:
|
||||
|
@ -21,7 +21,7 @@
|
||||
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},2},
|
||||
{<<"damsel">>,
|
||||
{git,"https://github.com/valitydev/damsel.git",
|
||||
{ref,"8e034bc74b1f4ed0e00dd63d0c3ca9c922be1c47"}},
|
||||
{ref,"9d4aa513fcbc1cc7ba5eedd9f96d8bc8590a6ac2"}},
|
||||
0},
|
||||
{<<"dmt_client">>,
|
||||
{git,"https://github.com/valitydev/dmt-client.git",
|
||||
|
Loading…
Reference in New Issue
Block a user