Created a function getBillingAddress that will fetch the billing address of the field specified in the billingAddressFields array. The function returns an object with address details as per token API requirement if all the fields required for AVS are present. Otherwise the function returns null indicating billing address is not complete.
When billing address is not complete as per AVS.
When billing address is complete as per AVS but street address 2 is missing.
When billing address is complete as per AVS and street address 2 is present.
1. Objective
Send billing address to create token only if all the fields required for AVS are present.
Jira Ticket: #1178
2. Description of change
Created a function
getBillingAddress
that will fetch the billing address of the field specified in thebillingAddressFields
array. The function returns an object with address details as per token API requirement if all the fields required for AVS are present. Otherwise the function returnsnull
indicating billing address is not complete.When billing address is not complete as per AVS.
When billing address is complete as per AVS but street address 2 is missing.
When billing address is complete as per AVS and street address 2 is present.
🔧 Environments: