Commit Graph

264 Commits

Author SHA1 Message Date
Andrew Mayorov
d3a64bb0f1
ED-143: Support passing payer.sessionInfo around (#538)
* Bump to rbkmoney/swag@1dbc8c5d
* Bump to rbkmoney/damsel@3baeeaf
2021-04-30 18:45:27 +03:00
Boris
56137dfba0
ED-57: payment handler bouncer integration (#527) 2021-04-30 12:26:47 +03:00
yuri-bukhalenkov
c533defaf1
ED-111: fixed wetkitty mocha tests (#537)
* fixed wetkitty mocha tests (added tests and both *_deprecated and actual payment methods handlers)

* format
2021-04-28 11:58:26 +03:00
Yaroslav Rogov
fa5c33280e
ED 94/feat/pass customer id (#533)
* ED-94/feat: Generate and pass CustomerID on customer creation

* Update apps/capi/src/capi_handler_customers.erl

Co-authored-by: Boris <bpozdnyakov@gmail.com>

* refactor: fix formatting

* test: remove unnecessary asserts

Co-authored-by: Boris <bpozdnyakov@gmail.com>
2021-04-26 11:01:28 +03:00
yuri-bukhalenkov
438d0a6034
fixed: replaced old fields with a proper ones (#536)
* fixed: replaced old fields with a proper ones

* fixed: replaced old fields with a proper ones

* format
2021-04-21 11:35:04 +03:00
Yaroslav Rogov
5f2b240e25
ED 92/feat/pass invoice template id (#532)
* ED-81/refactor: pass OperationID for id gen

* deps: update damsel

* ED-92/feat: Add idempotency for invoice templates

* ED-92/fix: Fox feature indexing

* ED-92/refactor: merge single_line in common schema

* refactor: put capi_bender:make_idempotent_key to private

* refactor: rename invoice_template_create_params

* refactor: remove unused features

* fix customer_binding schema naming

* refactor: remove unlim id

* tests: add unused features check to create_invoice_template_ok_test

* refactor: remove unused id

* fix(capi_idemp_features): Fix list_all_fields algorithm

There was a bug in capi_idemp_features:list_all_fields: during zipfold, it return an incorrect accumulator with RevPath
that accumulated paths of ALL map nodes traversed so far.

It showed up in customer_binding schema I'm currently writing Unit tests for:
```
expected: [<<"paymentResource.paymentTool.exp_date">>,
<<"paymentResource.paymentSession">>]
got: [<<"paymentResource.paymentTool.exp_date">>,
<<"paymentResource.paymentTool.paymentSession">>]
```

It didn't show up in existing tests at all: bad luck I guess 🤷

* refactor: fix typo

* tests: add unit tests for customer_binding

* refactor+test: Refactor feature tests and add invoice_template tests

* fix: Add invoiceTemplateID to invoice schema

* fix: capi_bender types

* test: fix idemp unit test for templates

* test: Add missing ignored keys

* test: Add invoice_with_template_creation idemp test

* test: fix idemp unit test for templates

* refactor: remove unnecessary get_external_id clause
2021-04-16 09:30:27 +03:00
Yaroslav Rogov
35763f907d
ED-81/fix: Fix id generation (#535) 2021-04-08 12:15:32 +03:00
Yaroslav Rogov
264cf943f8
ED 81/pass rec payment tool id (#531)
* ED-81:deps: update damsel

* ED-81:deps: update build_utils

* ED-81:feat: Await externalID and use it to generate RecPaymentToolID

* fix: Add missing function

* fix typo

* ED-81:fix: Fix module name

* ED-81/fix: Add customer_binding_id to params

* ED-81/feat: Rewrite capi_bender, fix tests

* ED-81/deps: update swag scheme

* ED-81/fix: Fix signature for make_idempotent_key

* ED-81/fix: Probly fix dialyzer errors

* ED-81/fix: Totally fix dialyzer warnings

* ED-81/fix: Still Dialyzer moment

* ED-81/chore: Trigger jenkins job

* ED-81/chore: Disable dialyzer for those funs 🤷

* ED-81/fix: Finally fix dialyzer error?

* fix complex StartBinding prepare

* fix unnecesary test mock

* fix constant generation for no external_id

* fix features for payment tool token

* fix types for schemas with discriminators (unions)

* remove code duplication
2021-04-02 17:14:25 +03:00
ndiezel0
1a7f95d58e
ED-58: Implement bouncer in search and payout handlers (#529)
* ED-58: Implement bouncer in search and payout handlers

* ED-58: Add some tests

* ED-58: Fix tests

* ED-58: Add bouncer mocks and refactor tests

* ED-58: Format

* ED-58: Review fix

* ED-58: Review fix

* ED-58: Review fix and format

* ED-58: Return mock bouncer to `operations_by_base_api_token` group
2021-03-31 11:06:43 +03:00
Артем
2444fb598d
ED-54: Added bouncer integration for claims & contracts (#517)
* refactored claims & contracts

* added review changes

* fixed tests

* added minor fixes

* added another minor fixes

* fixed dialyzer

* fixed format
2021-03-26 13:56:03 +03:00
Артем
ac6d21d956
ED-56: Bouncer integration with inv and inv template (#522)
* refactored inv and inv template

* fixed tests

* refactored

* fixed test

* fixed format

* refactored wehooks

* fixed test
2021-03-26 11:29:53 +03:00
Andrey Fadeev
cf4da2ecd7
ED-84 Add bank account to invoice details (#530)
* Update swag to rbkmoney/swag@19890ad1
* Add bank account to invoice details
2021-03-22 12:14:11 +03:00
dinama
78f21e0119
Revert "Revert "ED-71: party *ByID calls (#523)"" (#528) 2021-03-16 11:11:00 +03:00
dinama
5e4a2772c5
Revert "Revert "ED-55: +geo bouncer +parties bouncer +customer bouncer"" (#526) 2021-03-15 18:39:10 +03:00
dinama
c81fa4e291 Revert "ED-55: +geo bouncer +parties bouncer +customer bouncer"
This reverts commit de2cfef0d3.
2021-03-15 11:56:55 +03:00
dinama
ff892abef4 Revert "ED-71: party *ByID calls (#523)"
This reverts commit d62050f351.
2021-03-15 11:56:55 +03:00
dinama
d62050f351 ED-71: party *ByID calls (#523)
* +add *ByID calls
* +bump swag
2021-03-12 18:05:04 +03:00
dinama
de2cfef0d3 ED-55: +geo bouncer +parties bouncer +customer bouncer 2021-03-12 18:05:04 +03:00
Andrew Mayorov
467f0a7e90
Bump to rbkmoney/image-build-erlang@9bedaf5 (#521)
* Bump to rbkmoney/image-build-erlang@9bedaf5
* Bump to rbkmoney/build_utils@fc6ac0f
* Bump to rbkmoney/image-service-erlang@c0aee9a
2021-03-11 15:08:01 +03:00
Andrew Mayorov
a709fd560f
ED-65: Safeguard bouncer integration (#516)
* Bump to rbkmoney/bouncer_client_erlang@2c083eb
* Provide sample bouncer_client config
2021-03-04 19:47:37 +03:00
Sergey Yelin
c9befca61b
ED-53: add prototypes (#515)
* Add prototypes to GetAccountByID

* Add prototypes to capi_handler_shops and capi_handler_categories

* Remove get_prototypes/3

* Rework shops handler

* Optimize some calls

* Rework accounts and categories handlers

* Torned on bouncer in tests for accounts and categories

* Enable bouncer in tests for shops
2021-03-03 21:27:04 +03:00
Andrew Mayorov
eb991049a7
ED-66: Pass bouncer ctx w/ specific access tokens (#513)
* Bump to rbkmoney/bouncer-proto@584e0ed

Use well-know auth methods instead.
2021-03-02 17:27:19 +03:00
Артем
fc93cda066
MSPF-601: Bouncer integration and webhooks (#510)
* bouncer integration WIP

* added preprocess

* added minor fixes

* remixed handler api

* fixed some tests

# Conflicts:
#	apps/capi/src/capi_auth.erl

* fixed

* fixed

* fixed test hack + format

* added empty impl bypass

* remixed

* refactored

* minor

* fixed dialyzer

* added requested changes

* fixed
2021-02-19 14:22:46 +03:00
dinama
92619bb9cd
upgrade world (#507) 2021-01-31 22:09:20 +03:00
Alexey
2ae996ac46
CAPI-430: Add transaction_info to GetPayment methods (#506) 2020-12-09 18:42:53 +03:00
Sergey Yelin
69861392b0
Add yandexpay (#505)
* Update to swag with YandexPay

* Update damsel and swag

* Add YandexPay
2020-12-08 20:19:18 +03:00
Alexey
0b618ae9c8
MSPF-622: Update woody, remove random port generation in tests (#503) 2020-11-26 11:48:14 +03:00
George Belyakov
2e6e8eace8
MSPF-614: lazy party create cut (#497)
* remove lazy party creation except GetMyParty method, tests failed - need rework tests

* fix

* fix format

* move get_party into capi_handler_parties
2020-11-09 12:26:12 +03:00
Boris
ca86b1741b
Capi-426: add party id (#491) 2020-11-05 13:03:32 +03:00
dinama
5b20d9bcc6
CAPI-427: PaymentToolToken that may expire (#495)
* bump swag&damsel

* CAPI-427: support PaymentToolToken that may expire

* Fix missing party_id

Co-authored-by: ndiezel0 <ndiezel0@gmail.com>
2020-10-30 18:46:14 +03:00
Toporkov Igor
ef87be9180
MSPF-579: Prometheus metrics (#494)
* Add Prometheus to dependencies

* Update build images

* Add MetricsRoute to config building

* Provide sample config

* Squash health and metrics routes in one argument

* Delete forgotten argument from spec

* Do not include src to release
2020-10-23 16:48:22 +03:00
Andrey Fadeev
ac236aedbc
Fix payment methods decoding when no tokenized cards are configured (#493) 2020-10-22 17:55:21 +03:00
Andrey Fadeev
74ce0cd4a0
Add formatter (#492)
* Add erlfmt
* Apply erlfmt
* Update build-utils
2020-10-14 11:45:53 +03:00
Boris
9f1b092b41
Capi-414: change idempotent checker algorithm create payment (#470) 2020-09-17 17:10:33 +03:00
Sergey Yelin
3ff33850a7
black lists (#490)
* Revert "Revert "CAPI-278: api keys blacklist (#235)" (#237)"

This reverts commit b482abaf0f.

* Add back blacklists
2020-09-15 08:40:30 +03:00
Toporkov Igor
4fec1aeb85
Hide tokenization method from public API (#488) 2020-07-29 19:09:52 +03:00
Toporkov Igor
9b6c33f44d
DC-127: Refactor payment methods (#483)
* DC-127: Refactor payment methods (#479)

* Use corresponidng epic damsel branch

* Make adjasments for new protocol version

* Update dummy data

* Use new dummy data, remove unexisting include

* Upgrade damsel

* Delete redefined macro

* Handle deprecated payment methods

* Use deprecated payment methods in dummy data

* Use master branch of damsel

* Update dependencies

* Add new payment methods to fixture

* Use library function for partitioning
2020-07-25 21:59:37 +03:00
ndiezel0
5ab42aeff7
CAPI-424: Change config (#486) 2020-07-14 16:38:52 +03:00
Roman Pushkov
fb91862e79
MSPF-487: graceful shutdown (#485)
* add drainer dep

* use drainer

* remove drainer tests

* update .app.src
2020-07-14 14:05:49 +03:00
Boris
8b29d2cfe1
MSPF-562: update damsel, add BankCard category, condition (#480) 2020-06-16 10:18:15 +03:00
Alexey
b802023836
FF-183: Upgrade damsel (#478) 2020-06-15 11:05:50 +03:00
Boris
0268dbeba4
impl callback map_error() (#476) 2020-05-13 13:55:24 +03:00
Sergey Yelin
1dd0d045c4
Update uac (#474)
* Update uac

* Fix typo
2020-05-07 09:18:44 +03:00
Sergey Yelin
2d3cd91661
MSPF-532: get rid of rfc3339 (#473)
* MSPF-532: Update image

* MSPF-532: Remove rfc339 from capi

* Upgrade libs

* Update uac

* Refactor auth code

* Fix dialyzer errors
2020-04-27 18:43:54 +03:00
Roman Pushkov
52c9a22706
CAPI-417: hooker limit exceeded (#472)
* update damsel

* add test placeholder

* add handler placeholder

* update swag

* fix mock

* Update capi_base_api_token_tests_SUITE.erl

* fix syntax error

* test fix
2020-04-15 11:38:45 +03:00
Alexey
d020d19792
HG-535: Handle the new invoiceTermsViolated hg error (#471) 2020-04-06 11:04:24 +03:00
Roman Pushkov
bc3237656a
CAPI-375: chargebacks, capi handlers (#387)
* update swag

* bump damsel

* update dummy data

* add tests

* add chargebacks handlers

* add chargeback decoder

* update capi client

* Update capi_client_payments.erl

* update tests

* Update capi_dummy_data.hrl

* Update capi_dummy_data.hrl

* fix tests

* fix typo

* Update capi_base_api_token_tests_SUITE.erl

* refactor decoder

* fix indentation

* fix unused context

* add cb auth

* Revert "update swag"

This reverts commit 6c0e3cadf1c3c9de156678efcab6931e38c04220.

* update swag

* decode reason code
2020-04-02 20:38:41 +03:00
Andrey Fadeev
1eb3969697
FF-164 Update damsel (#468)
Add rbkmoney/damsel#546 changes support
2020-03-10 15:20:09 +03:00
Sergey Yelin
3c5705d15f
CAPI-143: Fix crash on incomplete request (#467)
* CAPI-143: Fix crash on incomplete request

* Remove warning
2020-03-04 10:05:22 +03:00
Alexey
94637e4959
CAPI-407: Better email format validation (#466) 2020-03-02 17:15:18 +03:00