Commit Graph

352 Commits

Author SHA1 Message Date
Boris
a6f0af5773
Logging routing computation trace (#530)
* add candidates compution trace
2020-12-18 15:16:22 +03:00
Andrey Fadeev
0776ca6685
Remove risk score overwriting when make_recurrent flag is set (#528)
* Remove risk score overwriting when make_recurrent flag is set
* Remove related test
2020-12-16 19:10:22 +03:00
Boris
ff88d6a6b2
Add routing rules logs (#527) 2020-12-16 14:54:16 +03:00
Boris
c269e660a1
Routing rules logging (#526)
* routing rules logging

* Update apps/hellgate/src/hg_invoice_payment.erl

Co-authored-by: Andrey Fadeev <me@ciiol.net>
2020-12-15 12:03:47 +03:00
Alexey
eabde5f5c6
CAPI-430: Add last_transaction_info to payproc_InvoicePayment (#522) 2020-12-09 14:54:16 +03:00
Andrew Mayorov
5124c9d757
Avoid warnings spam w/ incompatible cash ranges (#516)
Prefer to return well-specified error tuple instead.
Also Bump invoice lifetimes up in customer tests.
2020-12-04 17:27:30 +03:00
Toporkov Igor
fa25ac258b
CAPI-429: Add uzcard support (#510)
* Unmarshal new payment terminal provider

* Fix wrong name

* Closing quote
2020-11-25 14:38:16 +03:00
Toporkov Igor
a17521d4d9
HG-555: Remove redundant terms reduction (#499)
* Hadle varset that might be sent in future

* Leave a comment about the migration process

* Update damsel & party_client

* Use party_client to call PM, add Varset to ComputeShopTerms args

* Add Varset to pm_client and tests

* Use Varset in party management

* Remove redundant terms reduction

* Apply formatting

Co-authored-by: ndiezel0 <ndiezel0@gmail.com>
2020-11-17 12:06:23 +03:00
George Belyakov
b7a0c58dfb
hitch up all routing rules damsel changes (#507) 2020-11-16 10:55:56 +03:00
Toporkov Igor
6fd3f029de
HG-555: Refactor PM ComputeShopTerms (#498)
* Hadle varset that might be sent in future

* Leave a comment about the migration process

* Update damsel & party_client

* Use party_client to call PM, add Varset to ComputeShopTerms args

* Add Varset to pm_client and tests

* Use Varset in party management
2020-11-15 22:45:09 +03:00
Sergey Yelin
71132630ea
Add risk coverage to provider (#505)
* Add risk_coverage handling

* Pass RiskScore to provider acceptor

* Make risk coverage selector optional

* Remove dead code

* Add tests for routing

* Routing tests cleanup

* Fix dialyzer

* Localize varset/0 type

* Formatting

* Remove comment

* Add tests to rule sets

* Make provider cover operation with lower risk score

* Rewrite risk compirision logic

* Formatting

* Update dominant
2020-11-12 17:29:09 +03:00
Roman Pushkov
0328525241
HG-560: routing with pm (#495)
* add collect routes handler

* add compute provider handling

* remove collect routes handler

* add faulty config test

* return undefined cash range check result

* fix logger call

* run fmt
2020-11-12 11:18:16 +03:00
Toporkov Igor
233b3a0913
Revert "Revert "HG-555: update ComputeShopTerms clients (#497)" (#503)" (#504)
This reverts commit 72f6fd5c3d.
2020-11-09 13:50:16 +03:00
Toporkov Igor
72f6fd5c3d
Revert "HG-555: update ComputeShopTerms clients (#497)" (#503)
This reverts commit 9a8ad47008.
2020-11-05 12:09:36 +03:00
Toporkov Igor
9a8ad47008
HG-555: update ComputeShopTerms clients (#497)
* Hadle varset that might be sent in future

* Leave a comment about the migration process

* Update damsel & party_client

* Use party_client to call PM, add Varset to ComputeShopTerms args

* Add Varset to pm_client and tests
2020-10-30 14:54:58 +03:00
Toporkov Igor
e0079a5eb7
HG-555: Handle Varset in ComputeShopTerms (#496)
* Hadle varset that might be sent in future

* Leave a comment about the migration process
2020-10-30 11:58:59 +03:00
Sergey Yelin
cf0ff07a95
Add prometeus (#494) 2020-10-24 09:01:20 +03:00
Roman Pushkov
29c5936cab
Revert HG-560: use compute provider in routing (#491)
This reverts commit 084579a740.
2020-10-22 19:10:56 +03:00
Roman Pushkov
29ddb9b354
HG-561: handle undefined chargeback provision fees (#490)
* handle undefined provider fees

* cleanup

* comment out fees

* comment out surplus cash flow

* separate test for missing fees

* update no fees test

* fix service terms

* add terms for chargeback with no defined fees test
2020-10-21 21:29:26 +03:00
Roman Pushkov
084579a740
HG-560: use compute provider in routing (#491)
* use compute provider in routing

* fix routing tests

* fix formatting

* drop revision, switch reduce to get_value

* update route rules tests

* use compute provider in routing_rule

* clean up redundant varsets

* remove more redundant varsets

* rework acceptable_terminal/5

* refactoring

* change redundant pm call
2020-10-21 18:34:22 +03:00
ndiezel0
f590e532d3
HG-452: Add PartyManagement usage to hellgate (#485)
* HG-452: Add PartyManagement usage to hellgate

* HG-452: Review fix

* HG-452: Save some lines

* HG-452: Review fix

* HG-452: Get rid of extra fields in Varset

* HG-452: Fix lint

* HG-452: Review fix

* HG-452: Fix

* HG-452: Review fix

* HG-452: Review fix

* HG-452: Format

* HG-557: Fix merge

* HG-557: Add comment

* HG-452: Update build_utils

* HG-452: Rollback hg_routing Varset changes

* HG-452: Fix spec
2020-10-20 18:16:05 +03:00
ndiezel0
a0ba5ff844
HG-557: Add logging of cache hit/miss (#489) 2020-10-19 16:11:16 +03:00
ndiezel0
2c2bd465bc
HG-452: Add caching for Checkout Party (#487)
* HG-452: Add caching for Checkout Party

* HG-452: Fix dialyzer

* HG-452: Format

* HG-452: Make cache work

* HG-452: Review fix

* HG-452: Fix specs

* HG-452: Review fix

* HG-452: Fix

* HG-452: Review fix

* HG-452: Format
2020-10-16 13:41:47 +03:00
Boris
690a605d7a
HG-543: check recurrent risk score for predefined route (#488) 2020-10-13 17:15:55 +03:00
Toporkov Igor
10f8bff77f
HG-547: Validate cash register claims (#484)
* Assert cash registry-assosiated shop exists in party or could claimed to be created

* Filter out cash register shopIDs

* Test new validation

* Fix typo in test case name, fix missing space

* Always check cash register claims

* Fix cash register spelling

* Format code using erlfmt

* Use sets instead of lists

* Move cash_register claims validation to pm_claim_committer
2020-10-13 14:31:57 +03:00
ndiezel0
fb8992b293
HG-452: Fixed party_management (#483)
* HG-452: Fixed party_management

* HG-452: Add pm_varset and encode_decode test

* HG-452: Fix merge

* HG-452: Formatter
2020-09-28 12:37:41 +03:00
Andrey Fadeev
dcef286105
Try erlfmt (#479)
Co-authored-by: Sergey Yelin <elinsn@gmail.com>
2020-09-25 18:14:03 +03:00
Sergey Yelin
70f1e697da
Update woody (#482)
* Revert "Update woody and fix backward clock error (#478)"

This reverts commit 7ee4679b1e.

* Update woody and fix backward clock error (#478)

* Fully embrace new woody args-are-tuples convention (#480)

* Remove HG-542 revert artefact

Co-authored-by: ndiezel0 <ndiezel0@gmail.com>
Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
2020-09-18 19:18:59 +03:00
Sergey Yelin
9090607be6
Revert HG-452 (#481)
* Revert "Fully embrace new woody args-are-tuples convention (#480)"

This reverts commit d95579a0d7.

* Revert "HG-452: Fix pm_ruleset (#477)"

This reverts commit 6f4433bdc7.

* Revert "Update woody and fix backward clock error (#478)"

This reverts commit 7ee4679b1e.

* Revert "HG-452: Add pm methods usage (#443)"

This reverts commit 3a9142df3b.
2020-09-18 16:57:01 +03:00
Andrew Mayorov
d95579a0d7
Fully embrace new woody args-are-tuples convention (#480) 2020-09-17 11:45:53 +03:00
Sergey Yelin
29e2421b80
Add missing claim (#476)
* Add missing claim

* Fix name

* Filter out unsupported event

* Remove dead code

* Simplify filter

* Do not generate events to claim with empty changeset

* Filter out claim_modification

* Leave cash_register_modification_unit for further desisions

* Cleanup
2020-09-14 18:49:59 +03:00
ndiezel0
6f4433bdc7
HG-452: Fix pm_ruleset (#477)
* HG-452: Fix pm_ruleset

* HG-452: Revert ComputeGlobals

* HG-452: Slim down PR

* HG-452: Remove compute_globals

* HG-452: Remove unneeded reduce_payment_routing_decisions/3 clause
2020-09-11 13:11:35 +03:00
ndiezel0
7ee4679b1e
Update woody and fix backward clock error (#478) 2020-09-10 17:58:12 +03:00
ndiezel0
3a9142df3b
HG-452: Add pm methods usage (#443)
* HG-452: Add compute payment institution to hellgate

* HG-452: Fix marshalling

* HG-452: Add ComputePaymentInstitution implementation

* HG-452: Fix payment_institution tests

* HG-452: Fix lint

* HG-452: Fix marshalling error

* HG-452: Fix tests

* HG-452: Add compute_contract_terms use

* HG-452: Add compute_contract_terms more use

* HG-452: Fix dialyzer

* HG-452: Update Provider

* HG-452: Remove compute p2p and withdrawal provider methods

* HG-452: Update party client

* HG-452: Add eunit test to selector

* HG-452: Fix tests

* HG-452: Review fix

* HG-452: Review fix

* Update apps/hellgate/src/hg_invoice_payment.erl

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

* HG-452: Review fix

* HG-452: Remove CreatedAt

Co-authored-by: Andrey Fadeev <me@ciiol.net>
2020-09-07 16:16:34 +03:00
Andrey Fadeev
aabae17136
Interpret unexpected error as a failed operations (#472) 2020-09-04 20:51:29 +03:00
Roman Pushkov
32d3bfa307
HG-545: register status change timestamps (#473)
* add occurred in invoice handlers

* store latest change in payment

* remove unused function

* update merge_change

* minor fixes

* one more fix

* store ts in payment opts

* update opts handling

* cleanup

* minor cleanup

* timestamps for invoice adjustments

* update damsel

* unify adjustment timestamps

* fix exports
2020-09-04 14:32:38 +03:00
Roman Pushkov
a321662cdc
Unrevert second part of HG-538 (#444) (#451)
This reverts commit 7eea076a4d.
2020-08-27 15:53:43 +03:00
Артем
5223d3f714
HG-485: Assert recurrent token in direct recurrent payment final (#471)
* added assert

* added requested changes
2020-08-17 12:23:34 +03:00
ndiezel0
8660b4d533
HG-452: Implement ComputeGlobals and ComputePaymentRoutingRuleset (#466)
* HG-452: Update Varset

* HG-452: Add ComputeGlobals and ComputePaymentRoutingRuleset implementation

* HG-452: Fix tests

* HG-452: Fix test

* HG-452: Fix dominant config in party test

* HG-452: Fix lint

* HG-452: Fix xref and tests

* Update apps/party_management/src/pm_party_handler.erl

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

* HG-452: Review fix

* HG-452: Update damsel

* Update apps/party_management/test/pm_party_tests_SUITE.erl

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

* HG-452: Add WRONG_DMT_OBJ_ID macro to pm tests

* HG-452: Add tests

* HG-452: Fix order

Co-authored-by: Andrey Fadeev <me@ciiol.net>
2020-08-07 16:02:02 +03:00
Toporkov Igor
3bdc2a01f9
DC-127: Payment methods refactoring (#445)
* Use corresponding epic damsel branch

* Bump dominant

* Migrate to new bank_card payment method representation

* Simplify guard clause

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

* Delete invalid clauses in hg_payment_tool:get_method/1

* Remove marshaling that we don't use anymore

* Correctly unmarshal tokenization_method

* Revert "Correctly unmarshal tokenization_method"

This reverts commit 6f14eefd003e3f80d087db97ca63c4ccc85152d8.

* Do not unmarshal tokenization_method because it will never be there

* Use old (_deprecated) payment methods

* Replace has_cvv with is_cvv_empty

* Upgrade damsel

* Delete outdated comentaries

* Return ordset of payment methods

* Upgrade dominant

* Upgrade damsel

* Add tokenization_method to bank_card_deprecated

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

* Simpilfy and rename payment methods matching

* Export hg_payment_tool:get_possible_methods/1

* Upgrade damsel

* Fix mising old bank card reference

* Bump dominant

* Fix construct_payment_method

* Upgrade deps

* Suffix with _derprecated payment methods

* Bulk update deps

* Mark deprecated pms introduced by merge

Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
2020-07-29 15:02:00 +03:00
Boris
e4aa985437
Revert "HG-543: check risk score for predefined route (#462)" (#468)
This reverts commit 01c5dd2f37.
2020-07-29 14:14:17 +03:00
Boris
01c5dd2f37
HG-543: check risk score for predefined route (#462) 2020-07-28 10:30:30 +03:00
Boris
bda786fad9
HG-536: fix pouting reject context (#463) 2020-07-27 09:40:07 +03:00
Roman Pushkov
e2240008a0
HG-541: invoice adjustments (#458)
* some initial changes

* update hg_client

* change adjustment to payment adjustment in tests

* update damsel

* types in client

* Revert "change adjustment to payment adjustment in tests"

This reverts commit ff1633c41660b6f144f75ae067ea63eb33906981.

* rename payment adjustment functions

* fix hg_client adjustment calls

* update invoice events header

* add invoice adjustment tests

* working invoice adjustments

* uncomment other invoice tests

* minor cleanup

* fix some types

* fix more types

* temporarily comment out non-operational tests

* fix actions

* add more tests

* add exceptions

* run ci with disabled invoice adjustment tests

* Switch ti sequential

* uncomment tests

* minor cleanup

* uncomment pm tests

* add extra asserts

* add logging

* remove tests from invoice suite

* add invoice adjustment test suite

* minor cleanup

* fix test crashes

* minor cleanup

* more cleaning

* update invalid status exception handling

* increase party client timeout

* increase get timeout

* add pending payment test

* add pending adjustment test

* update tests

* update damsel

* update handling

* add expiration tests

* refactor tests

* update expiration handling

* tests cleanup

* do not expire while pending

* update timeouts

Co-authored-by: Sergey Yelin <elinsn@gmail.com>
2020-07-21 17:43:14 +03:00
Boris
9562cff4c2
fix wrong route format (#461) 2020-07-14 18:35:50 +03:00
Toporkov Igor
7bf0359c39
DC-122: Remove risk_coverage from Terminal (#459)
* Hard remove all risk_coverage-related code

* Upgrade dominant

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

* Fix merge artifact

* Kek

* Remove outdated comment

* Improve test readability

* Delete trailing whitespaces
2020-07-14 16:40:04 +03:00
ndiezel0
101a6c72b0
HG-452: Update party_managements methods and tests (#460) 2020-07-10 16:54:31 +03:00
Andrey Fadeev
5bbac2a626
MSPF-561 Add new provider terms usage (#454) 2020-07-06 10:58:37 +03:00
Roman Pushkov
d75c012b4a
HG-542: chargebacks move_to_stage option (#456)
* add move_to_stage option handling

* add test placeholder

* finalise test

* uncomment move_to_stage option handling

* only allow skipping forward

* update damsel

* fix test

* update handling

* rework stage selection semantics

* fix stage handling

* fix dialyzer
2020-07-03 17:23:24 +03:00
Andrey Fadeev
3f3c8e18cd
MSPF-561 Update damsel (#455)
* Update damsel
* Reduce tests flapping
* Make eventsink test suite a bit more stable
2020-06-30 17:51:13 +03:00