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(core): Changed frm_config format type in merchant_connector_account and added frm_message in payments response #1543

Merged
merged 53 commits into from
Jul 26, 2023

Conversation

rishavkar
Copy link
Contributor

@rishavkar rishavkar commented Jun 26, 2023

Type of Change

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

Description

These changes are done for FRM related improvements:

  • add frm_message to PaymentData...changed PaymentsResponse struct and added frm_message
  • changed type of payment_method_type in FrmPaymentMethodType
  • changed type of FrmConfig to new type...made relevant changes....also changes api contract and db schema
  • Make email service optional for frm
  • Make email feature optional in AppStateInfo

Additional Changes

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

changes in DB schema to change type of frm_configs:

ALTER TABLE merchant_connector_account 
ALTER COLUMN frm_configs TYPE jsonb[]
USING ARRAY[frm_configs]::jsonb[];

changed the API contract for merchant_connector_account.... frm_configs field changed to :

#[schema(example = json!([{
        "gateway": "stripe",
        "payment_methods": [{
            "payment_method": "card",
            "payment_method_types": [{
                    "payment_method_type": "credit",
                    "card_networks": [
                        "Visa"
                    ],
                    "flow": "pre",
                    "action": "cancel_txn"
                },
                {
                    "payment_method_type": "debit",
                    "card_networks": [
                        "Visa"
                    ],
                    "flow": "pre"
                }
            ]
        }]
    }]))]
    pub frm_configs: Option<Vec<FrmConfigs>>,

Motivation and Context

Needed to change these, so that they can be consumed by our FRM module.

How did you test it?

Checklist

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

@rishavkar rishavkar requested review from a team as code owners June 26, 2023 09:06
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Jun 26, 2023
@SanchithHegde SanchithHegde changed the title dependency_updates(core): Make email feature optional, and changed frm_config and payments response for frm changes in VAS dependency_updates(core): Make email feature optional, and changed frm_config and payments response Jun 28, 2023
@rishavkar rishavkar requested a review from a team as a code owner July 6, 2023 13:06
crates/api_models/src/admin.rs Outdated Show resolved Hide resolved
crates/api_models/src/admin.rs Outdated Show resolved Hide resolved
crates/api_models/src/admin.rs Outdated Show resolved Hide resolved
crates/router/src/core/admin.rs Outdated Show resolved Hide resolved
crates/router/src/core/admin.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_methods/vault.rs Outdated Show resolved Hide resolved
crates/router/src/core/payment_methods/vault.rs Outdated Show resolved Hide resolved
crates/router/src/core/payments/helpers.rs Outdated Show resolved Hide resolved
crates/router/src/routes/app.rs Outdated Show resolved Hide resolved
crates/router/src/types/transformers.rs Show resolved Hide resolved
@jagan-jaya jagan-jaya added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Jul 11, 2023
@jagan-jaya jagan-jaya changed the title dependency_updates(core): Make email feature optional, and changed frm_config and payments response dependency_updates(core): Make email feature optional and changed frm_config and payments response Jul 11, 2023
@jagan-jaya jagan-jaya changed the title dependency_updates(core): Make email feature optional and changed frm_config and payments response feat(core): Make email feature optional and changed frm_config and payments response Jul 11, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Jul 11, 2023
crates/common_utils/src/consts.rs Outdated Show resolved Hide resolved
@lsampras lsampras requested review from a team, jarnura and ashokkjag as code owners July 12, 2023 11:22
@bernard-eugine bernard-eugine added the P-high Priority: High label Jul 13, 2023
);

CREATE TABLE fraud_check (
id SERIAL PRIMARY KEY,
Copy link
Member

Choose a reason for hiding this comment

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

We need to move away from auto increment ids for any distributed storage related approaches. And migration without downtime with auto-increment id's also hard. So don't need this field

crates/diesel_models/src/query/fraud_check.rs Show resolved Hide resolved
jagan-jaya
jagan-jaya previously approved these changes Jul 26, 2023
@jagan-jaya jagan-jaya added this pull request to the merge queue Jul 26, 2023
Merged via the queue into main with commit c284f41 Jul 26, 2023
@jagan-jaya jagan-jaya deleted the make-email-feature-optional branch July 26, 2023 13:15
@SanchithHegde SanchithHegde added A-core Area: Core flows C-feature Category: Feature request or enhancement and removed P-high Priority: High S-waiting-on-author Status: This PR is incomplete or needs to address review comments ageing >2weeks Created > 2 weeks labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

8 participants