Commit Graph

106 Commits

Author SHA1 Message Date
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