hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

refactor(required_fields): change required fields for billing address

Open Narayanbhat166 opened this issue 1 year ago • 0 comments

Type of Change

  • [x] Refactoring

Description

This PR changes the dynamic fields to collect card_holder_name as payment_method_data.billing.first_name and payment_method_data.billing.last_name. Backwards compatibility has been provided, so if card_holder_name is passed, then it will override the payment_method_data.billing.first_name and payment_method_data.billing.last_name passed in billing details.

All the required fields for billing details are changed to be collected as payment_method_data.billing

Additional Changes

  • [x] This PR modifies the API contract

The billing details will now be collected in payment_method_billing.

Motivation and Context

Standardise the way in which to collect billing details.

How did you test it?

  • Create a payment via sdk ( use bambora connector, as card_holder_name is a required field ) image

  • Check the /confirm call and confirm if card holder name is passed in billing details along with other billing fields. image

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code

Narayanbhat166 avatar Apr 01 '24 05:04 Narayanbhat166