mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
Update machinegun (#402)
This commit is contained in:
parent
eee8bf3d78
commit
a930b2ce44
@ -131,23 +131,43 @@ start_app(hellgate = AppName) ->
|
||||
{services, #{
|
||||
accounter => <<"http://shumway:8022/shumpune">>,
|
||||
automaton => <<"http://machinegun:8022/v1/automaton">>,
|
||||
customer_management => <<"http://hellgate:8022/v1/processing/customer_management">>,
|
||||
customer_management => #{
|
||||
url => <<"http://hellgate:8022/v1/processing/customer_management">>,
|
||||
transport_opts => #{
|
||||
pool => customer_management,
|
||||
max_connections => 300
|
||||
}
|
||||
},
|
||||
eventsink => <<"http://machinegun:8022/v1/event_sink">>,
|
||||
fault_detector => <<"http://127.0.0.1:20001/">>,
|
||||
invoice_templating => #{
|
||||
url => <<"http://hellgate:8022/v1/processing/invoice_templating">>,
|
||||
transport_opts => #{
|
||||
pool => invoice_templating,
|
||||
max_connections => 300
|
||||
}
|
||||
},
|
||||
invoicing => #{
|
||||
url => <<"http://hellgate:8022/v1/processing/invoicing">>,
|
||||
transport_opts => #{
|
||||
pool => invoicing,
|
||||
max_connections => 300
|
||||
}
|
||||
},
|
||||
party_management => <<"http://hellgate:8022/v1/processing/partymgmt">>,
|
||||
recurrent_paytool => <<"http://hellgate:8022/v1/processing/recpaytool">>
|
||||
party_management => #{
|
||||
url => <<"http://hellgate:8022/v1/processing/partymgmt">>,
|
||||
transport_opts => #{
|
||||
pool => party_management,
|
||||
max_connections => 300
|
||||
}
|
||||
},
|
||||
recurrent_paytool => #{
|
||||
url => <<"http://hellgate:8022/v1/processing/recpaytool">>,
|
||||
transport_opts => #{
|
||||
pool => recurrent_paytool,
|
||||
max_connections => 300
|
||||
}
|
||||
}
|
||||
}},
|
||||
{proxy_opts, #{
|
||||
transport_opts => #{
|
||||
|
@ -156,6 +156,7 @@ all() ->
|
||||
|
||||
% With variable domain config
|
||||
{group, adjustments},
|
||||
{group, holds_management_with_custom_config},
|
||||
{group, refunds},
|
||||
rounding_cashflow_volume,
|
||||
terms_retrieval,
|
||||
@ -266,8 +267,7 @@ groups() ->
|
||||
payment_hold_partial_capturing,
|
||||
payment_hold_partial_capturing_with_cart,
|
||||
payment_hold_partial_capturing_with_cart_missing_cash,
|
||||
payment_hold_auto_capturing,
|
||||
{group, holds_management_with_custom_config}
|
||||
payment_hold_auto_capturing
|
||||
]},
|
||||
|
||||
{holds_management_with_custom_config, [], [
|
||||
@ -1286,7 +1286,7 @@ payment_risk_score_check(C) ->
|
||||
[
|
||||
?payment_ev(PaymentID2, ?risk_score_changed(high)), % high risk score...
|
||||
% ...covered with the same terminal
|
||||
?payment_ev(PaymentID2, ?route_changed(?route(?prv(101), ?trm(1)))),
|
||||
?payment_ev(PaymentID2, ?route_changed(?route(?prv(1), ?trm(1)))),
|
||||
?payment_ev(PaymentID2, ?cash_flow_changed(_))
|
||||
] = next_event(InvoiceID2, Client),
|
||||
[
|
||||
@ -1783,7 +1783,7 @@ payment_refund_success(C) ->
|
||||
PartyClient = cfg(party_client, C),
|
||||
ShopID = hg_ct_helper:create_battle_ready_shop(?cat(2), <<"RUB">>, ?tmpl(2), ?pinst(2), PartyClient),
|
||||
InvoiceID = start_invoice(ShopID, <<"rubberduck">>, make_due_date(10), 42000, C),
|
||||
PaymentID = process_payment(InvoiceID, make_payment_params(), Client),
|
||||
PaymentID = process_payment(InvoiceID, make_payment_params({hold, capture}), Client),
|
||||
RefundParams = make_refund_params(),
|
||||
% not finished yet
|
||||
?invalid_payment_status(?processed()) =
|
||||
@ -1832,7 +1832,7 @@ deadline_doesnt_affect_payment_refund(C) ->
|
||||
ShopID = hg_ct_helper:create_battle_ready_shop(?cat(2), <<"RUB">>, ?tmpl(2), ?pinst(2), PartyClient),
|
||||
InvoiceID = start_invoice(ShopID, <<"rubberduck">>, make_due_date(10), 42000, C),
|
||||
ProcessingDeadline = 4000, % ms
|
||||
PaymentParams = set_processing_deadline(ProcessingDeadline, make_payment_params()),
|
||||
PaymentParams = set_processing_deadline(ProcessingDeadline, make_payment_params({hold, capture})),
|
||||
PaymentID = process_payment(InvoiceID, PaymentParams, Client),
|
||||
RefundParams = make_refund_params(),
|
||||
% not finished yet
|
||||
@ -4234,6 +4234,16 @@ construct_domain_fixture() ->
|
||||
?share(16, 1000, operation_amount)
|
||||
)
|
||||
]},
|
||||
holds = #domain_PaymentHoldsProvisionTerms{
|
||||
lifetime = {decisions, [
|
||||
#domain_HoldLifetimeDecision{
|
||||
if_ = {condition, {payment_tool, {bank_card, #domain_BankCardCondition{
|
||||
definition = {payment_system_is, visa}
|
||||
}}}},
|
||||
then_ = {value, ?hold_lifetime(5)}
|
||||
}
|
||||
]}
|
||||
},
|
||||
refunds = #domain_PaymentRefundsProvisionTerms{
|
||||
cash_flow = {value, [
|
||||
?cfpost(
|
||||
|
@ -25,10 +25,11 @@ services:
|
||||
condition: service_healthy
|
||||
|
||||
machinegun:
|
||||
image: dr2.rbkmoney.com/rbkmoney/machinegun:aec434f47029dbd81762e10de04c9422e3c93e5e
|
||||
image: dr2.rbkmoney.com/rbkmoney/machinegun:4986e50e2abcedbf589aaf8cce89c2b420589f04
|
||||
command: /opt/machinegun/bin/machinegun foreground
|
||||
volumes:
|
||||
- ./test/machinegun/config.yaml:/opt/machinegun/etc/config.yaml
|
||||
- ./test/machinegun/cookie:/opt/machinegun/etc/cookie
|
||||
healthcheck:
|
||||
test: "curl http://localhost:8022/"
|
||||
interval: 5s
|
||||
|
@ -1,4 +1,6 @@
|
||||
service_name: machinegun
|
||||
erlang:
|
||||
secret_cookie_file: "/opt/machinegun/etc/cookie"
|
||||
namespaces:
|
||||
invoice:
|
||||
event_sinks:
|
||||
|
1
test/machinegun/cookie
Normal file
1
test/machinegun/cookie
Normal file
@ -0,0 +1 @@
|
||||
test
|
Loading…
Reference in New Issue
Block a user