add bypass http
This commit is contained in:
parent
665bf1d5df
commit
714e7d9820
@ -43,8 +43,8 @@ android {
|
||||
dimension = "env"
|
||||
applicationIdSuffix = ".uat"
|
||||
versionNameSuffix = "-UAT"
|
||||
versionCode = 3
|
||||
versionName = "2.1"
|
||||
versionCode = 10
|
||||
versionName = "2.8"
|
||||
buildConfigField("String", "ENV", "\"UAT\"")
|
||||
resValue("string", "app_name", "MOB-UAT")
|
||||
}
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
<application
|
||||
android:name="com.mob.utsmyanmar.MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
||||
@ -9,7 +9,6 @@ import com.mob.utsmyanmar.model.TransactionStatus
|
||||
import com.mob.utsmyanmar.ui.settlement.SettlementViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
|
||||
import com.utsmyanmar.paylibs.model.enums.TransCVM
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
||||
|
||||
private const val MOCK_HOST_DELAY_MS = 2000L
|
||||
@ -84,6 +83,6 @@ fun ProcessingRoute(
|
||||
}
|
||||
|
||||
private fun requiresSignature(payDetail: com.utsmyanmar.paylibs.model.PayDetail?): Boolean {
|
||||
return payDetail?.transCVM == TransCVM.SIGNATURE && !payDetail.isFreeSign
|
||||
// return true;
|
||||
// return payDetail?.transCVM == TransCVM.SIGNATURE && payDetail.isFreeSign == false
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -53,12 +53,11 @@ fun SignaturePad(
|
||||
modifier: Modifier = Modifier,
|
||||
signatureColor: Color = Color.Black,
|
||||
onBack: () -> Unit = {},
|
||||
// signatureBlob is null for Digital mode (using stored signature) or when nothing was drawn
|
||||
onConfirm: (SignatureMode, Bitmap?, signatureBlob: ByteArray?) -> Unit = { _, _, _ -> }
|
||||
) {
|
||||
val paths = remember { mutableStateListOf<List<Offset>>() }
|
||||
val currentPath = remember { mutableStateListOf<Offset>() }
|
||||
var selectedMode by remember { mutableStateOf(SignatureMode.Manual) }
|
||||
var selectedMode by remember { mutableStateOf(SignatureMode.Digital) }
|
||||
var canvasSize by remember { mutableStateOf(Size.Zero) }
|
||||
var strokeWidth = 6f
|
||||
|
||||
@ -67,16 +66,15 @@ fun SignaturePad(
|
||||
currentPath.clear()
|
||||
}
|
||||
|
||||
|
||||
fun buildBitmap(): Bitmap? {
|
||||
if (selectedMode == SignatureMode.Digital) return null
|
||||
if (selectedMode == SignatureMode.Manual) return null
|
||||
if (paths.isEmpty() && currentPath.isEmpty()) return null
|
||||
if (canvasSize.width <= 0f || canvasSize.height <= 0f) return null
|
||||
|
||||
val bitmap =
|
||||
createBitmap(canvasSize.width.toInt(), canvasSize.height.toInt(), Bitmap.Config.RGB_565)
|
||||
val canvas = AndroidCanvas(bitmap)
|
||||
canvas.drawColor(android.graphics.Color.WHITE) // fill white background first
|
||||
canvas.drawColor(android.graphics.Color.WHITE)
|
||||
|
||||
val paint = Paint().apply {
|
||||
color = android.graphics.Color.BLACK
|
||||
@ -129,15 +127,23 @@ fun SignaturePad(
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(0.85f) // narrower than full width, adjust as needed
|
||||
.height(180.dp) // fixed height instead of weight(1f)
|
||||
.fillMaxWidth(0.85f)
|
||||
.height(180.dp)
|
||||
.align(Alignment.CenterHorizontally)
|
||||
.background(Color.White, RoundedCornerShape(16.dp))
|
||||
.background(
|
||||
color = if (selectedMode == SignatureMode.Digital) {
|
||||
Color.White
|
||||
} else {
|
||||
Color.White.copy(alpha = 0.55f)
|
||||
},
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
.padding(12.dp)
|
||||
.onSizeChanged { size ->
|
||||
canvasSize = Size(size.width.toFloat(), size.height.toFloat())
|
||||
}
|
||||
.pointerInput(Unit) {
|
||||
.pointerInput(selectedMode) {
|
||||
if (selectedMode == SignatureMode.Manual) return@pointerInput
|
||||
detectDragGestures(
|
||||
onDragStart = { startOffset ->
|
||||
currentPath.add(startOffset)
|
||||
@ -193,7 +199,7 @@ fun SignaturePad(
|
||||
) {
|
||||
SignatureModeOption(
|
||||
title = "Manual Sign",
|
||||
subtitle = "Customer signs on screen",
|
||||
subtitle = "Signature on Paper",
|
||||
selected = selectedMode == SignatureMode.Manual,
|
||||
onClick = { selectedMode = SignatureMode.Manual },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
@ -203,7 +209,7 @@ fun SignaturePad(
|
||||
|
||||
SignatureModeOption(
|
||||
title = "Digital Sign",
|
||||
subtitle = "Use stored signature",
|
||||
subtitle = "Draw on pad",
|
||||
selected = selectedMode == SignatureMode.Digital,
|
||||
onClick = { selectedMode = SignatureMode.Digital },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
@ -226,10 +232,6 @@ fun SignaturePad(
|
||||
Button(
|
||||
onClick = {
|
||||
val bitmap = buildBitmap()
|
||||
if (selectedMode == SignatureMode.Manual && bitmap == null) {
|
||||
// nothing drawn yet on Manual mode — block confirm
|
||||
return@Button
|
||||
}
|
||||
val signatureBlob = bitmap?.let { bitmapToBlob(it) }
|
||||
onConfirm(selectedMode, bitmap, signatureBlob)
|
||||
},
|
||||
@ -297,4 +299,4 @@ fun SignaturePadPreview() {
|
||||
MOBPOSTheme {
|
||||
SignaturePad()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
app/src/main/res/xml/network_security_config.xml
Normal file
8
app/src/main/res/xml/network_security_config.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">posuat.myanmarorientalbank.com:5033</domain>
|
||||
</domain-config>
|
||||
|
||||
</network-security-config>
|
||||
BIN
paylibs/src/main/assets/cascadiaCodeRegular.ttf
Normal file
BIN
paylibs/src/main/assets/cascadiaCodeRegular.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/gabaritoVariableFont.ttf
Normal file
BIN
paylibs/src/main/assets/gabaritoVariableFont.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/jetBrainsMonoRegular.ttf
Normal file
BIN
paylibs/src/main/assets/jetBrainsMonoRegular.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/libreBaskervilleRegular.ttf
Normal file
BIN
paylibs/src/main/assets/libreBaskervilleRegular.ttf
Normal file
Binary file not shown.
BIN
paylibs/src/main/assets/losevkaCharonMonoRegular.ttf
Normal file
BIN
paylibs/src/main/assets/losevkaCharonMonoRegular.ttf
Normal file
Binary file not shown.
@ -50,7 +50,7 @@ public abstract class BaseXPrint {
|
||||
|
||||
protected String currentTime;
|
||||
|
||||
protected static final String typeface_name = "jbm_semibold.ttf";
|
||||
protected static final String typeface_name = "jetBrainsMonoRegular.ttf";
|
||||
protected static final String MPU_AID = "A0000004820000000001";
|
||||
|
||||
protected static final String HOST_NAME_VM = "VISA/ MASTERCARD";
|
||||
|
||||
@ -38,7 +38,7 @@ public class SystemParamsSettings implements Serializable {
|
||||
|
||||
private boolean checkExpSwitch = false;
|
||||
|
||||
// private String tmsAddress = "http://posuat.myanmarorientalbank.com:5033";
|
||||
// private String tmsAddress = "http://posuat.myanmarorientalbank.com:5033/api/v1";
|
||||
private String tmsAddress = "https://sirius-nest.utsmyanmar.com/api/v1";
|
||||
// private String tmsAddress = "http://128.199.170.203";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user