Closed chintan-soni-cko closed 10 months ago
Well done 🔥 🔥 🔥 🔥 🔥
Coverage and Duplications on New Code 80.6% 80.6% Coverage on New Code
What's the expected behaviour for the request when a country or number field is set to optional? Should the country or number fields be included in the request and set to
null
? Verified with Custom UI screen,country
is set to optional and it's included in the request withnull
value; Same for the phone fieldVerified locally, phone or country field can be set optional and still generate the token.
@jheng-hao-lin-cko Thanks for verifying it. If any of the fields for country and phone is empty, it will not generate the token and throw the validation error from the server. In the SDK, it will mapped in the final request and respective fields will be not sent along with the token request. below are logs for requests.
{"type":"card","number":"4242424242424242","expiry_month":"12","expiry_year":"33","name":"Test Name","cvv":"233","billing_address":{"address_line1":"Checkout.com","address_line2":"90 Tottenham Court Road","city":"London","state":"London","zip":"W1T 4TJ","country":"GB"}}
{"type":"card","number":"4242424242424242","expiry_month":"12","expiry_year":"33","name":"Test Name","cvv":"123","billing_address":{"address_line1":"","address_line2":"","city":"city","state":"","zip":"postcode"},"phone":{"number":"232332323232323"}}
Issue
PIMOB-2117
Proposed changes
Scenarios in data models
Test Steps
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...