Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
Natalia Pulina
1e7aca94e2 HG-274: records from mg_proto used, client for event_sink added (#123) 2017-09-18 18:02:46 +04: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
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
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
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
8031353726 HG-147: Improve event handler, make up logger prototype (#67)
* HG-147 Event handler / logger prototype

* HG-147 Logging scopes next edition

* HG-147 Add logging scopes to hg_machine/invoice/payment

* HG-147 Add postreview fixes

* HG-147: Try to improve metadata logging a bit
2017-02-04 19:48:29 +03:00
Evgeny Levenets
70a3658beb HG-129: primitive access control implemented (#59) 2017-01-17 15:49:57 +03:00
Andrew Mayorov
3af4a8bd0b HG-131: Shitcode a merchant proxy integration (#58)
* HG-130: Adapt to the damsel with breaking changes

* HG-131: Implement merchant proxy binding

* HG-131: Refactor shitty code a bit

* HG-131: Add upsert facility to help filling dmt up in tests

* HG-131: Name children properly to run more than one proxy handler

* HG-131: Fix a spec

* HG-131: Narrow a number of cases w/ asserting nonempty history

* HG-131: Drop unnecessary handling of woody errors

* HG-131: Shitcode a merchant proxy integration

* HG-131: Switch to the damsel upstream

* HG-131: Fix confusing type declarations

* HG-131: Adhere to the callback interface

* HG-131: Ensure proxy setup accepted automatically
2017-01-16 18:22:57 +03:00
Evgeny Levenets
3896310253 HG-127: new woody (#55) 2017-01-12 19:59:04 +03:00
Artem Ocheredko
8e68cda18f HG-110 Add risk score routing initial (and failed) attempt (#51)
* HG-110 Add risk score routing initial attempt. Move to the newest damsel
2017-01-12 18:36:58 +03:00
Evgeny Levenets
4905525c76 HG-72: save context in gproc instead of carrying around from function to function (#48) 2016-11-15 10:59:17 +03:00
Andrew Mayorov
b8b9ab8407 HG-64: Fix dependency tree (#36) 2016-10-14 21:06:37 +03:00
Igor Savchuk
dd87663300 use damsel_erlang (#33)
* use damsel_erlang

* update dmsl
2016-10-13 22:57:59 +02:00
Artem Ocheredko
5e900f7e92 HG-67 Add account management (#23)
* HG-67 Add account management. Add default shop services for shop creation. Add party management todo
2016-10-12 15:44:21 +03:00
Andrew Mayorov
6d46d566d0 HG-51: Payments over new protocol (#24)
* HG-51: Implement new proxy protocol, shitcode at its best

* HG-51: Refactor a bit

* HG-51: Switch to a renewed mg protocol

* HG-51: Bump to damsel upstream w/ payer contact info

* HG-51: Mention pointlessly complex payment ids in TODO list

* HG-51: Hardcode eventsink id instead

* HG-51: Update lockfile

* HG-51: Fail furiosly when callback handling ends up w/ unexpected error

* HG-51: Store less state in the session start event

* HG-51: Fail furiously on protocol errors, e.g. proxy contract violations

* HG-51: Add more TODO
2016-10-10 19:05:28 +03:00
Andrew Mayorov
ee85cc90d4 HG-49: Provide basic party management implementation (#20)
* HG-49: Provide basic party management implementation

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

* HG-49: Switch temporarily to damsel fork

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

* HG-49: Implement claim revocation + tests

* HG-49: Switch temporarily to damsel fork

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

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

* HG-49: Switch temporarily to damsel fork

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

* HG-49: Implement pending claim retrieval

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

* HG-49: Introduce preliminary pending claims management

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

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

* HG-49: Make any new shop suspended initially

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

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

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

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

* HG-49: Provide meaningful revocation reason

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

* HG-49: Please the Linter

* HG-49: Provide moar tests
2016-09-22 15:25:41 +03:00
Andrew Mayorov
423b6c7630 MG-16: Reimplement state processing in line with proto changes (#19)
* MG-16: Reimplement state processing in line w/ proto changes + remove some quirks

* MG-16: Update machinegun endpoints

* MG-16: Bump to the newest woody

* MG-16: Switch to a fresh machinegun container in test env
2016-08-25 15:41:23 +00:00
Andrew Mayorov
d5662dd9dc HG-48: Switch to the new stateproc protocol (#14)
* HG-48: Linting should not require compilation

* HG-48: Switch to the new stateproc protocol + introduce dynamic dispatch

* HG-47: Update TODOs

* HG-48: Fix process_signal contract

* HG-48: Update Payer construction in tests

* HG-48: Fix context handling

* HG-48: Bump damsel dep and update invoice machine accordingly

* HG-48: Bump mg_prototype service dep

* HG-48: Consolidate service specs in one place
2016-08-11 15:52:58 +00:00
Andrew Mayorov
b12a8b2c66 Implement event sink and event filtering (#11)
* HG-40: Implement EventSink + remap invoice events

* HG-40: Simplify machine code a bit

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

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

* HG-40: Bump thrift runtime dep

* HG-45: Implement internal events and event filtering

* HG-45: Start checking sequnces in tests

* HG-45: Bump woody dep version

* HG-45: Remove unused module

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

* HG-45: Switch to proper damsel fork

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

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

* HG-40: Revert UserInfo removal
2016-08-02 17:06:39 +00:00
Andrew Mayorov
39f59027a6 HG-4: Adapt implementation to work w/ event lists (#3)
* HG-4: Adapt implementation to work w/ event lists

* HG-4: Switch to damsel upstream

* HG-4: Explicitly match on declared events
2016-06-23 15:29:28 +03:00
Andrew Mayorov
ceb2013c89 HG-3: Add stubbed invoice machine and all the wiring (#2)
* HG-3: Add stubbed invoice machine and all the wiring

* HG-3: Bump damsel to a proper revision

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

* HG-3: Add missing elvis config

* HG-3: Switch to proto fork temporarily

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

* HG-4: Switch to new proto fork temporarily

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

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

* HG-4: Switch to new proto fork temporarily

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

* HG-3: Switch to proto fork already

* HG-21: Add containerization maketargets

* HG-4: Fix interfaces and add missing activities

* HG-4: Switch to new proto fork temporarily

* HG-6: Fix ruble currency code

* HG-4: Fix interface issues

* HG-4: Add default config

* HG-4: Switch to new proto fork temporarily

* HG-4: Start filling provider proxy interaction in

* Publish TODOs

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

* HG-4: Fix copypasta

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

* HG-4: Switch to new proto fork temporarily

* HG-21: Remove nonfunctional target dependencies

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

* HG-4: Simplify interface address manipulation

* HG-4: Compile proxy related thrift files

* HG-4: Switch to new proto fork temporarily

* HG-4: Update TODOs

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

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

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

* damsel@24a247b

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

* HG-4: Merge woody handler with invoice module

* HG-4: Fuse processor handler with machine

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

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

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

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

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

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

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

* HG-4: Cleanup dirty proxy state after testcases

* HG-4: Rename test_provider to a wider test_proxy

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