Commit Graph

500 Commits

Author SHA1 Message Date
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
Andrew Mayorov
cf85597051
HG-435: Fix legacy bank card unmarshalling (#254) 2018-09-26 18:40:34 +03:00
Артем
2cf6f052f4
HG-422: Party revision (#244) 2018-09-26 10:33:49 +03:00
Артем
5f27775677
HG-422: Party revision serverside (#250) 2018-09-21 14:06:18 +03:00
Andrey Fadeev
1d04aa8ec0
HG-424 Do not fail outdated customer binding machine (#251) 2018-09-20 16:27:54 +03:00
Andrey Fadeev
b32011c503
HG-424 Only pending customer binding can be outdated (#249) 2018-09-20 12:53:55 +03:00
Anton Belyaev
794499ec31
Fix payout_tool_info transmutation to v6 in party modification (#248) 2018-09-19 16:32:53 +03:00
Andrey Fadeev
b2efa5ee35
HG-424 Increace hardcoded customer deadline (#247)
* Increace hardcoded customer deadline
* Add config to application env
2018-09-19 15:22:56 +03:00
Andrey Fadeev
4d8cc6911e
HG-424 Add customer polling deadline (#245) 2018-09-18 18:06:15 +03:00
Andrey Fadeev
a25077393e
HG-432 Fix another party customer using (#243) 2018-09-18 13:41:34 +03:00
Артем
f06efedd8b
HG-398: Added adapter state for invoice payment (#240) 2018-09-17 16:54:19 +03:00
Anton Belyaev
bb0a0653e8
Refactor InternationalBankAccount in payout tool info, add modification (#238) 2018-09-17 16:19:24 +03:00
Артем
193d5abf6e
HG-414: Added bypass antifraud (#241) 2018-09-17 13:45:36 +03:00
Andrey Fadeev
acbe9f4ea5
HG-418 Add adhoc repair events merging (#239)
* Add adhoc repair events merging
* Add more generic provider test scenario
* Add tests for legacy repaired machines
2018-09-12 19:43:33 +03:00
Andrey Fadeev
97d5e62d44
HG-389 Add caching party client usage (#232) 2018-09-06 18:50:37 +03:00
Andrey Fadeev
021d444c7f
Add default woody deadline to requests without it (#236) 2018-09-06 13:26:44 +03:00
Andrey Fadeev
beca24f737
Fix undefined route reading in refunding non-captured payment (#234) 2018-08-31 14:45:17 +03:00
Evgeny Levenets
7621c92665
HG-395: remove payment institution check in claims (#233) 2018-08-28 19:51:35 +03:00
Andrey Fadeev
152732ac4a
HG-386 Remove wallet management methods from party management (#230) 2018-08-27 12:45:53 +03:00
Andrey Fadeev
13c2c93a95
Fix no_route_found logging format (#231) 2018-08-22 13:22:59 +03:00
Andrey Fadeev
77d2fd4827
HG-250 Multistage payment start (#229) 2018-08-09 11:32:18 +03:00
Andrey Fadeev
2e145ceae8
HG-381 Add owner_id and shop_id to InvoicePaymentStarted event (#227)
And update dmsl
2018-07-23 12:18:58 +03:00
Andrew Mayorov
11f0550e26
Fix party events marshalling (#228) 2018-07-18 18:39:24 +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
Andrew Mayorov
1de7949caa
Provide ability to setup timeouts (#226)
* Bump to rbkmoney/woody_erlang@9846923
2018-07-06 15:16:10 +03:00
Evgeny Levenets
3208d74733
fix report service terms computing (#224) 2018-07-03 20:57:28 +03:00
Andrey Fadeev
04439927e2
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
Evgeny Levenets
9761eed905
HG-373: better 'No route found' exception (#215) 2018-05-24 18:05:45 +03:00
Evgeny Levenets
dade9cba1a
fix LegalAgreement transmuting part 2 (#218) 2018-05-22 15:04:59 +03:00
Andrew Mayorov
6e323e6ff1
Drop outdated TODOs and code fragments (#216) 2018-05-22 12:05:04 +03:00
Evgeny Levenets
43732d0240
fix LegalAgreement transmuting (#217) 2018-05-21 19:36:29 +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
Evgeny Levenets
4d18057b84
HG-370: support reporting preferences modification (#208) (#209)
* HG-370: support reporting preferences modification (#208)

* switch to epic damsel rbkmoney/damsel@3019575
* add simple test
* add schedule ref validation
* merge forgotten terms for acts
* calm down dialyzer
* add backward compatibility (#210)
2018-05-16 18:25:52 +03:00
Natalia Pulina
ec3fde0037 HG-360: Introduce apple pay (#203) (#207)
rbkmoney/damsel@d9b9706
2018-05-08 15:09:05 +03:00
Evgeny Levenets
301985ce04
HG-334: use specific exceptions instead of InvalidRequest (#192) (#196)
* use specific exceptions instead of InvalidRequest
* remove unused stuff
* make payout_tool truly optional
* adapt to new exceptions and add PayoutScheduleRef check
* use hg_domain:exist instead of get
* add payout tool currency check
* rbkmoney/damsel@83d6c99
2018-04-20 14:38:36 +03:00
Andrew Mayorov
ad14d616d8
Fix merchant fees adjustment mechanics (#206) 2018-04-17 12:22:49 +03:00
Petr Kozorezov
36ef1871bd
add "health" handle (#204) 2018-04-12 18:02:05 +03:00
Andrew Mayorov
13d35eab0a
Fix merchant refund terms acceptance (#202)
It was incorrect not to consider payment methods restriction when
evaluating refund terms.
2018-04-04 15:26:56 +03:00
Andrew Mayorov
d069ee9c44
Make adjustments respect possibly updated merchant terms (#199) 2018-04-03 20:09:12 +03:00
Evgeny Levenets
3e283df2cc
fix partial refund varset collection (#201)
* break tests
* fix partial refund varset collection
2018-04-03 19:11:14 +03:00
Petr Kozorezov
a53f1c700f
add payment error logs (#198) 2018-04-03 13:47:27 +03:00
Natalia Pulina
0b0664b96d
HG-352: Fix routing for payment - checking of refund conditions (#194) 2018-03-23 12:26:53 +03:00
Natalia Pulina
4c7c8ae582
HG-339: Refund currency should match payment currency (#195) 2018-03-22 18:16:07 +03:00
Andrew Mayorov
e9fcb3bae9
Refrain from emitting event when proxy kept its session state untouched (#193)
* Bump test timeout up a bit more
2018-03-15 13:12:31 +03:00
Andrew Mayorov
d3a437ecc4
Exile a couple of legacy marshalling devils (#191) 2018-03-13 17:33:13 +03:00
Natalia Pulina
24086c83da
HG-339: merge_refunds_terms and reduce_refunds_terms fixed (#190) 2018-03-12 11:43:30 +03:00
Natalia Pulina
26818fb642
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
Evgeny Levenets
911bb7d6e7
HG-312: add payout terms support (#181)
* HG-312: add payout terms support (#174)

* add payout terms support
* add payout method condition support
* clean up hg_party a little bit
* separate payment institution stuff

* CAPI-251: add varset support to payment institution terms computation (#178)

* add varset support to payment institution terms computation
* add more science to pmnt_institution test

*  HG-343: add marshaling for old models (#183)

* bump damsel and dominant
* remove policy from payout service terms
* rename SheduleRef to PayoutSheduleRef to match damsel naming
* add marshaling for old models: international bank account, international legal entity, shop

* HG-343: fix old contract unmarshalling (#184)

* HG-343: fix old contract params unmarshalling (#184)

* linter fix

* HG-343: add support for merchant payout account (#185)

* add support for merchant payout account
* fix exceptions for ComputeTerms methods
2018-02-26 19:29:25 +03:00
Petr Kozorezov
2a1f4263c8
HG-345: Introduce error mapping (#175)
* update types and marshalling

* add errors representations convertor

* apply other review comments: add runtime type checking

* apply review fixes

* move errors code to a separate repo

* change damsel to master
2018-02-15 18:01:23 +03:00
Andrew Mayorov
c658f1f4fd
Implement ad-hoc repairs w/ the ability to push arbitrary changes (#179)
* Make misbehaving testcase revert domain config alterations at the end
2018-02-15 12:43:14 +03:00
Andrew Mayorov
0791b44eee
HG-314: Introduce digital wallets (#164)
* HG-314: Let it learn new payment tool and storage schema

* HG-314: Add forgotten payment tool condition assertions

* HG-314: Increase healthcheck timeouts just for the fun of it

* HG-326: Introduce new rounding rule for cashflow volume (#169)

* BA-52: Bump to master rbkmoney/damsel@620cca5

* BA-52: Bump to master rbkmoney/dominant@68d75c0
2018-01-24 16:40:54 +03:00
Andrew Mayorov
46c7638166
BA-43: Checkout party by revision greedily (#172) 2018-01-22 17:46:49 +03:00
Evgeny Levenets
442c626dc2
BA-43: add forgotten party revision marshalling (#171) 2018-01-22 15:40:57 +03:00
Evgeny Levenets
1beb993ea3
HG-305: bring payment institutions on the table (#167)
* HG-305: add payment institutions support (#159)
* HG-310: add descrete party revisioning (#162)
* HG-317: add international legal entity & bank account (#163)
* HG-317: marshaling & migration (#165)
* MSPF-335: add default payment inst to claim's changeset and effects (#168)
* MSPF-335: add party revision to Invoice (#170)
2018-01-21 20:59:44 +03:00
Natalia Pulina
92a1f7cf8c
HG-319: user_interaction in SleepIntent handled (#166)
* HG-319: test cases for failure and success payment with user interaction

* HG-319: kv store added

* HG-319: use token for payment tool scenario
2018-01-15 13:12:03 +03:00
Dmitry Manik
70408c2bae
Subs-2 (#158) 2017-11-22 14:38:09 +03:00
Evgeny Levenets
2055ff7385
CAPI-213: fix legacy template details unmarshaling (#155) 2017-11-02 18:15:55 +03:00
Anton Belyaev
1af4f1806d 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
Evgeny Levenets
b877a59f8d HG-257: penetrate invoice cart into invoice template (#143) 2017-10-25 19:26:00 +03:00
Andrew Mayorov
891b6e612c HG-182: Fix unmarshalling of super legacy invoices (#150) 2017-10-24 13:41:31 +03:00
Andrew Mayorov
0aa975f07e HG-182: Fix super legacy unmarshalling (#149) 2017-10-23 20:45:36 +03:00
Andrew Mayorov
72676401de HG-182: Fix legacy unmarshalling (#148) 2017-10-23 19:06:00 +03:00
Anton Belyaev
80f24744af 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
Andrew Mayorov
b94586d248 HG-294: Fix obsolete callback handling (#146)
* HG-294: Refactor tests a bit

* HG-294: Fix obsolete callback handling

* HG-294: Test obsolete callback in a hold payment

* HG-294: Allow to run single suite w/ Make target
2017-10-19 18:44:32 +03:00
Natalia Pulina
626bc20f61 HG-284: tests for hold auto cancellation and capturing fixed (#144)
* HG-284: lifetime of invoice increased

* HG-284: starting dummy proxies once, parallel execution of holds
2017-10-18 16:44:39 +04:00
Natalia Pulina
76357424bc HG-281: Introduce compute terms for invoice templating (#133) 2017-10-04 14:26:56 +04:00
Andrew Mayorov
447643ac92 HG-264: Hack up GetPayment interface for proxies (#130) (#132)
* HG-264: Adapt to the modified protocol

* HG-264: Generalize hg_machine interfaces a little

* HG-264: Hack up GetPayment interface for proxies

* HG-264: Bump to rbkmoney/damsel@23b50e4
2017-09-28 20:30:57 +03:00
Natalia Pulina
542645eda6 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
f732f69da2 HG-58: Include mg_proto as a direct dependency (#128) 2017-09-21 20:06:43 +03:00
Andrew Mayorov
c39c7c4cfc HG-58: Do not allow to overdraft account on refund (#126)
* HG-58: Do not allow to overdraft account on refund

* HG-58: Employ dedicated exception type
2017-09-21 12:03:39 +03:00
Andrew Mayorov
ec4132cfb8 HG-58: Fix unmarshalling of legacy payment statuses (#125) 2017-09-19 16:07:23 +03:00
Natalia Pulina
1e7aca94e2 HG-274: records from mg_proto used, client for event_sink added (#123) 2017-09-18 18:02:46 +04:00
Andrew Mayorov
5a6e67368c Temporary assume undefined reason as empty (#122)
* Bump to rbkmoney/damsel@2223cc6

* Temporary assume undefined reason as empty

* Move claim status hacking closer to where unmarshalling takes place
2017-09-14 18:03:05 +03:00
Evgeny Levenets
c7afa2a462 BA-29: fix terminal user interaction marshaling (#119) 2017-09-12 17:44:24 +03:00
Andrew Mayorov
d970a2c426 HG-58: Introduce refunds and payments provision terms (#118)
* HG-229: Implement refunds facilities (#107)

* HG-229: Respect payments / refunds provision terms

* HG-229: Respect provider limits

* HG-229: Simplify domain macros usage

* HG-229: Embrace terms requiredness (#113)

* HG-263: Optimize payment risk coverage (#116)

* HG-262: Bump damsel and service deps

 * rbkmoney/dominant@298cd19
 * rbkmoney/machinegun@1844dff
 * rbkmoney/shumway@7a5f95e
 * rbkmoney/damsel@49773b2
2017-09-12 14:12:44 +03:00
Natalia Pulina
83fcbbc092 HG-258: Flow is published in business metrics (#115) 2017-09-11 12:30:01 +04:00
Andrew Mayorov
356f8b7580 HG-237: Provide msgpack marshalling for invoice templates (#111)
* HG-237: Provide msgpack marshalling for invoice templates

* HG-237: Shut dialyzer whining up with a couple of hotfixes

* HG-237: Try to tame these infernal timeouts
2017-08-30 14:57:22 +03:00
Andrew Mayorov
037929640e HG-237: Implement hold payments (#110)
* HG-236: Hold realisation

* HG-248: msgpack structures used for invoice (#105)

* HG-246: improve support for 54FL (#101)

* BJ-201: Require suspend timeout to be set explicitly (#102)

* Allow proxy to keep sessions suspended (#103)

* HG-232: add fatal risk score support (#104)

* HG-248: msgpack structures used for invoice

* CAPI-176: add payment terminal support (#106)

* HG-255: Selector for holds handled

* HG-248: unmarshal metadata fixed (#109)

* HG-237: Switch to rbkmoney/damsel@44afec3 master
2017-08-29 19:33:14 +03:00
Evgeny Levenets
a0c7575fbc CAPI-176: add payment terminal support (#106) 2017-08-18 11:38:15 +03:00
Evgeny Levenets
55668e4c8a HG-232: add fatal risk score support (#104) 2017-08-11 19:17:55 +03:00
Andrew Mayorov
6835153eed Allow proxy to keep sessions suspended (#103) 2017-08-11 15:25:58 +03:00
Andrew Mayorov
a129b64667 BJ-201: Require suspend timeout to be set explicitly (#102) 2017-08-04 13:34:08 +03:00
Evgeny Levenets
f51c3aa5a5 HG-246: improve support for 54FL (#101)
* add party meta support
* bumped deps
2017-08-03 19:32:38 +03:00
Anton Belyaev
376afd7489 Introduce invoice templates (#99)
* introduce invoice templates
* push image from Jenkins on epic branches
* bump machinegun version
2017-07-26 17:50:32 +03:00
Evgeny Levenets
44cce58ddb HG-244: added PartyID and InvoiceDetails for inspector proxy context (#100)
rbkmoney/damsel@95b03f2
2017-07-26 14:30:36 +03:00
Andrew Mayorov
8fe96f1f4c 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
Natalia Pulina
da5889c74e HG-213: Log public events for invoice and invoice payment (#89)
* HG-213: Log public events for invoice and invoice payment (#89)

* HG-213: Postreview refactoring

* HG-213: Clause should be on new line

* HG-213: get_partial_remainders moved to hg_cashflow

* HG-213: appeal to accounter removed

* HG-213: log all events in hg_invoice

* HG-213: spec for get_partial_remainders fixed

* HG-213: existing macros are used

* HG-213: do not handle amounts with different currencies

* HG-213: partial remainders added to invoice_payment_status_changed event

* HG-213: tuple for account type converted to string

* HG-213: code style fixed

* HG-213: spec get_partial_remainders fixed

* HG-213: amount and currency added to all payment events

* HG-213: use separator . for elastic

* HG-213: code formatting

* HG-213: use try_get_payment_session in get_log_params

* HG-213: Code refactoring

* HG-213: Code refactoring

* HG-213: Contract for get_log_params func changed
2017-06-26 13:16:28 +03:00
Evgeny Levenets
4da0814c87 HG-218: added Checkout interface to party management (#90) 2017-06-16 19:51:27 +03:00
Andrew Mayorov
bb0bae22ef 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
Andrew Mayorov
43720b2a22 HG-193: Get rid of uninformative misconfiguration errors (#87)
* HG-193: Get rid of uninformative misconfiguration errors

* HG-193: Tolerate missing external account
2017-05-18 20:10:23 +03:00
Artem Ocheredko
ab4ffe8569 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
ae2ec46239 Fix selector and condition patterns (#85) 2017-05-11 22:52:50 +03:00
Andrew Mayorov
5824c62847 HG-190: Abuse persistent timers in the invoice machine (#84)
* HG-190: Cut down on extraneous mg calls a little

* HG-190: Switch to rbkmoney/damsel@4018c41

* HG-190: Abuse persistent timers in the invoice machine

* HG-190: Drop merchant proxy logic altogether

* HG-190: Add one more test on invoice timings

* HG-190: Fix confusing timer management

* HG-190: Oops

* HG-190: Switch to damsel upstream, bump to rbkmoney/machinegun@a5a8653

* HG-190: Bump to rbkmoney/machinegun@707c2f8
2017-05-04 17:58:54 +03:00
Evgeny Levenets
7a35a40a33 DC-30: external accounts added to cash flow (#82) 2017-04-25 13:51:37 +03:00
Andrew Mayorov
bf50fbffda HG-155: Export woody server net_opts to the config (#81) 2017-04-03 17:47:58 +03:00
Andrew Mayorov
e4ec2f2677 HG-186: Describe limit violations more throughly (#80)
* HG-186: Describe limit violations more throughly

* HG-186: Make argument order more natural
2017-03-30 16:25:29 +03:00
Andrew Mayorov
5bbee121a5 HG-144: Make state processors msgpack-aware (#78)
* HG-155: Fix invoicing handler quirks

* HG-144: Make state processors msgpack-aware

* HG-155: Bump to rbkmoney/damsel@d0c4a06, rbkmoney/machinegun@e04e529

* HG-155: Bump to rbkmoney/dominant@61320c4
2017-03-29 19:18:52 +03:00
Andrew Mayorov
4a04b06fb9 Raise correct exception on empty invoice history (#77) 2017-03-14 17:23:02 +03:00
Evgeny Levenets
a18a6f9979 HG-168: use any of contract’s categories if category isn’t specified at shop creation (#75) 2017-03-06 19:20:34 +03:00
Andrew Mayorov
6dfb1db961 HG-170: Fix Invoicing exception interface (#76)
* HG-170: Remove obsolete TODOs

* HG-170: Fix Invoicing exception interface

* HG-170: Bump to rbkmoney/damsel@9ec1a2e
2017-03-06 14:49:50 +03:00
Evgeny Levenets
392452f133 HG-160: split party management into 3 modules (#73)
* HG-160: split hg_party into 3 modules
* added TODO about changes applying
2017-03-03 20:08:05 +03:00