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(connector): [Fiuu] Consume error message thrown by connector for Psync flow and make extraP from response struct Secret #6934

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cookieg13
Copy link
Contributor

@cookieg13 cookieg13 commented Dec 24, 2024

Type of Change

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

Description

  1. Need to consume error code and error message thrown by connector for PaymentsSync flow. This is to ensure that error code unification works properly
Screenshot 2024-12-24 at 17 10 09 Screenshot 2024-12-24 at 17 10 24
  1. Need to make extraP in FiuuWebhooksPaymentResponse Secret since extraP may contain sensitive data
Screenshot 2024-12-24 at 15 22 31
pub struct FiuuWebhooksPaymentResponse {
    pub skey: Secret<String>,
    pub status: FiuuPaymentWebhookStatus,
    #[serde(rename = "orderid")]
    pub order_id: String,
    #[serde(rename = "tranID")]
    pub tran_id: String,
    pub nbcb: String,
    pub amount: StringMajorUnit,
    pub currency: String,
    pub domain: Secret<String>,
    pub appcode: Secret<String>,
    pub paydate: String,
    pub channel: String,
    pub error_desc: Option<String>,
    pub error_code: Option<String>,
    #[serde(rename = "extraP")]
    pub extra_parameters: Option<String>,
}

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. Need to consume error message thrown by connector for PaymentsSync flow
    Could not simulate psync failure case locally, so could not test it

  2. Need to make extraP in FiuuWebhooksPaymentResponse Secret since extraP may contain sensitive data

Before (Card info inside extraP getting logged)
Screenshot 2024-12-23 at 13 18 24

After (extraP is masked)
Screenshot 2024-12-24 at 15 19 14

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 requested a review from a team as a code owner December 24, 2024 11:11
Copy link

semanticdiff-com bot commented Dec 24, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/fiuu.rs  42% smaller
  crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs  31% smaller

@cookieg13 cookieg13 self-assigned this Dec 24, 2024
@cookieg13 cookieg13 changed the title add improvements for fiuu connector feat(connector): [Fiuu] add improvements for fiuu connector Dec 24, 2024
@cookieg13 cookieg13 changed the title feat(connector): [Fiuu] add improvements for fiuu connector feat(connector): [Fiuu] Consume error message thrown by connector and make extraP from response struct Secret Dec 24, 2024
@cookieg13 cookieg13 changed the title feat(connector): [Fiuu] Consume error message thrown by connector and make extraP from response struct Secret feat(connector): [Fiuu] Consume error message thrown by connector for Psync and make extraP from response struct Secret Dec 24, 2024
@cookieg13 cookieg13 changed the title feat(connector): [Fiuu] Consume error message thrown by connector for Psync and make extraP from response struct Secret feat(connector): [Fiuu] Consume error message thrown by connector for Psync flow and make extraP from response struct Secret Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants