Skip to content

Commit

Permalink
Allow manually captured document photos to be retaken (#1254)
Browse files Browse the repository at this point in the history
If a user uploaded an ID document photo from
their camera roll or file browser which could not
be decoded by the server, the user would have no
way to select a new photo to upload because the
"Select" button would not display on the screen.
This fix resets the `DocumentUploader` when the
ViewController's `reset` method is called after
the user encounters an error state, enabling the
"Select" buttons so they can upload a new photo.
  • Loading branch information
mludowise-stripe authored Jun 24, 2022
1 parent cf67449 commit 8c18e0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Identity
* [Fixed] Fixed an issue where the welcome and confirmation screens were not correctly decoding non-ascii characters.
* [Fixed] Fixed an issue where, if a manually uploaded document could not be decoded on the server, there was no way to select a new image to upload.

## 22.5.1 2022-06-21
* [Fixed] Fixed an issue with `STPPaymentHandler` where returning an app redirect could cause a crash.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,8 @@ extension DocumentFileUploadViewController: IdentityDataCollecting {
// that the user isn't erroneously prompted to scan their document twice.
return [.idDocumentFront, .idDocumentBack]
}

func reset() {
documentUploader.reset()
}
}

0 comments on commit 8c18e0c

Please sign in to comment.