Commit Graph

18 Commits

Author SHA1 Message Date
ttt161
db39bf920d
TD-291: test refactoring/split suite (#82)
* TD-291: test refactoring/split suite

* TD-291: fix format/dialyzer checks

* TD-291: update style config

* TD-291: fix typo

---------

Co-authored-by: anatoliy.losev <losto@nix>
2023-09-04 10:19:30 +03:00
Alexey S
79e3d8108c
TD-158: Add new ci (#6) 2022-02-09 18:21:50 +03:00
ndiezel0
9c5c65bf04
ED-69: Split implementation (#610)
* BUSINESS-160: Respect allocation terms in terms computations (#576)

* Support reducing allocation terms
* Fix naming as of rbkmoney/damsel@a2509fc

* ED-69: Implement Cashflow (#586)

* Revert "Revert "ED-69: Implement new cashflow (#577)" (#585)"

This reverts commit a76f6ee905.

* ED-69: Fix migration from master to epic/split

* ED-69: Add allocations (#587)

* ED-69: Add allocations

* ED-69: Add validation

* ED-69: Update damsel

* ED-69: Fix compile

* ED-69: Add allocation refund

* ED-69: Compact transactions

* Update apps/hellgate/src/hg_allocations.erl

Co-authored-by: Артем <WWW_cool@inbox.ru>

* ED-69: Rename Params -> Data

* ED-69: Some changes to allocation work

* ED-69: Add non-working eunit test

* ED-69: Fix bugs and make test work

* ED-69: Fix bugs and make more tests

* ED-69: Fix some specs

* ED-69: Fix dialyzer and format

* ED-69: Redo allocation refund into subtraction

* ED-69: Integrate allocation subtraction to refund

* ED-69: Add headers, return tests to working conditions and update damsel

* ED-69: Review fix

* ED-69: Review fix

* ED-69: Review fix

* ED-69: Review fix

* ED-69: Fix tests

* ED-69: Add validation for aggegator clash

* ED-69: Review fix

* ED-69: Review fixes

* ED-69: Add cashflow usage

* ED-69: Fix cashflow

* ED-69: Format

* ED-69: Review fixes

* ED-69: Fix collect_refund_cashflow/10

* ED-69: Review fix

* ED-69: Various fixes

* ED-69: Fix tests

* ED-69: Format

* ED-69: Fix lint

* ED-69: Add list of shops to multiple_payment_institutions error

* ED-69: Fix specs

* ED-69: Review fixes

* ED-69: Review fix

* ED-69: Review fix

* ED-69: Review fixes

* ED-69: Review fixes

* ED-69: Fix compile

* ED-69: Review fixes

* ED-69: Review fixes

* Update apps/hellgate/src/hg_allocation.erl

Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>

* ED-69: Review fixes

* ED-69: Review fixes

* ED-69: Fix test

* ED-69: Add tests

* ED-69: Format

* ED-69: Fix tests

* ED-69: Review fixes

* ED-69: Review fix

* ED-69: Review fix

* ED-69: Move allocation tests to test/*

* ED-69: Format

* ED-69: Fix lint

* ED-69: Fix spec

Co-authored-by: Артем <WWW_cool@inbox.ru>
Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>

* ED-69: Fix merge

* ED-69: Update damsel to master

Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
Co-authored-by: Артем <WWW_cool@inbox.ru>
2021-10-22 16:02:13 +03:00
yuri-bukhalenkov
baaf8ad7de
ED-110: dictionaries replacement (#575)
* added payment system objects

* updated dominant image

* updating hg_payment_tool

* added payment-system and crypto-currency objects

* refactored hg_dummy_provider:make_payment_tool

* refactored hg_dummy_provider:make_payment_tool (part II, mobile-commerce)

* added payment-token object

* updated party-management docker image reference

* mobile commerce tests

* payment_with_offsite_preauth (jcb payment system) tests

* payment service (terminals) tests

* payment service (wallet) tests

* erlformat

* added payment system (no_preauth mastercard) tests

* payment system (visa wo cvv) tests

* payment system (visa no_preauth) tests

* payment system (visa unexpected_failure) tests

* payment system (visa unexpected_failure_no_trx) tests

* payment system (visa preauth_3ds) tests

* tokenized bank card tests

* payment system (visa scenarios) tests

* direct recurent tests

* invoice adjustment tests

* customer tests

* recurrent paytools tests

* some prepearing for tests

* crypto-currency tests

* running chargeback tests consistently

* added payment adjustment test
2021-09-14 12:22:14 +03:00
Yaroslav Rogov
9dd99ab584
ED-190/deps: Update dmt_client (#582)
* ED-190/deps: Update dmt_client

* ED-190/deps: Update dmt_client

* ED-190/deps: Update dmt_client and update usage

* ED-190/test: fix customer tests

* ED-190/test: fix direct recurrent tests

* ED-190/test: Fix tests

* ED-190/test: Fix tests (probly?)

* ED-190/test: fix typo

* ED-190/test: fix adjustments tests

* ED-190/refactor: Fix dialyzer errors

* ED-190/refactor: Fix dialyzer

* ED-190/deps: Update party_client_erlang

* fix: remove party-management

* ED-190/test: return sleep

* ED-190/test: Fix compute_terms order

* ED-190/test: Probly fix test?
2021-08-26 19:07:58 +03:00
yuri-bukhalenkov
cfb0c20ec0
ED-97: switching to external pm (#578)
* switching to external pm

* switched to party client for some tests (in hg_invoice_tests_SUITE); removed party_management tests

* removed party_management, pm_proto, pm_client apps

* fixed tests

* replaced hg_client_party with party_client (part I, hg_invoice_template_tests_SUITE)

* replaced hg_client_party with party_client (part II, hg_invoice_tests_SUITE)

* fixed merging issues

Co-authored-by: r.shaidullin <ndiezel0@gmail.com>
2021-07-26 12:59:34 +03:00
Andrew Mayorov
016faf528c
Bump to rbkmoney/damsel@cc2875b carefully (#571)
* Adapt party machine transmutations facilities to support it
* Encode party state snapshots as thrift binary
* Avoid excessive party event decoding
* Add eventsink consistency testcase to partymgmt
2021-06-01 14:42:21 +03:00
Boris
0dcc31939d
Fix del legacy routing detection (#559) 2021-05-17 09:55:48 +03:00
dinama
c4eb9b4138
upgrade: +image +deps +endpoints (#535) 2021-01-31 17:39:04 +03:00
Roman Pushkov
6d4caf7548
HG-495: chargebacks (#346)
* wip chargeback handler

* add chargeback test draft

* update deps

* update deps

* create chargeback draft

* add create chargeback to client

* create chargeback test draft

* update dmsl

* update test

* cashflow wip

* update payment events

* update deps

* attempt fix deps

* update dmsl

* update test

* add get payment chargeback to client

* add get payment chargeback handler

* cashflow wip

* fix linter errors

* wip create chargeback

* damsel update

* fix dmsl

* update dominant

* merge cb terms

* update id generation

* add test placeheolders

* update hg client

* add update chargeback

* update client

* update tests

* update events

* add implementation wip

* update cancel

* update tests

* update damsel

* add more chargeback tests

* update implementation

* update dominant

* update damsel

* some fixes

* add reopen tests with hold funds

* update reopen logic

* udpate damsel

* add cancel after reopen test

* add cancel after reopen implementation

* add more tests

* add balance checks to tests

* cashflow fix

* add more balance checks in tests

* fix cashflow bug

* add tests for reopening chargebacks after failures

* add reopen after failures handling

* finalise test to be sure

* fix test

* do not change payment status on accept with partial cash

* remove failures from tests

* update damsel

* test updates and fixes

* update implementation

* update damsel

* type cleanup, some refactoring

* cleanup, remove ct:print, refactor

* minor cleanup

* update tests

* add inconsistent currency check

* udpate damsel

* update tests

* udpate damsel

* move chargebacks to separate module

* move chargebacks to a separate module

* fix types

* some refactoring

* types, some refactoring

* update damsel

* update dominant + minor

* update tests

* update implementation

* update damsel

* fix merge

* fix lost types

* add cash to pending, remove from cb changed

* update damsel

* update damsel

* update dominant

* minor

* update events

* add params to reject

* update damsel

* update tests WIP

* update invoice payment

* update chargebacks WIP

* update tests

* update damsel

* update events

* update invoice payment

* update chargeback implementation

* minor cleanup

* increase god module cap a bit

* cleanup

* update events

* update damsel

* update tests wip

* update implementation wip

* update events in tests

* update damsel

* update chargeback events

* clean prints, restore cash flow handling on first reopen, reset target status

* fix dialyzer

* update tests

* update cash flow handling and reject logic

* fix indentation

* refactoring, moved activities to chargebacks module

* move process result to chargeback

* fix config formatting

* move no pending chargebacks check to invoice

* move getters to chargebacks module

* idempotent creation

* merge party cb terms

* syntax fixes

* fail routing with no chargeback terms

* move choose_provider_account to payment institution

* fix export

* remove unnecessary validations

* revert accessibility validation

* fix deletion

* minor refactoring

* remove pending chargebacks check from invoice

* Fix postgresql link (#421)

* refactor chargeback activity, fix idempotency

* update tests

* update dmsl

* add cb to varset

* fix

* removed get_opts, set_opts

* clean up chargebacks

* update deps

* move choose_external_account

* fix types

* add todo for cash flow rework

* remove redundant aliases

* unified define_params_cash function

* remove contract validation

* remove contract validation

* cash flow handling rework, docs update

* remove redundant validation

* fix merge

* add partial capture chargeback test

* add separate plans for stages

* wrap events externally

* add partial payment chargeback test with exceeding body

* fix type errors

* rework event handling

* elvis update

* cleanup

* move pending chargebacks check

* move validations

* move more validations

* separate body and levy in cash flow

* minor

* update cb options

* minor rename

* disable cancel during initialisation

* update activity naming

* set operation_amount to 0 on reject

* update merge_change validations

* update test chargeback test fixture

* use remaining amount if body is undefined

* add double chargeback test

* fix wrong types

* move some validations

* move create validations, update opts

* longer hold period for capture

* update damsel

* add chargeback service terms validation

* add chargeback not allowed test

* minor cleanup

* tests cleanup, add chargeback fees placeholder

* add test placeholders for provider levy

* split service and provision cf contexts

* fix typo

* update dominant

* export hg_cashflow:compute_volume/2

* update test fixture

* implement provider levy

* formatting

* update tests

* fix types

* fix types

* prolong test timeout

* merge update

* reduce allow predicate

* cb provider levy cash flow update

* cleanup

* add chargebacks to reduce

* add eligibility validation

* fix chargeback terms reduction

* throw misconfiguration if allow can not be reduced

* use add_previous_stage function

* fix type errors

* update cancel handling, store last cash flow, use cb creation timestamp, cleanup

* update hg client

* update damsel

* update tests

* add occurred_at to invoice event

* update params macros

* implement occurred_at

* export cancel params

* disable flappy tests

* fix typo

* simplify occurred_at extraction

* restore explicit clause matching in finalise

* clean ct:prints

* fix whitespace

* attempt at unflapping tests

Co-authored-by: Sergey Yelin <elinsn@gmail.com>
2020-03-27 12:58:41 +03:00
ndiezel0
4657aeb0e9
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
Andrey Fadeev
d3fcf20510
HG-484 Encode MG calls with thrift (#329) 2019-06-17 15:55:36 +03:00
Артем
798e4412a8
HG-455: Partial capture (#284) 2019-02-04 14:44:38 +03:00
Evgeny Levenets
669fdab027 HG-145: party management improvements (#62) 2017-01-31 23:02:03 +03:00
Andrew Mayorov
0e7f75bd9f HG-61: Implement renewed invoicing service protocol (#35)
* HG-64: Implement renewed invoicing protocol

 * Bump damsel to rbkmoney/damsel@5e264e0

* HG-64: Relax the linter and fix a spec error

* Hg-64: Fix incorrect specs

* HG-64: Bump machinegun w/ bugfix
2016-10-14 20:27:22 +03:00
Andrew Mayorov
ee85cc90d4 HG-49: Provide basic party management implementation (#20)
* HG-49: Provide basic party management implementation

* Bit simplified machine interfaces
* Tests split into three different modules
* Verify history consistency in each test suite

* HG-49: Switch temporarily to damsel fork

* HG-49: Ensure to throw in case of empty machine history too

* HG-49: Implement claim revocation + tests

* HG-49: Switch temporarily to damsel fork

* HG-49: Include and fix claim related tests in the suite

* HG-49: Implement claim acceptance / denial, no access control yet

* HG-49: Switch temporarily to damsel fork

* HG-47: Fix naming of claim status tags in line w/ proto

* HG-49: Implement pending claim retrieval

* HG-49: Implement shop management w/o proper acceptance flow for now

* HG-49: Introduce preliminary pending claims management

* HG-49: Split monolithic client into pieces service-wise

* HG-49: Fix copypasta artifact in a header guard

* HG-49: Make any new shop suspended initially

* HG-49: Use sequences instead of unique ids for shops / claims

* HG-49: Reference specific coredocs documents in the implementation

* HG-49: Employ generic unwrap, which raises error when fed w/ error tuple

* HG-49: Season complex code fragments w/ comments

* HG-49: Provide meaningful revocation reason

* HG-49: Simplify exception handling a bit in hg_party

* HG-49: Please the Linter

* HG-49: Provide moar tests
2016-09-22 15:25:41 +03:00
Andrew Mayorov
b12a8b2c66 Implement event sink and event filtering (#11)
* HG-40: Implement EventSink + remap invoice events

* HG-40: Simplify machine code a bit

* HG-40: Fix eventsink handlers wrt to woody specs

* HG-40: Introduce eventsink tests + fix a couple of bugs alongside

* HG-40: Bump thrift runtime dep

* HG-45: Implement internal events and event filtering

* HG-45: Start checking sequnces in tests

* HG-45: Bump woody dep version

* HG-45: Remove unused module

* HG-45: Move sequencing out of hg_machine, fix it and test it

* HG-45: Switch to proper damsel fork

* HG-45: Shut the elvis up since I've no idea how to not repeat yourself in test suites

* HG-40: Update CI env definition + provide reasonable defaults for tcp endpoint

* HG-40: Revert UserInfo removal
2016-08-02 17:06:39 +00:00
Andrew Mayorov
ceb2013c89 HG-3: Add stubbed invoice machine and all the wiring (#2)
* HG-3: Add stubbed invoice machine and all the wiring

* HG-3: Bump damsel to a proper revision

* HG-3: Get rid of precompile hook to make submodules work

* HG-3: Add missing elvis config

* HG-3: Switch to proto fork temporarily

* HG-3: Merge dispatcher activities w/ machine behaviour

* HG-4: Switch to new proto fork temporarily

* HG-3: Avoid `submodule init` on every make invocation

* HG-3: Allow to pass datetime in both native and iso8601 format

* HG-4: Switch to new proto fork temporarily

* HG-4: Adapt to new protocol + internal & external events

* HG-3: Switch to proto fork already

* HG-21: Add containerization maketargets

* HG-4: Fix interfaces and add missing activities

* HG-4: Switch to new proto fork temporarily

* HG-6: Fix ruble currency code

* HG-4: Fix interface issues

* HG-4: Add default config

* HG-4: Switch to new proto fork temporarily

* HG-4: Start filling provider proxy interaction in

* Publish TODOs

* HG-4: Stub a provider proxy w/ settings from app env

* HG-4: Fix copypasta

* HG-4: Add dummy provider proxy, to be moved into testsuite

* HG-4: Switch to new proto fork temporarily

* HG-21: Remove nonfunctional target dependencies

* HG-4: Rename hg_action to make its objective clearer

* HG-4: Simplify interface address manipulation

* HG-4: Compile proxy related thrift files

* HG-4: Switch to new proto fork temporarily

* HG-4: Update TODOs

* HG-4: Isolate service specs and put them to the proto lib

* HG-4: Move dummy provider into the test dir

* HG-4: Fix getting events with respect to proto update

* damsel@24a247b

* HG-4: Introduce hg client + add preliminary test suite

* HG-4: Merge woody handler with invoice module

* HG-4: Fuse processor handler with machine

* HG-4: Harden the build + fix typing errors alongside

* HG-4: Add happy payment testcase + stateful client

* HG-4: Update gitignore rules with respect to wercker beta

* HG-4: Stash a couple of items into TODO

* HG-4: Make trivial behaviour for test provider(s)

* HG-4: Update elvis rules + lint tests' code

* HG-4: Make UserInfo a part of the client + simplify test code with macros

* HG-4: Cleanup dirty proxy state after testcases

* HG-4: Rename test_provider to a wider test_proxy

* HG-4: Explicitly mention requirement on manually started mgun
2016-06-15 19:10:22 +03:00