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

fix(connector): [Novalnet] Add mandatory fields for wallets and card in config #6463

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

cookieg13
Copy link
Contributor

@cookieg13 cookieg13 commented Oct 29, 2024

Type of Change

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

Description

  1. Added mandatory fields for googlepay, paypal and applepay needed for Novalnet in config
  2. Added mandatory fields for card mandates needed for Novalnet in config

Additional Changes

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

Motivation and Context

Fix to this issue https://github.com/juspay/hyperswitch-cloud/issues/7291

How did you test it?

Manually tested with postman

Payment Methods Response
{ "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": [ { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "novalnet" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "12345" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": "[email protected]" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "DE" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "first_name", "field_type": "user_full_name", "value": "Max" }, "browser_info.language": { "required_field": "browser_info.language", "display_name": "browser_info_language", "field_type": "browser_language", "value": null }, "browser_info.ip_address": { "required_field": "browser_info.ip_address", "display_name": "browser_info_ip_address", "field_type": "browser_ip", "value": null }, "billing.address.line2": { "required_field": "payment_method_data.billing.address.line2", "display_name": "line1", "field_type": "user_address_line2", "value": "CA" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "last_name", "field_type": "user_full_name", "value": "Mustermann" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "Musterhausen" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "google_pay", "payment_experience": [ { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "novalnet" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "first_name", "field_type": "user_full_name", "value": "Max" }, "browser_info.ip_address": { "required_field": "browser_info.ip_address", "display_name": "browser_info_ip_address", "field_type": "browser_ip", "value": null }, "billing.address.line2": { "required_field": "payment_method_data.billing.address.line2", "display_name": "line1", "field_type": "user_address_line2", "value": "CA" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "last_name", "field_type": "user_full_name", "value": "Mustermann" }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": "[email protected]" }, "browser_info.language": { "required_field": "browser_info.language", "display_name": "browser_info_language", "field_type": "browser_language", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "DE" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "Musterhausen" }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "12345" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "paypal", "payment_experience": [ { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "novalnet" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "first_name", "field_type": "user_full_name", "value": "Max" }, "billing.address.line2": { "required_field": "payment_method_data.billing.address.line2", "display_name": "line1", "field_type": "user_address_line2", "value": "CA" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "Musterhausen" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "last_name", "field_type": "user_full_name", "value": "Mustermann" }, "browser_info.ip_address": { "required_field": "browser_info.ip_address", "display_name": "browser_info_ip_address", "field_type": "browser_ip", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "12345" }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": "[email protected]" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "DE" }, "browser_info.language": { "required_field": "browser_info.language", "display_name": "browser_info_language", "field_type": "browser_language", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "novalnet" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "novalnet" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "first_name", "field_type": "user_full_name", "value": "Max" }, "billing.address.line2": { "required_field": "payment_method_data.billing.address.line2", "display_name": "line1", "field_type": "user_address_line2", "value": "CA" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "Musterhausen" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "last_name", "field_type": "user_full_name", "value": "Mustermann" }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "12345" }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": "[email protected]" }, "browser_info.ip_address": { "required_field": "browser_info.ip_address", "display_name": "browser_info_ip_address", "field_type": "browser_ip", "value": null }, "browser_info.language": { "required_field": "browser_info.language", "display_name": "browser_info_language", "field_type": "browser_language", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "DE" } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "novalnet" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "novalnet" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": "Musterhausen" }, "browser_info.language": { "required_field": "browser_info.language", "display_name": "browser_info_language", "field_type": "browser_language", "value": null }, "billing.email": { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": "[email protected]" }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": "DE" }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": "12345" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "first_name", "field_type": "user_full_name", "value": "Max" }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "last_name", "field_type": "user_full_name", "value": "Mustermann" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": "1467" }, "billing.address.line2": { "required_field": "payment_method_data.billing.address.line2", "display_name": "line1", "field_type": "user_address_line2", "value": "CA" }, "browser_info.ip_address": { "required_field": "browser_info.ip_address", "display_name": "browser_info_ip_address", "field_type": "browser_ip", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false }

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

@cookieg13 cookieg13 added the A-connector-integration Area: Connector integration label Oct 29, 2024
@cookieg13 cookieg13 self-assigned this Oct 29, 2024
@cookieg13 cookieg13 requested a review from a team as a code owner October 29, 2024 12:23
Copy link

semanticdiff-com bot commented Oct 29, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/configs/defaults/payment_connector_required_fields.rs  0% smaller

@cookieg13 cookieg13 changed the title Add mandatory fields for googlepay, paypal and applepay fix(connector): [Novalnet] Add mandatory fields for wallets and card in config Oct 29, 2024
@cookieg13 cookieg13 force-pushed the defaultFixesForNovalnet branch from 2c1182b to 021cd3a Compare November 4, 2024 08:07
@cookieg13 cookieg13 requested a review from a team as a code owner November 4, 2024 08:07
@cookieg13 cookieg13 force-pushed the defaultFixesForNovalnet branch 2 times, most recently from 6d84e80 to f4be25e Compare November 4, 2024 08:30
@cookieg13 cookieg13 removed the request for review from a team November 4, 2024 11:15
@cookieg13 cookieg13 force-pushed the defaultFixesForNovalnet branch 2 times, most recently from df3d19d to f1d15e4 Compare November 5, 2024 12:25
"billing.address.line2".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.line2".to_string(),
display_name: "line1".to_string(),
Copy link
Contributor

@srujanchikke srujanchikke Nov 5, 2024

Choose a reason for hiding this comment

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

Suggested change
display_name: "line1".to_string(),
display_name: "line2".to_string(),

can we change it at all other places?

@cookieg13 cookieg13 force-pushed the defaultFixesForNovalnet branch from f1d15e4 to 4f8b3e0 Compare November 6, 2024 07:07
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 8, 2024
@likhinbopanna likhinbopanna removed this pull request from the merge queue due to a manual request Nov 8, 2024
@likhinbopanna
Copy link
Contributor

@cookieg13 Please raise the another PR regarding cypress changes

@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 3d9f443 Nov 8, 2024
16 of 17 checks passed
@likhinbopanna likhinbopanna deleted the defaultFixesForNovalnet branch November 8, 2024 13:37
bsayak03 pushed a commit that referenced this pull request Nov 26, 2024
bsayak03 pushed a commit that referenced this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants