Added last4 for v4 api physcial HCB card activations. #10085
+44
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the problem
This method under the v4 api allowed anyone to activate a physical HCB card without the last 4 digits being submitted. #10075
Describe your changes
Adds a check to mandate and verify the last 4 digits of the physical HCB card before activation. This can be called via a
PATCH
request to/api/v4/cards/:card_id
with the Authorization token being your Bearer and the URL parameters beinglast4: last 4 digits
andstatus: active
.Status: frozen
does not require last4.Also removed the ability to freeze cancelled cards because the card is frozen FOREVER already ;)
This will affect the HCB mobile app as it will now require the last4 before it can authorize the activation CC: @thedev132