Merge pull request #2103 from medici/task/capture-pan-before-osv
Capture-pan-before-osv
This commit is contained in:
@@ -313,7 +313,7 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<UploadDataAsyncResponse>>
|
||||
|
||||
@Multipart
|
||||
@POST("/customer-service/customers/me/osv-aadhaar-upload")
|
||||
@POST("/customer-service/customers/me/osv-document-upload")
|
||||
suspend fun submitPhysicalOvd(
|
||||
@Part front: MultipartBody.Part? = null,
|
||||
@Part back: MultipartBody.Part? = null,
|
||||
|
||||
@@ -498,13 +498,14 @@ class PhysicalKycFragment : BaseFragment(), BackListener, VideoKycItemsListener,
|
||||
private fun onClickUploadIdPhoto(
|
||||
backSide: Boolean = false,
|
||||
backSideRequired: Boolean = false,
|
||||
title: String
|
||||
title: String,
|
||||
type: String? = null
|
||||
) {
|
||||
val hvDocConfig = hvDocConfig(backSide, title)
|
||||
HVDocsActivity.start(
|
||||
requireContext(),
|
||||
hvDocConfig,
|
||||
docCaptureHandler(backSide, backSideRequired, title)
|
||||
docCaptureHandler(backSide, backSideRequired, title, type)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -543,7 +544,8 @@ class PhysicalKycFragment : BaseFragment(), BackListener, VideoKycItemsListener,
|
||||
onClickUploadIdPhoto(
|
||||
false,
|
||||
videoKycItem?.isBackRequired.orFalse(),
|
||||
videoKycItem?.title.plus(getString(R.string.capture))
|
||||
videoKycItem?.title.plus(getString(R.string.capture)),
|
||||
videoKycItem?.type
|
||||
)
|
||||
} else {
|
||||
analyticsEventTracker.onRequestCameraPermission()
|
||||
@@ -557,11 +559,12 @@ class PhysicalKycFragment : BaseFragment(), BackListener, VideoKycItemsListener,
|
||||
private fun docCaptureHandler(
|
||||
backSide: Boolean,
|
||||
backSideRequired: Boolean = true,
|
||||
title: String
|
||||
title: String,
|
||||
type: String? = null
|
||||
) =
|
||||
DocCaptureCompletionHandler { _, data ->
|
||||
data?.imageURI?.let {
|
||||
supportedOvd.document = OVD_UPLOAD
|
||||
supportedOvd.document = type.orEmpty()
|
||||
if (backSideRequired) {
|
||||
if (backSide) {
|
||||
supportedOvd.backUrl = it
|
||||
@@ -571,7 +574,8 @@ class PhysicalKycFragment : BaseFragment(), BackListener, VideoKycItemsListener,
|
||||
onClickUploadIdPhoto(
|
||||
backSide = true,
|
||||
backSideRequired = true,
|
||||
title = title
|
||||
title = title,
|
||||
type = type
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user