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: pass customer object to make_pm_data #3246

Merged
merged 7 commits into from
Jan 9, 2024

Conversation

Chethan-rao
Copy link
Contributor

@Chethan-rao Chethan-rao commented Jan 4, 2024

Type of Change

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

Description

This PR includes changes for -

  • Passing customer object to make_pm_data function so that we can access email field (or any other field of customer in future)
  • Fix plaid MCA creation - in validate_auth_and_metadata_type
  • Throw MissingRequiredField (email) error when email is not present when doing bank debit payment (ach)
  • Remove from implementation for Email to support only from_str

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. Do a bank debit payment with plaid configured as MCA without email. Get the token from list_customer_payment_method and do confirm. You will get below error:

image

  1. Pass an email during /confirm. Payment will go through

image

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 S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor labels Jan 4, 2024
@Chethan-rao Chethan-rao self-assigned this Jan 4, 2024
@Chethan-rao Chethan-rao requested review from a team as code owners January 4, 2024 13:24
Sarthak1799
Sarthak1799 previously approved these changes Jan 4, 2024
@Sarthak1799
Copy link
Contributor

Some CI checks are failing, otherwise LGTM

vspecky
vspecky previously approved these changes Jan 5, 2024
Sarthak1799
Sarthak1799 previously approved these changes Jan 5, 2024
@Chethan-rao Chethan-rao dismissed stale reviews from Sarthak1799 and vspecky via ca61924 January 5, 2024 11:08
Copy link
Contributor

@srujanchikke srujanchikke left a comment

Choose a reason for hiding this comment

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

Reviewed connector code

@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit 36c32c3 Jan 9, 2024
@likhinbopanna likhinbopanna deleted the add-customer-param branch January 9, 2024 14:50
pixincreate added a commit that referenced this pull request Jan 9, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(pm_list): add required fields for Ideal  (#3183)
  refactor: pass customer object to `make_pm_data` (#3246)
  feat(Connector): [VOLT] Add support for Payments Webhooks (#3155)
  fix(users): Added merchant name is list merchants (#3289)
  fix(outgoingwebhookevents): Throw an error when outgoing webhook events env var not found (#3291)
  fix(wasm): fix failing `wasm-pack build` for `euclid_wasm` (#3284)
  ci: add workflow to create stable SemVer tag for a given CalVer tag (#3285)
  fix(connector): [BOA, Cybersource] capture error_code (#3239)
  fix(connector): [BOA/CYB] Fix Metadata Error (#3283)
  chore(version): 2024.01.08.0
  fix: introduce net_amount field in payment response (#3115)
  ci(postman): Adyen assertion fix for expired card test case  (#3279)
  feat(connector): Add Revoke mandate flow (#3261)
  refactor(drainer): change logic for trimming the stream and refactor for modularity (#3128)
  fix(router): Payment link api contract change (#2975)
  feat(pm_list): add required fields for eps (#3169)
  refactor(api_lock): allow api lock on psync only when force sync is true (#3242)
  fix(router): multiple incremental_authorizations with kv enabled (#3185)
  feat(payments): add payment id in all the payment logs (#3142)
  ci: add reusable workflow to create nightly tags in CalVer format (#3247)
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants