checkout / frames-android

Frames Android: making native card payments simple
https://www.checkout.com/docs/integrate/sdks/android-sdk
MIT License
47 stars 32 forks source link

PIMOB:2180 - Added CVV validation along with card scheme #238

Closed chintan-soni-cko closed 9 months ago

chintan-soni-cko commented 9 months ago

Issue

PIMOB-2180

Proposed changes

Code Refactor changes

  1. Rename package from cvvcomponent to cvvinputfield
  2. Rename CVVComponentViewModel to CVVInputFieldViewModel
  3. Rename CVVComponentViewModelFactory to CVVInputFieldViewModelFactory Note: renaming and refactoring were done just for a more aligned naming convention for us which is input field

Test Steps

  1. Add a different scheme in CVVComponentConfig from MainActivity
  2. Validate local logs for it whether isEnteredcvvValid value is updating properly according to card schemes

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...

jheng-hao-lin-cko commented 9 months ago

Shall we support multiple card scheme on the same view for testing purpose?

chintan-soni-cko commented 9 months ago

Let's find a way to test different card schemes without changing the code.

We will do it in sample app design

chintan-soni-cko commented 9 months ago

Shall we support multiple card scheme on the same view for testing purpose?

Shall we support multiple card scheme on the same view for testing purpose?

Would it be fine if we pick this as part of PIMOB-2176 ticket and not blocking this PR? However, we can currently check from the sample app by changing the card scheme.