Skip to content
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

refactor: separate DB queries and HTML creation for payout links #4967

Merged
merged 101 commits into from
Jun 25, 2024

Conversation

kashif-m
Copy link
Contributor

@kashif-m kashif-m commented Jun 12, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds below features

  • provision for creating payout links
  • adds payouts confirm endpoint for collecting payout method details for processing payouts
  • [incomplete feature] provision for creating and collecting payment method data using Collect Links

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Tested locally

  • Create payout links using postman collection
  • Open the link
  • Enter details
  • Submit!

https://galactic-capsule-229427.postman.co/workspace/My-Workspace~2b563e0d-bad3-420f-8c0b-0fd5b278a4fe/collection/9906252-e9eb1c28-489b-4ada-bd00-57c2b4459dea?action=share&creator=9906252

Screencast.from.14-06-24.01.29.08.PM.IST.webm

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

kashif-m and others added 30 commits April 18, 2024 15:22
…ms + DB queries + transformers

add create collect link flow - validate and initiate flow
refactor(diesel_models/generic_link): add distinct queries as per link_type
refactor(collect_link): hide sensitive data
feat(collect_link): inject dynamic content in collect link and it's status page
crates/common_utils/src/link_utils.rs Outdated Show resolved Hide resolved
crates/diesel_models/src/query/generic_link.rs Outdated Show resolved Hide resolved
crates/diesel_models/src/query/generic_link.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_methods.rs Show resolved Hide resolved
crates/router/src/core/payment_methods.rs Outdated Show resolved Hide resolved
crates/router/src/core/payout_link.rs Outdated Show resolved Hide resolved
crates/router/src/core/payouts.rs Outdated Show resolved Hide resolved
crates/router/src/services/api/generic_link_response.rs Outdated Show resolved Hide resolved
migrations/2024-04-17-084906_add_generic_link_table/up.sql Outdated Show resolved Hide resolved
migrations/2024-04-17-084906_add_generic_link_table/up.sql Outdated Show resolved Hide resolved
@SanchithHegde SanchithHegde added the M-configuration-changes Metadata: This PR involves configuration changes label Jun 25, 2024
SanchithHegde
SanchithHegde previously approved these changes Jun 25, 2024
@@ -676,7 +676,13 @@ impl Settings<SecuredSecret> {
.with_list_parse_key("redis.cluster_urls")
.with_list_parse_key("events.kafka.brokers")
.with_list_parse_key("connectors.supported.wallets")
.with_list_parse_key("connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id"),
.with_list_parse_key("connector_request_reference_id_config.merchant_ids_send_payment_id_as_connector_request_id")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not scalable: this would not allow us to use any suitable key (any possible enum variant) in the HashMap, but only restricts to the specified keys. We would need to address this in a separate PR.

crates/api_models/src/admin.rs Show resolved Hide resolved
Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for dashboard

Comment on lines +15 to +17
Payout {
payout_id: String,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might need some changes in the api_events.sql in /crates/analytics/src/docs/scripts/clickhouse

Comment on lines +62 to +64
PaymentMethodCollectLink {
link_id: String,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might need some changes in the api_events.sql in /crates/analytics/src/docs/scripts/clickhouse

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 25, 2024
Merged via the queue into main with commit 9e4b2d1 Jun 25, 2024
19 checks passed
@Gnanasundari24 Gnanasundari24 deleted the payout_link_ref branch June 25, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-api-contract-changes Metadata: This PR involves API contract changes M-configuration-changes Metadata: This PR involves configuration changes M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add links for collecting payout method details
10 participants