Closed jheng-hao-lin-cko closed 1 year ago
LGTM but let's wait for @chintan-soni-cko before merging it
LGTM. Can you check? why verification-full is unable to send the slack message? here
The secret was not setup to expose to PR and now have updated it. it works fine now.
Issue
PIMOB-1767
Proposed changes
Problem Currently the
BillingAddress
is including the payment tokenisation process no matter whether the form is enabled or whether theBillingAddress
is edited by the user. Which causes the SDK sending a default emptyBillingAddress
with the default country instead of anull
value.Solution
PaymentStateManager#isBillingAddressEnabled: MutableStateFlow<Boolean>
to store a boolean of payment form is enabled.BillingAddress#isEdited()
to compare the current data is same as a default one.PayButtonViewModel#provideCardData
to decide whether we need to provide theBillingAddress
data. We should provide it only when the billing address is enabled and the address is edited.Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you choose the solution you did and what alternatives you considered, etc...