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

feat: add support for merchant to pass public key and ttl for encrypting payload #4456

Merged
merged 4 commits into from May 1, 2024

Conversation

Chethan-rao
Copy link
Contributor

@Chethan-rao Chethan-rao commented Apr 24, 2024

Type of Change

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

Description

This PR adds support for merchant to pass his public key as well as ttl using update endpoint of business profile. The config passed is stored in business profile table as JSONB.

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?

  1. Create a business profile for a merchant (Default one which gets created during merchant account creation works too)
  2. Use update endpoint of business profile to pass config.
curl --location 'http://localhost:8080/account/:merchant_id/business_profile/:profile_id' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
    "extended_card_info_config": {
        "public_key": "pub_key_1",
        "ttl_in_secs": 60
    }
}'

image

  1. For verifying, u could check the db if the config is stored in extended_card_info_config column in business_profile table using below query
SELECT extended_card_info_config FROM business_profile WHERE profile_id = 'profile_id';

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
  • I added a CHANGELOG entry if applicable

@Chethan-rao Chethan-rao added C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Apr 24, 2024
@Chethan-rao Chethan-rao added this to the April 2024 milestone Apr 24, 2024
@Chethan-rao Chethan-rao self-assigned this Apr 24, 2024
@Chethan-rao Chethan-rao requested review from a team as code owners April 24, 2024 16:14
@Chethan-rao Chethan-rao linked an issue Apr 24, 2024 that may be closed by this pull request
Base automatically changed from extended-card-info-config to main April 25, 2024 12:53
@Chethan-rao Chethan-rao added the M-database-changes Metadata: This PR involves database schema changes label Apr 26, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit b562e62 May 1, 2024
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the merchant-info-for-extended-card-feat branch May 1, 2024 10:50
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accepting merchant public key and ttl for encrypting payload
6 participants