Commit Graph

87 Commits

Author SHA1 Message Date
dinama
e1932c161a
+party management w/o domain cache (#608) 2021-10-25 15:43:44 +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
dinama
2fda331052
ED-242: +fix woody_api_hay +update composer (#593) 2021-08-24 18:39:33 +03:00
dinama
0c6bcf6346
ED-245: +rbkmoney/damsel#700 +format (#591) 2021-08-24 08:24:45 +03:00
Boris
8c607c633b
ED-157: Choose route without limit overflow (#583) 2021-08-05 18:02:44 +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
Boris
6f6be75b32
ED-156: integration with limiter (#574) 2021-06-23 14:08:28 +03:00
Boris
3df4ea5c89
MSPF-628: Add proto limiter integration (#534) 2021-03-02 22:34:19 +03:00
dinama
490958222b
+upgrade all +fix after upgrade (#531) 2020-12-24 12:12:05 +03:00
dinama
fda1c15220
update build env (#525) 2020-12-09 17:36:14 +03:00
Alexey
eabde5f5c6
CAPI-430: Add last_transaction_info to payproc_InvoicePayment (#522) 2020-12-09 14:54:16 +03:00
Sergey Yelin
71132630ea
Add risk coverage to provider (#505)
* Add risk_coverage handling

* Pass RiskScore to provider acceptor

* Make risk coverage selector optional

* Remove dead code

* Add tests for routing

* Routing tests cleanup

* Fix dialyzer

* Localize varset/0 type

* Formatting

* Remove comment

* Add tests to rule sets

* Make provider cover operation with lower risk score

* Rewrite risk compirision logic

* Formatting

* Update dominant
2020-11-12 17:29:09 +03:00
Toporkov Igor
3bdc2a01f9
DC-127: Payment methods refactoring (#445)
* Use corresponding epic damsel branch

* Bump dominant

* Migrate to new bank_card payment method representation

* Simplify guard clause

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

* Delete invalid clauses in hg_payment_tool:get_method/1

* Remove marshaling that we don't use anymore

* Correctly unmarshal tokenization_method

* Revert "Correctly unmarshal tokenization_method"

This reverts commit 6f14eefd003e3f80d087db97ca63c4ccc85152d8.

* Do not unmarshal tokenization_method because it will never be there

* Use old (_deprecated) payment methods

* Replace has_cvv with is_cvv_empty

* Upgrade damsel

* Delete outdated comentaries

* Return ordset of payment methods

* Upgrade dominant

* Upgrade damsel

* Add tokenization_method to bank_card_deprecated

* Rename function in hg_payment_tool, create function to test if payment method is supported

* Simpilfy and rename payment methods matching

* Export hg_payment_tool:get_possible_methods/1

* Upgrade damsel

* Fix mising old bank card reference

* Bump dominant

* Fix construct_payment_method

* Upgrade deps

* Suffix with _derprecated payment methods

* Bulk update deps

* Mark deprecated pms introduced by merge

Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
2020-07-29 15:02:00 +03:00
Toporkov Igor
7bf0359c39
DC-122: Remove risk_coverage from Terminal (#459)
* Hard remove all risk_coverage-related code

* Upgrade dominant

* Remove risk_coverage from test terminals, rework routing tests so they pass

* Fix merge artifact

* Kek

* Remove outdated comment

* Improve test readability

* Delete trailing whitespaces
2020-07-14 16:40:04 +03:00
Andrey Fadeev
5bbac2a626
MSPF-561 Add new provider terms usage (#454) 2020-07-06 10:58:37 +03:00
Andrew Mayorov
710f8ebe73
DC-120: Implement criteria in predicates (#453)
See rbkmoney/damsel#582
2020-06-23 17:00:46 +03:00
Boris
03302b8788
MSPF-562: Add bank card category, condition category_is (#448) 2020-06-11 17:17:05 +03:00
Alexey
24a7c3b1ec
FF-183: Upgrade damsel (#441) 2020-05-29 11:01:33 +03:00
Артем
ff2426f008
DC-123: P2P templates (#435)
* updated damsel

* added support for template terms

* added test for p2p template terms

* fixed merge

* minor
2020-05-08 13:29:43 +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
Артем
80e7ab2f35
FF-160: Add w2w transfer (#425)
* added w2w transfer

* updated dominant

* fixed
2020-02-18 14:05:00 +03:00
Sergey Yelin
915b9c7c26
Fix link to pestgresql image (#422) 2020-02-14 15:12:35 +03:00
Sergei Shuvatov
a930b2ce44
Update machinegun (#402) 2019-12-16 19:57:26 +03:00
Boris
4fa2f207bd
FF-124: P2P upd damsel, LifetimeSelector (#387) 2019-11-07 16:31:24 +03:00
Boris
a607d61e17
add P2PServiceTerms: allow, quote_lifetime (#382) 2019-10-29 12:12:03 +03:00
Boris
d10c319129
add P2PServiceTerms (#369) 2019-10-17 17:33:16 +03:00
Sergey Yelin
befb5ad398
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 1f96b4a0d3.
2019-10-15 13:17:42 +03:00
Boris
a748639f14
add mobile_commerce; add tests; suspend timeout behaviour (#340) 2019-08-19 17:16:16 +03:00
Toporkov Igor
c9440fd0bf
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 Yelin
7d1dfc7081
Allow stop shumway manually (#332) 2019-08-06 13:24:20 +03:00
Артем
0967906b78 HG-490: Weight to provider choose (#338)
* added some weight to provider choose

* some changes

* added weight tests

* nano

* minor

* nano

* fixed

* fixed

* refactored

* minor
2019-07-23 15:44:34 +03:00
Sergei Shuvatov
9270f44a28
HG-472: add terminal priority (#318) 2019-06-24 18:51:50 +03:00
Sergey Elin
e0aebb7dbd
Switch to logger (#335)
* Revert "HG-478 Revert update to Erlang 21 (#320)"

This reverts commit 7179e82258.

* 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
35c64b9202
HG-477: Allow provider fee selection by terminal (#314)
* update gitignore

* add terminal_is condition test to hg_condition

* add terminal to varset

* use terminal in routing varset

* update tests to use terminal_is condition

* update dmsl and dominant

* fix dialyzer

* revert, use optional fields in payment terms

* add support for optional fields in terminal terms

* update damsel, dominant

* add custom fee to a terminal in tests

* update dominant

* revert terminal_is check in hg_condition

* more explicit naming

* add cashflow override test

* terminal holds and refunds override provider
2019-05-31 12:03:58 +03:00
Sergey Elin
4b9804fade
Add crypto currency (#326) 2019-05-24 11:40:32 +03:00
Sergey Elin
0b3e517400
Upgrade to Erlang 21 (with lager) (#322)
* MSFP-433: Erlang 21 with lager
2019-05-20 14:59:29 +03:00
Andrey Fadeev
7179e82258
HG-478 Revert update to Erlang 21 (#320)
* Revert "MSFP-433: Fix badmatch in woody (#316)"

This reverts commit c9174907a2.

* Revert "Upgrade woody (#315)"

This reverts commit e1ed162497.

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

This reverts commit faf7d595dd.
2019-05-17 11:52:11 +03:00
Sergey Elin
faf7d595dd
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
Boris
eb1f950f66
HG-459 Events serialize/deserialize in thrift binary (#303) 2019-04-09 09:34:25 +03:00
Артем
caaeea40e6
HG-463: Partial capture permit (#291) 2019-02-27 10:31:04 +03:00
Артем
3426c48623
HG-460: Empty cvv (#289) 2019-02-26 14:46:14 +03:00
Alexey
8d7f618f6f
DC-111: Add subagent account (#286) 2019-01-29 15:41:43 +03:00
Evgeny Levenets
d1879d79a2
DC-104: bump damsel to work with new domain config (#285)
rbkmoney/damsel@1c28959
2019-01-25 16:02:25 +03:00
Alexey
6b9cabca52
DC-102: Bank card routing with data from binbase (#259) 2018-10-12 17:56:35 +03:00
Артем
f817b6a859
HG-437: Fix anti fraud bypass (#255) 2018-10-03 11:44:21 +03:00
Артем
193d5abf6e
HG-414: Added bypass antifraud (#241) 2018-09-17 13:45:36 +03:00
Evgeny Levenets
1ae0c4b1f3
HG-354: add contractors and wallets in party (#205) (#221)
* HG-354: add contractors and wallets in party (#205)

* switch to epic damsel

rbkmoney/damsel@3af8098

* add support for wallet blocking & suspension

* contractor modification support

* wallet modification support

* fix account creation side effects

* add minimal tests

* add wallet blocking & suspension tests

* add simple checks for contractor & wallet

* new checks & exceptions for wallets & contractors

* add marchaling for old events

* add catch-all clause to claim effect marshaling (#222)

* HG-379: add wallet service terms support (#223)

* HG-379: add wallet service terms support

* maybe

* replace `shop` with `shop_id` in varset

* check wallets terms for currencies instead of payment terms

* fix tests

* make identification level for legacy contracts more correct

* Bump to rbkmoney/damsel@3549c635

* Switch to master rbkmoney/damsel@36907b0e

* Switch to master rbkmoney/dominant@4e296b03

* Attempt to easily fix test failures

* Attempt to fix test failures
2018-07-17 20:00:44 +03:00
Evgeny Levenets
6bccc80200
Acts second try (#214)
* Revert "Revert "HG-370: support reporting preferences modification (#208) (#209)" (#212)"

This reverts commit 03ad14a90e.

* fix PayoutScheduleRef unmarshalling
2018-05-17 17:56:43 +03:00
Anton Belyaev
03ad14a90e
Revert "HG-370: support reporting preferences modification (#208) (#209)" (#212)
This reverts commit 4d18057b84.
2018-05-16 20:40:14 +03:00