Commit Graph

401 Commits

Author SHA1 Message Date
Andrew Mayorov
710f8ebe73
DC-120: Implement criteria in predicates (#453)
See rbkmoney/damsel#582
2020-06-23 17:00:46 +03:00
Sergey Yelin
59ec584071
P2C-8: Add attempt_limit (#452)
* P2C-8: Add attempt_limit

* Add missing merge

* Fix order
2020-06-22 18:21:22 +03:00
Andrew Mayorov
c2aed8c2d3
Refrain from synthesizing events on adjustment capture (#450) 2020-06-18 23:39:49 +03:00
Toporkov Igor
e558d123ed
DC-126: Add tokenization_method field (#449)
* Support tokenization_method field and condition

* Split very long line

* Threat none same as undefined when comparing tokenization methods

* Allow whatever payment method if condition is undefined

* Handle undefined tokenization method with defined tokenization method condition
2020-06-17 09:59:23 +03:00
Boris
03302b8788
MSPF-562: Add bank card category, condition category_is (#448) 2020-06-11 17:17:05 +03:00
Roman Pushkov
c42601e2c0
HG-529: add disable failover routing option (#447)
* Temporarily revert second part of HG-538

This reverts commit 7f23d74bf7.

* 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
Andrey Fadeev
c2a1d07c31
Fix invoice expiration timeout set on finalized invoices (#442) 2020-06-03 20:23:29 +03:00
Roman Pushkov
7eea076a4d
Temporarily revert second part of HG-538 (#444)
This reverts commit 7f23d74bf7.
2020-06-03 20:23:10 +03:00
Roman Pushkov
7f23d74bf7
HG-538: fix possible hg and shumway disparities (#434)
* add failure activity

* add refund failure test

* add payment error handling placeholder

* minor cleanup

* add refund handling placeholders

* add events

* update event handling

* remove failure from state on status change

* update actions

* uncomment new changes

* update tests

* cleanup

* Update rebar.lock

* remove redundant clauses and activities

* Update apps/hellgate/src/hg_invoice_payment.erl

Co-authored-by: Andrey Fadeev <me@ciiol.net>

Co-authored-by: Andrey Fadeev <me@ciiol.net>
2020-06-03 13:08:23 +03:00
Roman Pushkov
37b8b08f01
HG-538: fix possible hg and shumway disparities, backwards compatibility (#438)
* add failure activity

* add refund failure test

* add payment error handling placeholder

* minor cleanup

* add refund handling placeholders

* add events

* update event handling

* remove failure from state on status change

* update actions

* Update rebar.lock

* revert action changes

* cleanup
2020-05-26 23:15:18 +03:00
ndiezel0
05e6c7ad91
HG-452: Further remove party management from hellgate (#433)
* HG-452: Further remove party management from hellgate

* HG-452: Add ComputeP2PProvider, ComputeWithdrawalProvider, ComputePaymentProvider implementation

* HG-452: Add ComputePaymentProviderTerminalTerms implementation

* HG-452: Add ComputeP2PProvider test

* HG-452: Fix test

* HG-452: Fix p2p provider test

* HG-452: Add the rest of the tests

* HG-452: Fix lint

* HG-452: Debug tests

* HG-452: Remove debug

* HG-452: Review fix
2020-05-25 13:50:45 +03:00
Roman Pushkov
c70299de31
HG-540: cash flow data in chargebacks (#440)
* update damsel

* add get_cash_flow to chargebacks

* update get_chargebacks/1

* okay, that looks weird

* typo fix

* oh come on

* typo fix

* update damsel

* handle get_chargebacks
2020-05-25 11:32:21 +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
Andrey Fadeev
d14323d6f0
Use explicit timestamp to compute merchant terms (#436)
Also remove invoice timestamp usage in refund and payment terms computation
2020-05-07 15:59:21 +03:00
Boris
46398c3529
HG-539: change count refund amount without cash (#432) 2020-04-22 16:33:39 +03:00
Andrey Fadeev
6a6f193b72
Interpret undefined selector as a reason for route rejecting (#429)
... instead of failing with fucntion clause
2020-04-14 20:30:39 +03:00
Andrey Fadeev
3bfae85f23
Fix cash_flow in payment state asfter partial capture (#431) 2020-04-14 19:05:24 +03:00
Alexey
f5a7fc18a2
HG-535: Assert invoice payable (#428) 2020-04-06 12:28:00 +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
Артем
49335d6697
FF-163: Fix - P2P tool condition test (#427) 2020-03-13 12:55:24 +03:00
Sergei Shuvatov
cf65a27efd
HG-525: add payment status adjustment (#414) 2020-03-12 13:17:13 +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
Sergei Shuvatov
38f908b2c0
MSPF-532: get rid of rfc3339 library (#424) 2020-02-26 20:53:09 +03:00
Артем
80e7ab2f35
FF-160: Add w2w transfer (#425)
* added w2w transfer

* updated dominant

* fixed
2020-02-18 14:05:00 +03:00
Andrey Fadeev
da908c684e
PROX-386 Add shop to RecurrentTokenInfo in ProviderProxy.GenerateToken (#417) 2020-01-30 08:37:12 +03:00
Sergei Shuvatov
6cc97552b9
HG-533: actualize claim management protocol (#415) 2020-01-28 20:37:36 +03:00
Артем
c299b9ffd6
Revert "HG-469: Validate recurrent route (#410)" (#416)
This reverts commit 3460f019f0.
2020-01-28 18:54:02 +03:00
Roman Pushkov
42e9ffa76f
HG-532: add qps, zotapay (#413)
* add zotapay to payment tool

* add qps to payment tool
2020-01-24 14:17:38 +03:00
Артем
3460f019f0
HG-469: Validate recurrent route (#410)
* validate recurrent route

* added fixes and test

* added requested changes

* fixed test

* added requested changes

* Update apps/hellgate/src/hg_invoice_payment.erl

Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com>

* added requested changes

Co-authored-by: Andrew Mayorov <encube.ul@gmail.com>
2020-01-22 14:45:32 +03:00
Andrew Mayorov
4aa61fdecc
Properly accrue waiting timing on capture start (#412) 2020-01-19 18:48:55 +03:00
Roman Pushkov
7f2f71cf1e
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
Roman Pushkov
a71b36b6ac
HG-526: handle cancel, capture business error (#405)
* add test

* fix failure

* update test

* add capture test

* add capture handling

* Revert "add capture handling"

This reverts commit 1a86a86b9c9552d0785bd2e9954f04f60a758eca.

* update tests

* fail on unsuccessful cancel

* revert activity changes
2019-12-26 17:19:29 +03:00
Andrew Mayorov
fe9186a6c2
Measure and log some timings over business events (#400) 2019-12-17 13:27:01 +03:00
Sergei Shuvatov
a930b2ce44
Update machinegun (#402) 2019-12-16 19:57:26 +03:00
Andrey Fadeev
eee8bf3d78 Add invoice id to conversion operation id in fault-detector call (#397) 2019-12-16 13:58:57 +03:00
Sergey Yelin
7f5fb02eac
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
d241bf0797
BJ-703: Add wechat and alipay to payment tool (#396)
* BJ-703: Add wechat and alipay to payment tool

* Fix tests
2019-12-12 07:15:17 +03:00
Sergey Yelin
3a83357b19
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
629f4b44a0
HG-527: recurrent paytool eventsink sequence (#391)
* update damsel

* update recurrent paytool client

* update eventsink client

* update event provider

* update recurrent paytool

* more recurrent paytool client updates

* revert event sink client changes

* finalise event sink test

* dialyzer fix

* review fixes

* review updates

* improve recurrent paytool eventsink test

* fix linter error
2019-12-05 14:18:38 +03:00
Alexey
e3ed327105
Switch to thrift binary serialization (#392) 2019-12-04 13:30:17 +03:00
Roman Pushkov
bf817253ea
HG-528: fix availability routing bug (#393) 2019-12-03 17:33:40 +03:00
Alexey
95cd979245
MSPF-424: Event marshalling compatability (#390) 2019-11-28 15:44:23 +03:00
Alexey
ee06f5fa01
MSPF-424: Serialize events as thirft binaries (#365) 2019-11-28 12:14:49 +03:00
Roman Pushkov
d3bca257e3
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
4585fd1fcc
HG-524: add info to invoice payment (#389)
* Update damsel

* Add route and cacheflow

* get_refunds() -> get_legacy_refunds()

* Add sessions and refunds(without session yet)

* Fix session conversion

* Rename

* Simplify sort

* session -> sessions for list of session

* Replace legacy_refunds with new refunds

* Fixes

* Remove get_legacy_refund/1

* Check refunds instead of legacy_refunds

* Use list of sessions for every target

* Simplify sessions mapping
2019-11-19 19:13:54 +03:00
Alexey
9976823ef2
Revert "Revert "HG-518: Route change reporting" (#386)" (#388) 2019-11-15 17:17:12 +03:00
Sergei Shuvatov
122a06ff12
HG-522: reject fail_session repair in preprocessing state (#384) 2019-11-08 13:06:42 +03:00
Boris
4fa2f207bd
FF-124: P2P upd damsel, LifetimeSelector (#387) 2019-11-07 16:31:24 +03:00
Andrey Fadeev
872d1db9e7
Add back activity check in cancel start (#385)
* Add back activity check in cancel start

This fixes change from rbkmoney/hellgate#356
2019-11-06 22:19:06 +02:00
Andrey Fadeev
7a1cfc658c
Revert "HG-518: Route change reporting" (#386)
This reverts commit db9c73eb0e.
2019-11-06 20:50:48 +02:00
Alexey
db9c73eb0e
HG-518: Route change reporting (#373) 2019-11-01 13:55:44 +03:00
Alexey
4fa6ee92d5
HG-521: Add route to InvoicePayment (#383) 2019-10-31 13:02:38 +03:00
Boris
a607d61e17
add P2PServiceTerms: allow, quote_lifetime (#382) 2019-10-29 12:12:03 +03:00
Boris
44194bd209
add to p2p_tool in Varset (#379) 2019-10-23 12:01:19 +03:00
Boris
d10c319129
add P2PServiceTerms (#369) 2019-10-17 17:33:16 +03:00
Alexey
a2f45678f7
Migrate to new customer and capture flow (#377) 2019-10-17 14:55:26 +03:00
Артем
d3cacaec9b HG-520: Added party revision (#378) 2019-10-17 13:23:45 +03:00
Артем
40ca65612b
HG-517: Get invoice state with range (#372)
* added get with range

* updated proto

* minor

* minor
2019-10-15 16:02:48 +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
Alexey
90e68890ef
Revert "Revert "HG-516: pass transport_opts in hg_client_api (#371)" (#375)" (#376)
This reverts commit 1f96b4a0d3.
2019-10-15 11:02:04 +03:00
Alexey
d31b0b1c9b
HG-496: Downgrade for compatibility (#374) 2019-10-14 18:22:57 +03:00
Alexey
1f96b4a0d3
Revert "HG-516: pass transport_opts in hg_client_api (#371)" (#375)
This reverts commit 952fc984f5.
2019-10-14 17:24:47 +03:00
Sergei Shuvatov
952fc984f5
HG-516: pass transport_opts in hg_client_api (#371) 2019-10-09 18:23:27 +03:00
Alexey
06aafab126
HG 496-497: Partial capture & customer binding desyncs (#356) 2019-10-04 15:25:59 +03:00
Andrey Fadeev
104ffd64c1
FF-77 Add party and domain revision to ComputeContractTerms (#370) 2019-10-04 11:49:18 +03:00
Sergei Shuvatov
c9b23a53cf
HG-515: generate uniqie tags in hg_dummy_provider (#368) 2019-10-02 15:49:13 +03:00
Sergei Shuvatov
efd0519bd2
HG-513: add minimal_payment_cost field to RecurrentPaymentTool (#366) 2019-09-26 12:53:41 +03:00
Toporkov Igor
137ceb9e66
MSPF-456: Processing deadline (#352)
* Added payment deadlines

* Actualized code to match damsel, added deadline check

* Rewrote deadline check, added env deadline support

* Removed deadline creation

* Moved and renamed processing deadline validation

* Removed extra clause

* Codestyle fixes

* Handle payment_deadline_reached failure

* Added processing deadline test

* Added tests for different flows

* Uncommented tests

* Removed unnecessary sleeps from tests

* Check target type in validate_processing_deadline

* Stop session processing after deadline validation

* Fix test

* Review fixes

* Fixed a bunch of tests
2019-09-16 17:49:20 +03:00
Sergey Yelin
83925e1856
HG-503: Add GetStatus API call for PartyManagement (#361)
* HG-503: Add GetStatus API call for PartyManagement

* Typo
2019-09-10 15:41:44 +03:00
Sergei Shuvatov
4420f93174 HG-494: add claim committer (#357)
* HG-494: add claim committer

* HG-494: review fixes

* Replace boilerplate with macroses

* More macros

* More macroses

* More macroces - 2

* More macroses - 3

* More macroses - 4

* More macroses - 5

* More macroses - 6

* Rename funcions

* Remove contractor_identity_documents_modification (will be removed from
proto)

* More fixes

* Remove identity docs from claimant management proto
2019-09-09 18:10:55 +03:00
Boris
d6c6cfdf3c
HG-502 fix bug(suspend to sleep) (#360)
add suspend timeout behaviour; 
tests
2019-09-06 16:01:10 +03:00
Roman Pushkov
05ea941b15
HG-501: handle uncomputable provider terms (#359)
* add uncomputable terms test

* catch misconfiguration errors

* clean comments

* fix copypasta

* add logging for misconfigured termsets

* clean up comments

* fix types

* update logging

* warn -> warning

* fix unbounds

* refactor logging

* fix dialyzer

* fix tests

* renames
2019-09-06 12:53:59 +03:00
Alexey
4423214a7f
CAPI-366: Refund idempotency (#341) 2019-08-26 18:28:04 +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
Alexey
8b8bf58c00
HG-496: Upgrade damsel (#349) 2019-08-08 15:28:49 +03:00
Andrew Mayorov
703119c515
Enable healthcheck logging (#350)
* rbkmoney/logger_logstash_formatter@b53af86
* rbkmoney/woody_erlang_user_identity@6eca18a
* rbkmoney/erlang-health@c190cb8
2019-08-08 14:59:08 +03:00
Andrey Fadeev
335cd3c311
Allow to work with unexpected session finish in repaired invoice (#347) 2019-07-30 17:42:51 +03:00
Andrey Fadeev
1013a02b68
Change hellgate dependencies start order (#344) 2019-07-25 20:41:15 +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
Roman Pushkov
3f8338dc2a
CAPI-369: tds interaction (#339)
* update damsel

* add wallet with token to tests

* update tests

* remove redundant test
2019-07-18 00:06:55 +03:00
Sergey Elin
cf21615aeb
Remove logger_logstash_formatter from hellgate deps (#337) 2019-07-10 12:30:07 +03:00
Alexey
dc10d43ad9
HG-458: Move refund and adjustment accounter interactions to processor (#333) 2019-07-04 17:40:18 +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
Andrey Fadeev
d3fcf20510
HG-484 Encode MG calls with thrift (#329) 2019-06-17 15:55:36 +03:00
Roman Pushkov
8640eabfe1
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
641a5f441d
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
Артем
f27862233a HG-474: Cart to partial refund and capture (#323)
* updated dmsl, fixed

* fixed tests

* added cart validate to refund creation

* added requested changes

* added requested changes

* minors

* added requested changes

* added requested changes 2

* fix

* minor
2019-06-03 16:30:10 +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
Andrey Fadeev
93c0c08017
HG-485 Reorder main supervisor child according to dependencies (#328) 2019-05-28 11:23:52 +03:00
Sergey Elin
061001bb3e
HG-482: Improve test for crypto currency (#327) 2019-05-27 18:31:27 +03:00
Roman Pushkov
9d51ea2f46
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
4b9804fade
Add crypto currency (#326) 2019-05-24 11:40:32 +03:00
Andrew Mayorov
f349201add
Allow to turn transition validation off w/ repairs (#325)
* Add final test ensuring balances are consistent
* Bump to rbkmoney/damsel@ce5f697
* HG-482: Fix crash in new damsel
2019-05-23 17:56:47 +03:00
Andrew Mayorov
4214093437
Allow to treat invalid state transitions as warnings (#317)
* Make part of refunds testcases run in parallel
* Add final test ensuring balances are consistent
* Drop HG-418-related specifics
2019-05-20 18:13:57 +03:00
Sergei Shuvatov
6b15455875
HG-480: add additional_info test (#324) 2019-05-20 15:46:29 +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
72e23ac007
HG-478 Allow conditions in recurrent_payment_tool cost (#319)
* Add party_revision preserving
* Add varset collecting in cash validation
* Use preserved domain revision
* Use party_client in hg_recurrent_paytool
* Use party_client in hg_invoice_template
* Use party_revision from params
2019-05-17 12:50:41 +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
Andrew Mayorov
79d7dabe50
Implement payment context storing (#311)
* Bump to rbkmoney/damsel@3883e6a
2019-04-30 20:38:31 +03:00
Sergey Elin
6e12f6024c
HG-471: Added risk_score_is_too_high to no_route_found (#308)
* Added risk_score_is_too_high to no_route_found
* Update damsel
* Fix logger level for new status
2019-04-26 11:48:07 +03:00
Sergei
73d4043b00
HG-473: optimize memory consuption by dmt_client (#309) 2019-04-25 16:20:12 +03:00
Sergei
f5ca672f3f
Fix check for invoice status on payment start (#307) 2019-04-23 20:08:07 +03:00
Boris
eb1f950f66
HG-459 Events serialize/deserialize in thrift binary (#303) 2019-04-09 09:34:25 +03:00
Sergei
c82b4e62ab
HG-465: invoice creation and payment start idempotency (#306)
* Use invoice id from InvoiceParams/InvoiceWithTemplateParams if defined
* Use payment id from InvoicePaymentParams if defined
* Store external_id for invoice and payment
2019-04-08 16:12:20 +03:00
Andrey Fadeev
4a89dfc81a
HG-468 Remove temporary reindex MG call handler (#305)
Remove reindex machine call handler from #304

This reverts commit 8946494.
2019-04-05 17:24:08 +02:00
Andrey Fadeev
89464944b0
HG-468 Add temporary reindex MG call handler (#304)
This should make possible to fix rest of
rbkmoney/hellgate#299 problems
2019-04-05 10:41:13 +02:00
Alexey
faf2d4c22b
HG-467: Change payment cost to reflect the captured amount (#301) 2019-04-01 18:36:34 +03:00
Evgeny Levenets
c54a041ac5
Fix party revision checkout (second try) (#299)
* Revert "Revert "fix party checkout and revision index building (#295)" (#297)"

This reverts commit 05b6bca7bf.

* check last EventID to ensure MaxRevision is really last one

* match one-element list
2019-03-26 13:09:44 +03:00
Артем
0ddf02ff8e
Fix: + Added test for empty cvv bank card (#298) 2019-03-18 15:50:12 +03:00
Evgeny Levenets
05b6bca7bf
Revert "fix party checkout and revision index building (#295)" (#297)
This reverts commit 99f298e4dd.
2019-03-15 15:21:44 +03:00
Evgeny Levenets
99f298e4dd
fix party checkout and revision index building (#295)
* fix empty map pattern matching

* fix appending party revision index

* include new changes' revision into index
2019-03-12 14:43:07 +03:00
Alexey
f10e9a1e51
HG-461: Add manual refund handle (#292) 2019-02-28 16:30:02 +03:00
Alexey
79fc57713a
HG-457: Fix invalid maximum refund cash calculation (#294) 2019-02-28 15:59:05 +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
Andrew Mayorov
3db9373f8f
Implement custom repair machine actions (#293) 2019-02-25 18:13:34 +03:00
Andrew Mayorov
f968572f59
At least validate that changes are good when doing adhoc repair (#290) 2019-02-22 18:07:53 +03:00
Andrew Mayorov
b226b52f6a
Bump to rbkmoney/woody_erlang@d8de03d (#288) 2019-02-20 14:52:40 +03:00
Артем
798e4412a8
HG-455: Partial capture (#284) 2019-02-04 14:44:38 +03:00
Alexey
8d7f618f6f
DC-111: Add subagent account (#286) 2019-01-29 15:41:43 +03:00
Andrew Mayorov
e4069b0b35
Failproof merging session events (#283) 2019-01-22 11:29:50 +03:00
Andrey Fadeev
2c1b3cc07b Apply back "HG-449: Fail the machine when capture session fails (#277)" (#281)
This reverts commit 7aa73be5ef #279
2019-01-16 16:11:49 +03:00
Andrey Fadeev
52b56f4170
Add more possible transport options for proxy (#280) 2019-01-15 22:20:36 +03:00
Andrey Fadeev
7aa73be5ef
Revert "HG-449: Fail the machine when capture session fails (#277)" (#279)
This reverts commit 1d38c03302.
2019-01-15 21:47:50 +03:00
Alexey
1d38c03302
HG-449: Fail the machine when capture session fails (#277) 2019-01-15 13:49:45 +03:00
Andrey Fadeev
44f18e2e11
MG-145 Add VM metrics collection (#278)
Add `how_are_you` library usage
2019-01-15 00:36:59 +03:00
Артем
967e7d7604
HG-450: Wallet payout tool (#275) 2018-12-12 17:14:15 +03:00
Артем
998985ade2
Revert "HG-398: New state in failure. (#267)" (#274)
This reverts commit f652d97ca6.
2018-11-27 16:05:49 +03:00
kloliks
54d8233461
HG-447: fast get_last_revision (#273) 2018-11-27 14:51:16 +03:00
Артем
f652d97ca6
HG-398: New state in failure. (#267) 2018-11-20 17:41:08 +03:00
Andrey Fadeev
80d01baaf9
HG-443 Do not set custom deadline for inspector without fallback (#266) 2018-11-19 14:31:58 +03:00
Alexey
35e2a5ecf5
HG-446: Fall back to bin check when bank name is undefined (#271) 2018-11-14 16:44:33 +03:00
Артем
5effe8a6ec
HG-444: Add sequence (#269) (#270) 2018-11-12 16:33:15 +03:00
Evgeny Levenets
ef3cafeaec
HG-408: switch to binary event storage (#242) (#268)
cherry pick 4485efa
2018-11-07 11:54:23 +03:00
Andrew Mayorov
61ba5136c3
Unforget to store binbase data in the StartPayment events (#265)
* Push some bank-card-issure-dependent provider terms too
* Stuff test bank cards w/ some random metadata
2018-11-01 12:39:54 +03:00
Evgeny Levenets
defdf18844
HG-408: switch to binary event storage (2nd try) (#264)
Previous commit #242 was reverted and squashed in #263, so we have to revert revert this.
2018-10-31 13:33:28 +03:00
Andrey Fadeev
a2875f6565
FF-7 Add missed WithdrawalServiceTerms merge (#263)
* Revert "HG-408: switch to binary event storage (#242)"
This reverts commit 4485efae95.

* FF-7 Add missed WithdrawalServiceTerms merge
2018-10-29 19:38:17 +03:00
Evgeny Levenets
4485efae95
HG-408: switch to binary event storage (#242)
* HG-408: switch to binary event storage

* use metadata obviously

* encode/decode perfection

* dumb packing logic

* dumb unpacking

* fix dialyzaaaar

* little typing improvement

* introduce primitive AuxState

* use aux state for state composition

* rework aux state usage a little bit

* use AuxState for checking out by revision

* fix awkward bug

* move header to proper location

* revert previous ugly commit

Revert "fix awkward bug"

* use 0 limit for get_state and checkout_by_revision

* rework get_state for handle_call

* build party revision index on call

* remove adhoc with domain revision

* remove get_st_timestamp()
2018-10-23 13:43:39 +03:00
Артем
277d6e4946
HG-439: Invoice repair tool (#258) 2018-10-23 09:55:31 +03:00
Andrey Fadeev
16d9d57b18
FF-7 Add withdrawals terms reducing (#262) 2018-10-18 11:13:06 +03:00
Andrey Fadeev
db6f2d24d0
FF-7 Add varset using to wallet terms construction (#261) 2018-10-15 16:31:53 +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
Andrew Mayorov
e6d7f41b87
HG-441: Bump to rbkmoney/damsel@4c78d0d5 (#257)
* HG-441: Add a couple of simple test cases
2018-10-02 17:51:37 +03:00
Andrew Mayorov
ff3c83f61c
HG-440: Handle unhandled recurrent paytools service exception (#256) 2018-10-02 17:04:13 +03:00
Andrey Fadeev
5300a226c1
Fix function clause for proxy GetPayment on idle payments (#252) 2018-09-27 12:22:49 +03:00
Andrey Fadeev
11ec5da9fe
HG-391 Add first payment recurrent (#246) 2018-09-26 21:18:21 +03:00