-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cypress): add 2 more payout connectors and bank transfer support for payout #4993
Conversation
- Add 2 more payout connectors: - Adyen Platform - Wise - Add Bank Transfers - SEPA - Refactor Payouts to accommodate these changes
…outs * 'main' of github.com:juspay/hyperswitch: feat(router): include the pre-routing connectors in Apple Pay retries (#4952) fix(cypress): Add `jwt_token` and `cookie` for routing test (#4953) feat(connectors): [Iatapay] add payment methods (#4968) chore(version): 2024.06.13.0 feat(payouts): make payout_type optional in payouts table (#4954) feat(connector): [BOA/CYB] Make billTo fields optional (#4951) fix(core): fix the multitenancy prefix in routing cache (#4963) refactor(connector): [Mifinity]Move destination_account_number from pmd to Mifinity Metadata (#4962) refactor(payment_methods): Enable deletion of default Payment Methods (#4942)
let sourceBalanceAccount = null; | ||
if (authDetails && typeof authDetails === "object") { | ||
// Specific to `AdyenPlatform` payout connector | ||
// If the connector has source_balance_account in creds file, set it in the body and remove it from authDetails | ||
sourceBalanceAccount = authDetails.source_balance_account; | ||
delete authDetails.source_balance_account; | ||
} | ||
authDetails = authDetails; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be refactored such that metadata is handled while fetching credentials rather that hardcoding each value of metadata for MCA. Raise a seperate pr for the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this was hardcoded and is specific to adyenplatform
connector (mentioned in comments as well) as sourceBalanceAccount
is being passed as a value to metadata
. It is a secret value which cannot be made public (can be treated as key1
)
For context, above is a temporary change and I'll be modifying get_value_by_key
to accommodate below mentioned change:
get_value_by_key()
has been duplicated in multiple places, this can be unified- Can be 2 copies, one with merger (logic that merges
common.js
andconnector.js
files into one) and the other one being the legacy one. Will look into it
- Can be 2 copies, one with merger (logic that merges
- format of creds will have to be modified first:
// from { "connector": { "auth_type": "KeyType", "api_key": "api_key", "key1": "key1", // other kv pairs }, // another one } // to something like, will be decided later when picked up { "connector": { "auth_type": "KeyType", "api_key": "api_key", "key1": "key1", // other kv pairs "metadata": { "key": "value", // other kv pairs } }, }
- Any
key
that lies outside ofauth_info
(auth_type
,api_key
,key1
,key2
, andapi_secret
) should be treated asmetadata
prettier config have been added to maintain consistency across all environments. can be run using `prettier . --write` in `cypress-tests` directory
we will getting back to this later in future
8c72275
to
6eddd39
Compare
…ress-skip * 'main' of github.com:juspay/hyperswitch: (27 commits) feat(cypress): add 2 more payout connectors and bank transfer support for payout (#4993) chore(version): 2024.06.20.0 Refactor(core): reverts the payment method list filtering using constraint graph (#5044) feat(router): add payment method type duplication check for `google_pay` (#5023) refactor(storage): remove `id` from payment intent, attempt and remove datamodel ext from payment intent (#4923) fix(events): Correct parsing of API events with user event_type for Clickhouse (#5022) fix(connector): add local bank redirect type in compatibility layer, default the country to AT for Local Bank Redirect and add creds_identifier in access token (#5038) refactor(connector): add amount conversion framework for noon (#4843) fix(logging): fix stack overflow on recording restricted keys (#4423) feat(core): Add logger for sessions call failure (#5036) chore(version): 2024.06.19.0 fix(opensearch): handle index not present errors in search api (#4965) feat(multitenancy): add tenant_id as a field for data pipeline and support individual database for clickhouse (#4867) refactor: add basic counter metrics for IMC (#5006) fix(payment_methods): populate card fields while saving card again during metadata change condition (#5019) feat(router): Override the `setup_future_usage` to `on_session` based on the merchant config (#5016) chore(docker-compose): pass correct configuration values for running SDK demo app (#5012) refactor: Move trait ConnectorIntegration to crate hyperswitch_interfaces (#4946) chore(version): 2024.06.17.0 chore(process_tracker): use `const` instead of `String` for `business_status` (#4849) ...
Type of Change
Description
This PR modifies Payout tests. Notably, 2 more connectors has been added namely,
Adyen Platform
andWise
.Adyen Platform
andWise
payout connectors only supportBank Transfers
unlikeAdyen
which supports cards as well. Hence, for connectors that does not support a payment method, we throw501
by leveragingCommon.js
(except forWise
that has a different error message for501
unlike other connectors -- this will optimized and refactored in the coming refactor).Flow is as below:
Upcoming refactor will remove duplicate connector Create commands (we currently have 3 connector create commands in
commands.js
) by making it more generic and reusable. The same has to be done forconfirm
calls as well.Additionally, configs for
prettier
has been added just to maintain consistency across all environments.To run auto-formatting, execute the below command in terminal:
prettier . --write
Note
8c72275 removes KV support in Payouts. We'll be coming back to this later in future. Added here for reference
Additional Changes
Motivation and Context
More tests
How did you test it?
BACS, ACH not implemented yet.
Checklist
cargo +nightly fmt --all
cargo clippy