Commit Graph

57 Commits

Author SHA1 Message Date
Aleksey Kashapov
e16301bd9a
IMP-278: Retires payouts (#48)
* IMP-278: Retires payouts

* Refactors fixture for `pm_party_tests_SUITE:check_all_payment_methods/1` testcase

* Fixes dialyzer warns and updates woody metrics publishing

* Bumps CI cache

* Fixes deps order in main application

* Bumps damsel

* Reverts removed fields

* Bumps damsel

* Bumps CI

* Bumps damsel
2024-08-28 17:40:50 +03:00
ndiezel0
f757b7905b
TD-262: Move from shumpune to accounter (#15)
* TD-262: Move from shumpune to accounter

* Fix spec

* Add test

* Fix
2022-04-08 01:32:50 +03:00
dinama
63c7b92c75
+disable latest_version caching in sys.config (#25) 2021-10-22 11:19:44 +03:00
yuri-bukhalenkov
52f3bbe920
changed workdir according a wetkitty:service-erlang.sls.tpl (#1)
* changed workdir according a wetkitty:service-erlang.sls.tpl

* fixed: formatter

* used SERVICE_NAME variable to setup paths and docker image name

* fixed tests
2021-06-18 15:02:32 +03:00
Yuri Bukhalenkov
89139a5043 renamed service 2021-05-24 17:27:46 +03:00
Yuri Bukhalenkov
9d0e765920 moved party_management to a separated microservice 2021-05-24 14:30:10 +03:00
dinama
8dcc98a58b ED-86: +hg_customer dynamic poll timeout (#552) 2021-03-23 00:03:47 +03:00
dinama
8847162ef8 +fix health_check demo config (#537) 2021-02-01 19:07:24 +03:00
Sergey Yelin
57ca9a8bd5 Add prometeus (#494) 2020-10-24 09:01:20 +03:00
ndiezel0
e9893dcc43 HG-452: Add caching for Checkout Party (#487)
* HG-452: Add caching for Checkout Party

* HG-452: Fix dialyzer

* HG-452: Format

* HG-452: Make cache work

* HG-452: Review fix

* HG-452: Fix specs

* HG-452: Review fix

* HG-452: Fix

* HG-452: Review fix

* HG-452: Format
2020-10-16 13:41:47 +03:00
Andrey Fadeev
b85e9d3eb0 Update woody to rbkmoney/woody_erlang@b563bbb (#467) 2020-07-28 08:14:10 +03:00
Roman Pushkov
bddf397e8b HG-529: add disable failover routing option (#447)
* Temporarily revert second part of HG-538

This reverts commit 7f23d74bf7246df59ee11eb368ac82a8e5cd0865.

* add enabled option to fd

* disable fd in tests by default

* update fd gathering test

* add enabled status handling to fd

* cleanup

* cleanup ct print

* update tests

* cleanup

* update existing fd config in tests

* update hg test config for fd
2020-06-09 14:03:10 +03:00
Sergei Shuvatov
a9a6ec896d HG-525: add payment status adjustment (#414) 2020-03-12 13:17:13 +03:00
ndiezel0
f5a8ccfc6f HG-452: Move party and claim management to its own app (#407)
* HG-452: Move party and claim management to it's own app

* HG-452: Remove unused exports

* HG-452: Fix tests, remove old eventsink on party

* HG-452: Revert pm_event_provider

* HG-452: Remove `hg_contract`

* HG-452: Add pm_client and pm_proto

* HG-452: Fix lint

* HG-452: Move party and claim management tests to `party_management`

* HG-452: Fix dialyzer

* HG-452: Fix tests

* HG-452: Fix tests

* HG-452: Remove some includes in hg, bring back `hg_party`

* HG-452: Remove party client from party management

* HG-452: Remove `hg_payout_tool` and rename `pm_invoice_utils` => `pm_currency`

* HG-452: Add party_management config

* HG-452: Remove unused function from common test helpers

* HG-452: Remove unused function from pm_ct_helper

* HG-452: hg_selector => pm_selector

* HG-452: Fix lint

* HG-452: Strip down party_management config and bring back party_events.hrl to hellgate

* HG-452: Fix order of app loads in tests

* HG-452: Bring back `hg_client_party`

* HG-452: Fix tests

* HG-452: Use pm_party in hg, where it is appropriate

* HG-452: Remove unused `hg_client_party` code

* HG-452: Remove unused macros in `hellgate/include/party_events.hrl`

* HG-452: Remove party_management from list of services in config

* HG-452: Remove hg_client and pm_client need to get service_spec

* HG-452: Clean up `party_management/include/domain.hrl` from unused macros

* HG-452: Format `xref_checks` like `erl_opts`

* HG-452: Bring back old event_sink for party events

* HG-452: Simplify include in test

* Merge branch 'master' into HG-452/ft/party_management_new

# Conflicts:
#	apps/hellgate/src/hg_party.erl

* HG-452: Review fix
2020-02-28 15:02:25 +03:00
Roman Pushkov
1e3a74c611 HG-530: handle certain errors as fd finishes (#406)
* add handling

* cleanup

* fix

* dialyzer fix

* fix typo

* improve naming

* add safe failures to config

* fix naming

* rename safe to benign

* make fd operations time-independent

* fix compilation errors
2020-01-09 12:26:17 +02:00
Sergey Yelin
0bf030fa5b AAA-54: Upgrade dmt_client (#404) 2019-12-20 18:52:04 +03:00
Sergey Yelin
302a04b8d6 Aaa 54 remove spaces (#401)
* AAA-54: Remove spaces in messages

* Update dmt_client and config
2019-12-13 18:36:31 +03:00
Sergey Yelin
5021fff28f Switch to new woody with log formatter (#394)
* Switch to new woody with log formatter

* event_handler_opts -> scoper_event_handler_opts

* Fix lint

* Add limit to tests

* Fix formater option passing

* Fix woody params passing

* Update woody
2019-12-09 18:03:05 +03:00
Roman Pushkov
60be383a3e HG-514: provider conversion routing (#367)
* add conversion service type to fd client

* fetch conversion stats in routing

* minor fix

* add deterministic operation id to fd client

* register conversion operations in invoice payment

* update routing

* fd client minor refactor

* add conversion scoring

* cleanup comments

* fix linter errors, export build_operation_id/2

* fix dialyzer error

* refactor

* fix argument naming

* conversion test

* minor naming updates

* move conversion service config to sys.config, minor fixes

* refactoring

* update tests

* update routing types

* fix tests

* update config

* move conversion service calls

* update tests

* explicit config for availability

* update routing

* clean comment

* update tests

* update routing

* update routing in invoice payment

* cleanup debug calls

* refactor fd calls

* fix typo

* add provider conversion to process payment

* cleanup invoice payment

* update routing in recurrent paytool

* update routing

* update tests

* fix fd call, clean ct:print

* refactor proxy provider

* fix wrong return

* missing full stop

* fd client update

* conversion service in invoice payment

* revert forgotten process payment changes

* cleanup

* fix typo

* fix scoring, cleanup

* narrow id() type in fd client

* proxy provider cleanup

* invoice payment fd calls refactoring

* add and improve routing tests

* update config, move start conversion service

* move notify fd, again

* fd notification minor rework

* only register payment processing with target processed

* fix

* fix config
2019-11-25 16:42:48 +03:00
Sergey Yelin
6f69fe59ca HG-500: Switch to shumpune-proto (#353)
* HG-500: Switch to shumpune-proto

* Added shumpune

* Switch to shumpune

* Fix call to get_balance

* Upgrade to fixed shumpune

* Add shumpune to sys.config

* AffectedAccounts -> Clocks

* Cleanup

* Add missing shumpune_proto to hellgate

* More cleanup

* Fix spec fot commit/rollback

* Remove shumoune service and switch accounter to shumpune

* Split plan/2 to plan/2 and hold/2.

* Remove shumway (free resources)

* More API cleanup

* More cleanup

* Change plan/2 according protocol

* Update shumpune

* Switch to shumway

* Switch to shumway

* Fix test config

* Revert "Revert "HG-516: pass transport_opts in hg_client_api (#371)" (#375)"

This reverts commit 1f96b4a0d3ff3f6ddcb3d70a33f4073e895c7744.
2019-10-15 13:17:42 +03:00
Toporkov Igor
ce684ee8a1 MSPF-475: Replaced sequences with bender (#345)
* Replaced sequnces with bender

* Nested bender generation call

* Added bender url to config

* Removed unnecessary lines

* Construct refund id without bender

* Implemented proper id construction

* Operator whitespace fix

* Refactored test

* Codestyle fix

* Removed bender

* Simplified max id search

* Renamed dmsl
2019-08-09 13:54:11 +03:00
Sergey Elin
8635a3769e Switch to logger (#335)
* Revert "HG-478 Revert update to Erlang 21 (#320)"

This reverts commit 7179e82258e6d8a779448640e2ebe4d5ed79a35b.

* MSFP-433: Erlang 21 with lager

* Fix comments

* HG-479: Switch to logger

* HG-479: Add memory limit for test container

* HG-479: Fix missing

* Fix logger config

* HG-479: Fix for logger formatter

* HG-479: lager -> logger
2019-06-21 21:48:37 +03:00
Roman Pushkov
7f6bf45e5c HG-489: timeout for fault detector to prevent processing errors (#331)
* add timeout to see if tests fail

* update hg_woody_wrapper:call/4 to receive a deadline without options

* use timeout in fd client

* set very low fd timeout to prevent tests from being slow

* update sys.config

* lower fd delay

* set default fd timeout to 4000

* rename get_service/1 to get_service_opts/1, export, minor refactoring

* use hg_woody_wrapper:get_service_opts/1 in fd client
2019-06-08 21:37:22 +03:00
Roman Pushkov
2feee7051f HG-488: Use default woody options in fault detector (#330)
* remove custom options from fd call

* remove timeout option
2019-06-07 11:05:32 +03:00
Roman Pushkov
0fc4198197 HG-466: Use fault detector in hellgate routing (#302)
* add fault-detector dep

* fix typo

* update rebar.lock

* update fault detector version

* init fault detector client

* add fault detector base

* add fault-detector url placeholder

* get fault-detector url from env

* fix woody client call

* fix formatting, update gitignore

* update fd client, add fd init placeholder after routing

* add fault_detector_proto to app.src

* fix register_operation in fault detector

* update register operation template after choosing route

* update fd client

* add fault detector to hg_proto

* add placeholder for fd scoring in routing

* add fault detector template to sys.config

* update fault detector client

* add GetStatistics call to routing

* update fault detector client

* update get statistics call in routing

* doc tweak

* fix typing

* fix type

* add init service after routing

* update fd client

* add fd notifiers on success and failure

* clean comments

* add fd dummy to tests

* update routing

* temporarily disable sending operations to fd

* add fd routing test case

* remove retry strategy from fd client

* minor tweak

* add fd routing test

* update tests

* update fd client

* update fd client

* refactoring, update test

* formatting fix

* minor refactoring

* more refactoring

* more refactoring

* fix formatting errors

* minor

* space fix

* fix typo

* remove whitespace

* fix whitespace

* Update hg_direct_recurrent_tests_SUITE.erl

* Update hg_invoice_tests_SUITE.erl

* formatting fixes

* separate routing tests

* update config

* update routing

* update fd client

* clean up comments, update fault detector calls

* fix errors

* fix line length

* fix commas

* fd refactoring

* improve fd formatting

* formatting

* refactoring

* add fail rate scoring test base

* split route selection into multiple functions, refactoring

* fix line length

* update fd config, move fd notification to hg_proxy_provider

* config update

* fd client refactoring

* new route selection + tests

* fix trailing comma

* update config

* update fd client with new config

* rework route selection algorithm

* fix error handling in hg_proxy_provider

* merge, update tests, fix types

* move to logger in fd client

* build_utils update

* fix build utils

* remove lager, update fd child spec

* minor refactoring

* revert to lager in fd

* revert to lager in routing tests

* add match on terminate child in tests

* remove unnecessary include
2019-05-27 11:06:38 +03:00
Sergey Elin
17c9a5dc41 Upgrade to Erlang 21 (with lager) (#322)
* MSFP-433: Erlang 21 with lager
2019-05-20 14:59:29 +03:00
Andrey Fadeev
45045eef0a HG-478 Revert update to Erlang 21 (#320)
* Revert "MSFP-433: Fix badmatch in woody (#316)"

This reverts commit c9174907a2fd80b7e2d1968a8a850549ce043f62.

* Revert "Upgrade woody (#315)"

This reverts commit e1ed1624971f30142da7a82653bd2ece7616be9d.

* Revert "HG-433: Upgrade to Erlang 21 (#313)"

This reverts commit faf7d595dd6e5a04a882a09514ee29d84ae4d582.
2019-05-17 11:52:11 +03:00
Sergey Elin
c482e862bb HG-433: Upgrade to Erlang 21 (#313)
* HG-433: Upgrade build_utils
* HG-433: Upgrade base erlang image and build image
* HG-433: Upgrade machinegun
* HG-433: Upgrade libraries
* HG-433: Switch to cowboy 2.x
* HG-433: Update dmt_client
* HG-433: Switch to logger
2019-05-08 15:17:59 +03:00
Andrew Mayorov
b1aa72cf7b Bump to rbkmoney/woody_erlang@d8de03d (#288) 2019-02-20 14:52:40 +03:00
Andrey Fadeev
c0ff473653 MG-145 Add VM metrics collection (#278)
Add `how_are_you` library usage
2019-01-15 00:36:59 +03:00
Артем
45698158b4 HG-437: Fix anti fraud bypass (#255) 2018-10-03 11:44:21 +03:00
Andrey Fadeev
aa89507753 HG-389 Add caching party client usage (#232) 2018-09-06 18:50:37 +03:00
Andrey Fadeev
f6a62b4269 Add default woody deadline to requests without it (#236) 2018-09-06 13:26:44 +03:00
Andrew Mayorov
06592e29f0 Provide ability to setup timeouts (#226)
* Bump to rbkmoney/woody_erlang@9846923
2018-07-06 15:16:10 +03:00
Andrey Fadeev
848f176450 HG-368 Retry session after temporary unavailability failure in invoice payment (#220)
Use retry implementation from genlib_retry library.
Retries policy presents in application env.
Add more tests.
2018-06-08 14:44:23 +03:00
Petr Kozorezov
e9e6de184b add "health" handle (#204) 2018-04-12 18:02:05 +03:00
Natalia Pulina
3268282848 HG-339: Introduce partial refunds (#187)
* HG-339: Introduce partial refunds (#176)

* HG-339: Enrich refund with payment cash for old events (#177)

* HG-341: Introduce provision and service terms for partial refunds (#180)

*  HG-348: Make refund id using sequences service (#186)

* HG-348: Make refund id using sequences service

* HG-348: Bump to rbkmoney/scoper@cbe3abc

* HG-339: rebar.config fixed

* HG-339: seq_proto -> hg_proto.app.src (#188)

* HG-339: Cant start simultaneous partial refunds (#189)

* HG-339: Bump rbkmoney/damsel@349d26c, Bump rbkmoney/dominant@007326a
2018-03-06 18:05:18 +03:00
Anton Belyaev
d73592ca22 HG-273: move woody scoped logging to woody (#124)
* use scoper lib for log meta scoping
* remove woody_event_handler behaviour from hg_client_api (unused)
* update tests config for scoper
* bump up dmt_client (now with scoper support)
2017-10-26 13:59:47 +03:00
Anton Belyaev
19f75db729 HG-182: Introduce customer as a payment resource (#141)
* HG-231: Introduce customers (#114)

* HG-231: Pass aux state down to the machine handlers (#137)

* HG-231: Handle customer aux_state (#138)

* HG-231: Add customer status change event (#140)

* HG-182: Switch to master rbkmoney/damsel@478235a
2017-10-23 16:44:42 +03:00
Natalia Pulina
436417ca44 BA-36: Ability to retrieve terms for contract, shop and invoice (#131)
* HG-260: add ability to retrieve terms for contract & shop (#127)

* add ability to retrieve terms for contract & shop
* switch to epic damsel rbkmoney/damsel@caa8dcb
* fix selector reducer
First problem was in selector reducer. In case of {decisions, [D1, D2, ..., Dn]}, If D1 reduce to <some_non_const_condition, some_value> and D2 reduce to <const_bool_condition, some_value>, then reducer generate invalid thrift structure like {decisions, [ReducedD1, {_true_, <some_value>}, ..., ReducedDn]}.
Second problem was in condition solver: party condition evals to false in case of missing shop in var_set, even if no shop condition specified.

* HG-276: ability to retrieve terms of contract for invoice (#129)

* BA-36: Bump to rbkmoney/damsel@release/erlang/master
2017-09-27 17:53:28 +04:00
Andrew Mayorov
e88c4b8e74 HG-219: Implement multiclaim facilities (#98)
* HG-173: changed party interface to claims (#79)

* DC-45: implemented dirty version of event batching (#92)

* DC-45: implemented dirty version of event batching

* DC-45: Make invoice machines emit changes within single event

* HG-229: Embrace new events hierarchy (#94)

* HG-229: Bump to rbkmoney/damsel@7bb67fc

* HG-229: Embrace new events hierarchy

* HG-229: Fix long time broken typespecs

* HG-229: Employ session results + further decouple sessions from payment

* HG-229: Better classify payment errors

* HG-229: Implement model splitting

* HG-229: Stuff location with something meaningful

* HG-229: Overcome a couple of rebase related issues

* HG-229: Drop event filtering facilities altogether

* HG-229: Make result more explicit

* HG-229: Lessen verbosity on cleaning up

* HG-192: Handle missing shop properly (#95)

* HG-173: fixed some shop-related asserts (#97)

* HG-219: Bump to upstream rbkmoney/damsel@b665c89
2017-07-17 16:33:57 +03:00
Andrew Mayorov
aa1f3061c1 HG-196: Introduce naive payment cash flow adjustments (#88)
* HG-196: Lose containerpilot finally

* HG-196: Switch to keynslug/damsel

* HG-196: Shortcut invoice / payment creation interface

* HG-196: Refactor UserInfo reuse, move access control to the call ctx

* HG-196: Implement payment adjustments

* HG-196: Quickly shut linter up

* HG-196: Fix bad clause

* HG-196: Make a couple of cosmetic fixes

* HG-196: Expand adjustment tests coverage

* HG-196: Constrain complex id construction more

* HG-196: Rename exception macro

* HG-196: Revert occasional verbosity boost

* HG-196: Shortcut getting payment

* HG-196: Make id construction more specific

* HG-196: Update to reflect finally negotiated protocol

* HG-196: Bump to rbkmoney/woody_erlang@2d00bda

* HG-196: Heal occasional error traces during tests

* HG-196: Fix a whoopsie

* HG-196: Fix dialyzer complaints

* HG-196: Bump to rbkmoney/damsel@8747590
2017-06-15 19:57:02 +03:00
Artem Ocheredko
e42fb4b0a6 HG188-add user identity (#86)
* HG-188 Move to erlang 19 dialyzer and user identity access

* HG-188 Postreview refactoring
2017-05-17 11:50:18 +03:00
Andrew Mayorov
9f72fe3537 HG-155: Export woody server net_opts to the config (#81) 2017-04-03 17:47:58 +03:00
Andrew Mayorov
aec7c23562 Implement all the hacks (#63)
* HG-153: Implement setting transport options up for proxies

* HG-153: Reduce inpector selector during payment init

* HG-151: Implement cost range condition

* HG-151: Reimplement inspector tests using selector

* HG-138: Shitcode up a party-related selectors implementation

* HG-153: Use proxy transport options from the app env

* HG-138: Implement const predicate reduction

* HG-138: Bump to rbkmoney/damsel@61701d2

* HG-138: Bump up dominant and build image

* HG-138: Make compose more insistent on health checking

* HG-152: Bump to rbkmoney/image-service-erlang@13454a9

* HG-138: Bump up dominant again

* HG-153: Make cash range check fail upon misconfiguration
2017-02-01 21:44:07 +03:00
Evgeny Levenets
ccc419ed8f HG-72: save context in gproc instead of carrying around from function to function (#48) 2016-11-15 10:59:17 +03:00
Artem Ocheredko
1de020308d HG-67 Add account management (#23)
* HG-67 Add account management. Add default shop services for shop creation. Add party management todo
2016-10-12 15:44:21 +03:00
Andrew Mayorov
f551cab1d1 HG-51: Payments over new protocol (#24)
* HG-51: Implement new proxy protocol, shitcode at its best

* HG-51: Refactor a bit

* HG-51: Switch to a renewed mg protocol

* HG-51: Bump to damsel upstream w/ payer contact info

* HG-51: Mention pointlessly complex payment ids in TODO list

* HG-51: Hardcode eventsink id instead

* HG-51: Update lockfile

* HG-51: Fail furiosly when callback handling ends up w/ unexpected error

* HG-51: Store less state in the session start event

* HG-51: Fail furiously on protocol errors, e.g. proxy contract violations

* HG-51: Add more TODO
2016-10-10 19:05:28 +03:00
Andrew Mayorov
17e6d5ae85 MSPF-91: Stream logs into a single json-formatted file (#26) 2016-10-10 14:41:18 +03:00
Evgeny Levenets
0da3552986 HG-70: Added IPv6 support (#25)
Added IPv6 support and set IPv6 "::" as default listen address
2016-10-07 14:32:51 +03:00