Compare commits
No commits in common. "bfba551b65cac70463ea2b9bff4909c3987ef928" and "720b3ddccb5e9e65d30b9f8adb0ca040fe44912b" have entirely different histories.
bfba551b65
...
720b3ddccb
9
.gitignore
vendored
9
.gitignore
vendored
@ -14,9 +14,6 @@
|
|||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
/.idea
|
/.idea
|
||||||
/app/release/*
|
/app/release
|
||||||
/app/sit/release/*
|
/app/sit/release
|
||||||
/app/uat/release/*
|
/app/uat/release
|
||||||
/app/uat
|
|
||||||
/.idea
|
|
||||||
/app/prod/release
|
|
||||||
@ -13,6 +13,12 @@
|
|||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
<DialogSelection />
|
<DialogSelection />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
|
<SelectionState runConfigName="testSalePacket()">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
|
<SelectionState runConfigName="testResponseSalePacket()">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -14,8 +14,8 @@ android {
|
|||||||
applicationId "com.utsmm.kbz"
|
applicationId "com.utsmm.kbz"
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 1
|
versionCode 15
|
||||||
versionName "1.0"
|
versionName "1.14"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,18 +43,44 @@ android {
|
|||||||
dimension "env"
|
dimension "env"
|
||||||
applicationId "com.utsmm.kbz"
|
applicationId "com.utsmm.kbz"
|
||||||
versionNameSuffix ""
|
versionNameSuffix ""
|
||||||
resValue "string", "app_name", "KBZ-POS"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// defaultConfig {
|
||||||
|
// applicationId "com.utsmm.kbz.sit"
|
||||||
|
// minSdk 24
|
||||||
|
// targetSdk 33
|
||||||
|
// versionCode 1
|
||||||
|
// versionName "1.0"
|
||||||
|
//
|
||||||
|
//// applicationId "com.utsmm.kbz"
|
||||||
|
//// versionName "1.10"
|
||||||
|
//
|
||||||
|
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
//
|
||||||
|
//// // Add CMake configuration
|
||||||
|
//// externalNativeBuild {
|
||||||
|
//// cmake {
|
||||||
|
//// cppFlags "-std=c++14"
|
||||||
|
//// }
|
||||||
|
//// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Configure CMake
|
||||||
|
// externalNativeBuild {
|
||||||
|
// cmake {
|
||||||
|
// path "src/main/cpp/CMakeLists.txt"
|
||||||
|
// version "3.22.1"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled true
|
minifyEnabled false
|
||||||
shrinkResources false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
debuggable false
|
debuggable true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|||||||
244
app/proguard-rules.pro
vendored
244
app/proguard-rules.pro
vendored
@ -20,249 +20,7 @@
|
|||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
-keepattributes Signature, *Annotation*, SourceFile, LineNumberTable, InnerClasses, EnclosingMethod
|
|
||||||
-dontwarn sun.misc.**
|
|
||||||
|
|
||||||
# Hilt ProGuard Rules - CRITICAL FOR DEPENDENCY INJECTION
|
# Keep Bouncy Castle classes for security providers
|
||||||
-dontwarn dagger.hilt.**
|
|
||||||
-keep class dagger.hilt.** { *; }
|
|
||||||
-keep class * extends dagger.hilt.** { *; }
|
|
||||||
|
|
||||||
# Keep all Hilt generated classes
|
|
||||||
-keep class **_HiltComponents { *; }
|
|
||||||
-keep class **_HiltComponents$* { *; }
|
|
||||||
-keep class **_HiltModules { *; }
|
|
||||||
-keep class **_HiltModules$* { *; }
|
|
||||||
-keep class * extends dagger.hilt.android.internal.managers.ApplicationComponentManager { *; }
|
|
||||||
-keep class * extends dagger.hilt.android.internal.managers.ActivityComponentManager { *; }
|
|
||||||
-keep class * extends dagger.hilt.android.internal.managers.FragmentComponentManager { *; }
|
|
||||||
-keep class * extends dagger.hilt.android.internal.managers.ViewComponentManager { *; }
|
|
||||||
-keep class * extends dagger.hilt.android.internal.managers.ServiceComponentManager { *; }
|
|
||||||
|
|
||||||
# Keep Hilt entry points and components
|
|
||||||
-keep @dagger.hilt.InstallIn class * { *; }
|
|
||||||
-keep @dagger.hilt.android.AndroidEntryPoint class * { *; }
|
|
||||||
-keep @dagger.hilt.android.HiltAndroidApp class * { *; }
|
|
||||||
|
|
||||||
# Keep classes annotated with @Module, @Component, @Subcomponent
|
|
||||||
-keep @dagger.Module class * { *; }
|
|
||||||
-keep @dagger.Component class * { *; }
|
|
||||||
-keep @dagger.Component.Builder class * { *; }
|
|
||||||
-keep @dagger.Subcomponent class * { *; }
|
|
||||||
-keep @dagger.Subcomponent.Builder class * { *; }
|
|
||||||
|
|
||||||
# Keep all classes that have @Inject constructors, fields, or methods
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <init>(...);
|
|
||||||
}
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <fields>;
|
|
||||||
}
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <methods>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Keep Application class and its generated Hilt class
|
|
||||||
-keep class com.utsmm.kbz.MyApplication { *; }
|
|
||||||
-keep class com.utsmm.kbz.Hilt_MyApplication { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.BaseApplication { *; }
|
|
||||||
|
|
||||||
# Keep main activity and its generated classes
|
|
||||||
-keep class com.utsmm.kbz.MainActivity { *; }
|
|
||||||
|
|
||||||
# ViewModels and Repository classes (important for injection)
|
|
||||||
-keep class * extends androidx.lifecycle.ViewModel { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.repo.Repository { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.emv.EmvParamOperation { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.emv.TerminalParamOperation { *; }
|
|
||||||
|
|
||||||
# Keep all Dagger generated classes - these are critical!
|
|
||||||
-keep class **_Factory { *; }
|
|
||||||
-keep class **_MembersInjector { *; }
|
|
||||||
-keep class **_Provide* { *; }
|
|
||||||
|
|
||||||
-keep class com.utsmyanmar.baselib.network.model.* { <fields>; }
|
|
||||||
-keep class com.utsmyanmar.baselib.network.model.sirius.* { <fields>; }
|
|
||||||
-keep class com.utsmyanmar.baselib.db.model.* { <fields>; }
|
|
||||||
|
|
||||||
-keep class com.utsmyanmar.ecr.data.* { <fields>; }
|
|
||||||
-keep class com.utsmyanmar.ecr.data.model.* { <fields>; }
|
|
||||||
|
|
||||||
-keep class com.utsmyanmar.mpulib.data.model.* { <fields>; }
|
|
||||||
|
|
||||||
-keep class * extends com.google.gson.TypeAdapter
|
|
||||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
|
||||||
-keep class * implements com.google.gson.JsonSerializer
|
|
||||||
-keep class * implements com.google.gson.JsonDeserializer
|
|
||||||
|
|
||||||
# this is start
|
|
||||||
-keep class org.bouncycastle.** { *; }
|
-keep class org.bouncycastle.** { *; }
|
||||||
-keep interface org.bouncycastle.** { *; }
|
|
||||||
-keep class okhttp3.internal.platform.BouncyCastlePlatform { *; }
|
|
||||||
|
|
||||||
# Keep classes from the JNDI package
|
|
||||||
-keep class javax.naming.** { *; }
|
|
||||||
-keep class javax.naming.directory.** { *; }
|
|
||||||
|
|
||||||
# Keep Bouncy Castle classes
|
|
||||||
-keep class org.bouncycastle.** { *; }
|
|
||||||
|
|
||||||
# Keep Conscrypt classes
|
|
||||||
-keep class org.conscrypt.** { *; }
|
|
||||||
|
|
||||||
# Keep OpenJSSE classes
|
|
||||||
-keep class org.openjsse.** { *; }
|
|
||||||
|
|
||||||
# Keep classes from okhttp3.internal.platform.BouncyCastlePlatform
|
|
||||||
-keep class okhttp3.internal.platform.BouncyCastlePlatform { *; }
|
|
||||||
|
|
||||||
# Keep classes from okhttp3.internal.platform.ConscryptPlatform
|
|
||||||
-keep class okhttp3.internal.platform.ConscryptPlatform$Companion { *; }
|
|
||||||
#-keep class okhttp3.internal.platform.ConscryptPlatform$platformTrustManager$2 { *; }
|
|
||||||
|
|
||||||
# Keep classes from okhttp3.internal.platform.OpenJSSEPlatform
|
|
||||||
-keep class okhttp3.internal.platform.OpenJSSEPlatform { *; }
|
|
||||||
|
|
||||||
#this is end
|
|
||||||
|
|
||||||
-keepclassmembers,allowobfuscation class * {
|
|
||||||
@com.google.gson.annotations.SerializedName <fields>;
|
|
||||||
}
|
|
||||||
|
|
||||||
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
|
||||||
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
|
||||||
|
|
||||||
|
|
||||||
# Jun9 2022
|
|
||||||
|
|
||||||
#-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
||||||
#-keep class * extends com.bumptech.glide.module.AppGlideModule {
|
|
||||||
# <init>(...);
|
|
||||||
#}
|
|
||||||
#-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
|
||||||
# **[] $VALUES;
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
#-assumenosideeffects class android.util.Log {
|
|
||||||
#public static int d(...);
|
|
||||||
#public static int v(...);
|
|
||||||
#public static int i(...);
|
|
||||||
#public static int w(...);
|
|
||||||
#public static int wtf(...);
|
|
||||||
# }
|
|
||||||
|
|
||||||
-dontwarn okhttp3.internal.platform.**
|
|
||||||
-dontwarn org.conscrypt.**
|
|
||||||
-dontwarn org.bouncycastle.**
|
-dontwarn org.bouncycastle.**
|
||||||
-dontwarn org.openjsse.**
|
|
||||||
|
|
||||||
# RxJava 3 Rules - Critical for Observable chains
|
|
||||||
-keep class io.reactivex.rxjava3.** { *; }
|
|
||||||
-dontwarn io.reactivex.rxjava3.**
|
|
||||||
-keep class io.reactivex.rxjava3.core.** { *; }
|
|
||||||
-keep class io.reactivex.rxjava3.android.** { *; }
|
|
||||||
-keep class io.reactivex.rxjava3.schedulers.** { *; }
|
|
||||||
|
|
||||||
# Retrofit and OkHttp rules
|
|
||||||
-keepattributes RuntimeVisibleAnnotations
|
|
||||||
-keep class retrofit2.** { *; }
|
|
||||||
-keepclassmembernames interface * {
|
|
||||||
@retrofit2.http.* <methods>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# AndroidX and Lifecycle components
|
|
||||||
-keep class androidx.lifecycle.** { *; }
|
|
||||||
-keep class * extends androidx.lifecycle.ViewModel { *; }
|
|
||||||
-keep class androidx.activity.** { *; }
|
|
||||||
-keep class androidx.fragment.** { *; }
|
|
||||||
|
|
||||||
# Navigation component rules
|
|
||||||
-keep class androidx.navigation.** { *; }
|
|
||||||
-keep class * implements androidx.navigation.NavDirections { *; }
|
|
||||||
|
|
||||||
# DataBinding rules
|
|
||||||
-keep class androidx.databinding.** { *; }
|
|
||||||
-keep class * extends androidx.databinding.ViewDataBinding { *; }
|
|
||||||
|
|
||||||
# Room database rules (if using Room)
|
|
||||||
-keep class androidx.room.** { *; }
|
|
||||||
-keep class * extends androidx.room.RoomDatabase { *; }
|
|
||||||
|
|
||||||
# PayLibs and device-specific rules
|
|
||||||
-keep class com.utsmyanmar.paylibs.** { *; }
|
|
||||||
-keep class com.nexgo.** { *; }
|
|
||||||
-keep class com.sunmi.** { *; }
|
|
||||||
-keep class com.utsmyanmar.checkxread.** { *; }
|
|
||||||
-keep class com.utsmyanmar.ecr.** { *; }
|
|
||||||
-keep class com.utsmyanmar.mpulib.** { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.** { *; }
|
|
||||||
|
|
||||||
# Enum preservation for critical enums
|
|
||||||
-keepclassmembers enum * {
|
|
||||||
public static **[] values();
|
|
||||||
public static ** valueOf(java.lang.String);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Keep model classes from obfuscation completely
|
|
||||||
-keep class com.utsmyanmar.paylibs.model.** { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.db.model.** { *; }
|
|
||||||
|
|
||||||
# Critical: Keep all native methods and JNI classes
|
|
||||||
-keepclasseswithmembernames class * {
|
|
||||||
native <methods>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Keep critical system params and utils
|
|
||||||
-keep class com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation { *; }
|
|
||||||
-keep class com.utsmyanmar.paylibs.utils.** { *; }
|
|
||||||
|
|
||||||
# Prevent obfuscation of classes used in reflection
|
|
||||||
-keep class * extends java.lang.Exception
|
|
||||||
-keep class * extends java.lang.Error
|
|
||||||
|
|
||||||
# CRITICAL: Keep all generated application components from obfuscation
|
|
||||||
-keep class com.utsmm.kbz.MyApplication_GeneratedInjector { *; }
|
|
||||||
#-keep class com.utsmm.kbz.MyApplication_HiltComponents$SingletonC { *; }
|
|
||||||
#-keep class com.utsmm.kbz.MyApplication_HiltComponents { *; }
|
|
||||||
|
|
||||||
# Keep all classes with "Generated" in their name (Hilt generates these)
|
|
||||||
-keep class **_Generated { *; }
|
|
||||||
-keep class **GeneratedInjector { *; }
|
|
||||||
|
|
||||||
# Additional protection for the specific classes causing crashes
|
|
||||||
-keep class **.D0.h { *; }
|
|
||||||
-keep class **.m2.f { *; }
|
|
||||||
-keep class **.J3.b { *; }
|
|
||||||
|
|
||||||
# Keep everything in the di package to prevent injection failures
|
|
||||||
-keep class com.utsmyanmar.baselib.di.** { *; }
|
|
||||||
-keep class com.utsmm.kbz.di.** { *; }
|
|
||||||
|
|
||||||
# Hilt Extension points
|
|
||||||
#-keep class * extends dagger.hilt.android.internal.managers.ApplicationComponentManager$ApplicationComponentBuilder { *; }
|
|
||||||
|
|
||||||
# Don't obfuscate any annotation processing related classes
|
|
||||||
-keep class dagger.internal.** { *; }
|
|
||||||
-keepnames class dagger.internal.** { *; }
|
|
||||||
|
|
||||||
# Keep annotation-based bindings
|
|
||||||
-keep @javax.inject.Inject class * { *; }
|
|
||||||
-keep @dagger.Provides class * { *; }
|
|
||||||
-keep @dagger.Module class * { *; }
|
|
||||||
|
|
||||||
# Keep Nexgo SDK
|
|
||||||
-keep class com.nexgo.** { *; }
|
|
||||||
|
|
||||||
# Keep DDI interface (VERY IMPORTANT)
|
|
||||||
-keep class com.xinguodu.ddiinterface.** { *; }
|
|
||||||
|
|
||||||
# Keep printer implementations
|
|
||||||
-keep class com.nexgo.oaf.apiv3.device.printer.** { *; }
|
|
||||||
|
|
||||||
# Prevent method shrinking/optimization
|
|
||||||
-dontoptimize
|
|
||||||
-dontshrink
|
|
||||||
|
|
||||||
-dontwarn com.xgd.smartpos.manager.app.UsageInfo
|
|
||||||
-dontwarn com.xgd.smartpos.manager.app.UsageStats
|
|
||||||
@ -110,8 +110,6 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
|
||||||
|
|
||||||
// Keep screen on
|
// Keep screen on
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
@ -428,15 +426,15 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
SystemParamsOperation.getInstance().setDownloadedParams(false);
|
SystemParamsOperation.getInstance().setDownloadedParams(false);
|
||||||
|
|
||||||
handleAutoSettlementIntent(getIntent());
|
handleAutoSettlementIntent(getIntent());
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop(){
|
public void onStop(){
|
||||||
super.onStop();
|
super.onStop();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
|
BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
|
BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -504,15 +502,14 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
|
BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
|
BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
|
||||||
// Clean up RxJava disposables
|
// Clean up RxJava disposables
|
||||||
compositeDisposable.clear();
|
compositeDisposable.clear();
|
||||||
// Reset screen mode
|
// Reset screen mode
|
||||||
// Disconnect ECR
|
// Disconnect ECR
|
||||||
ECRHelper.INSTANCE.disconnect();
|
ECRHelper.INSTANCE.disconnect();
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Navigation drawer interaction listeners
|
// Navigation drawer interaction listeners
|
||||||
@ -523,12 +520,6 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
navController.navigate(R.id.inputPasswordFragment);
|
navController.navigate(R.id.inputPasswordFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause(){
|
|
||||||
super.onPause();
|
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClickFunction() {
|
public void onClickFunction() {
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
|||||||
@ -146,10 +146,10 @@ public class MainFragment extends DataBindingFragment {
|
|||||||
delayFunctionCall(() -> {
|
delayFunctionCall(() -> {
|
||||||
NexGoSDK.getInstance().cancelCheckCard();
|
NexGoSDK.getInstance().cancelCheckCard();
|
||||||
NexGoSDK.getInstance().closeReader();
|
NexGoSDK.getInstance().closeReader();
|
||||||
// enableHomeButton();
|
enableHomeButton();
|
||||||
// disableTaskButton();
|
disableTaskButton();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -296,9 +296,7 @@ public class MyBindingAdapter {
|
|||||||
@BindingAdapter({"isTrace"})
|
@BindingAdapter({"isTrace"})
|
||||||
public static void checkIsTraceOrInvoice(TextView textView, PayDetail payDetail) {
|
public static void checkIsTraceOrInvoice(TextView textView, PayDetail payDetail) {
|
||||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||||
// textView.setText("INV:"+payDetail.getInvoiceNo());
|
textView.setText("INV:"+payDetail.getInvoiceNo());
|
||||||
//tempo fix for qr trace num
|
|
||||||
textView.setText("TRC:"+payDetail.getVoucherNo());
|
|
||||||
} else {
|
} else {
|
||||||
textView.setText("TRC:"+payDetail.getVoucherNo());
|
textView.setText("TRC:"+payDetail.getVoucherNo());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,9 +172,9 @@ public class TransactionResultFragment extends DataBindingFragment implements Da
|
|||||||
} else if (isQRPayNonSuccessTransaction(transactionType, payDetail)) {
|
} else if (isQRPayNonSuccessTransaction(transactionType, payDetail)) {
|
||||||
// startPrintProcess(false);
|
// startPrintProcess(false);
|
||||||
if(transactionType == TransactionsType.MMQR_REFUND){
|
if(transactionType == TransactionsType.MMQR_REFUND){
|
||||||
showDeclineDialog("QR Refund Failed! \n" + payDetail.getTradeResultDes());
|
showDeclineDialog("QR Refund Failed!");
|
||||||
}else{
|
}else{
|
||||||
showDeclineDialog("QR Payment Failed! \n" + payDetail.getTradeResultDes());
|
showDeclineDialog("QR Payment Failed!");
|
||||||
}
|
}
|
||||||
navigateToMainScreen();
|
navigateToMainScreen();
|
||||||
} else if (isQRPaySuccessTransaction(transactionType, payDetail)) {
|
} else if (isQRPaySuccessTransaction(transactionType, payDetail)) {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
||||||
import com.utsmm.kbz.util.helper.KeyboardHelper;
|
|
||||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||||
import com.utsmyanmar.baselib.network.model.KPayQRQueryRequest;
|
import com.utsmyanmar.baselib.network.model.KPayQRQueryRequest;
|
||||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||||
@ -129,7 +128,7 @@ public class ReprintAnyTransactionFragment extends DataBindingFragment {
|
|||||||
private void searchByTrace(String trace) {
|
private void searchByTrace(String trace) {
|
||||||
|
|
||||||
for (PayDetail s : lists) {
|
for (PayDetail s : lists) {
|
||||||
if(s.getVoucherNo().contains(trace)) {
|
if(s.getVoucherNo().equals(trace)) {
|
||||||
searchedLists.add(s);
|
searchedLists.add(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,13 +151,19 @@ public class ReprintAnyTransactionFragment extends DataBindingFragment {
|
|||||||
String input = managementViewModel.txtRRNTrace.getValue();
|
String input = managementViewModel.txtRRNTrace.getValue();
|
||||||
|
|
||||||
if(input != null && !input.isEmpty()) {
|
if(input != null && !input.isEmpty()) {
|
||||||
|
if(input.length() == 6) {
|
||||||
searchByTrace(input);
|
searchByTrace(input);
|
||||||
|
} else if(input.length() == 12) {
|
||||||
|
searchByRRN(input);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
searchedLists.addAll(lists);
|
searchedLists.addAll(lists);
|
||||||
}
|
}
|
||||||
|
|
||||||
cardViewAdapter.updateList(searchedLists);
|
cardViewAdapter.updateList(searchedLists);
|
||||||
KeyboardHelper.hide(requireActivity());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -362,11 +367,7 @@ public class ReprintAnyTransactionFragment extends DataBindingFragment {
|
|||||||
* */
|
* */
|
||||||
// sharedViewModel.transMenu.postValue(TransMenu.REPRINT);
|
// sharedViewModel.transMenu.postValue(TransMenu.REPRINT);
|
||||||
sharedViewModel.setTransMenu(TransMenu.REPRINT);
|
sharedViewModel.setTransMenu(TransMenu.REPRINT);
|
||||||
// payDetail.setTransType(payDetail.getTransType()+"(REPRINT)");
|
|
||||||
//tempo guarding the Reprint duplicate by kmk
|
|
||||||
if (!payDetail.getTransType().contains("REPRINT")) {
|
|
||||||
payDetail.setTransType(payDetail.getTransType()+"(REPRINT)");
|
payDetail.setTransType(payDetail.getTransType()+"(REPRINT)");
|
||||||
}
|
|
||||||
|
|
||||||
sharedViewModel.payDetail.postValue(payDetail);
|
sharedViewModel.payDetail.postValue(payDetail);
|
||||||
routeId = R.id.action_reprintAnyTransactionFragment_to_confirmTransactionFragment;
|
routeId = R.id.action_reprintAnyTransactionFragment_to_confirmTransactionFragment;
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
||||||
import com.utsmm.kbz.util.helper.KeyboardHelper;
|
|
||||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||||
@ -226,7 +225,6 @@ public class QRRefundDetailFragment extends DataBindingFragment {
|
|||||||
sharedViewModel.transactionsType.setValue(TransactionsType.MMQR_REFUND);
|
sharedViewModel.transactionsType.setValue(TransactionsType.MMQR_REFUND);
|
||||||
kPayViewModel.setPayDetail(payDetail);
|
kPayViewModel.setPayDetail(payDetail);
|
||||||
// sharedViewModel.amount.setValue(refundAmountStr);
|
// sharedViewModel.amount.setValue(refundAmountStr);
|
||||||
KeyboardHelper.hide(requireActivity());
|
|
||||||
routeId = R.id.action_qrRefundDetail_inputPasswordFragment;
|
routeId = R.id.action_qrRefundDetail_inputPasswordFragment;
|
||||||
safeNavigateToRouteId();
|
safeNavigateToRouteId();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,6 @@ import com.utsmm.kbz.R;
|
|||||||
import com.utsmm.kbz.config.Constants;
|
import com.utsmm.kbz.config.Constants;
|
||||||
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
||||||
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
||||||
import com.utsmm.kbz.util.helper.KeyboardHelper;
|
|
||||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||||
@ -108,8 +107,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
|||||||
safeNavigateToRouteId();
|
safeNavigateToRouteId();
|
||||||
}
|
}
|
||||||
public void onSearch(){
|
public void onSearch(){
|
||||||
searchByTrace();
|
searchById();
|
||||||
KeyboardHelper.hide(requireActivity());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +118,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
|||||||
NavHostFragment.findNavController(this).navigate(routeId, bundle);
|
NavHostFragment.findNavController(this).navigate(routeId, bundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void searchByTrace(){
|
private void searchById(){
|
||||||
EditText editText = getView().findViewById(R.id.rnn_trace_id);
|
EditText editText = getView().findViewById(R.id.rnn_trace_id);
|
||||||
String keyword = editText.getText().toString().trim();
|
String keyword = editText.getText().toString().trim();
|
||||||
|
|
||||||
@ -134,7 +132,12 @@ public class QRRefundFragment extends DataBindingFragment {
|
|||||||
|
|
||||||
List<PayDetail> filteredList = new ArrayList<>();
|
List<PayDetail> filteredList = new ArrayList<>();
|
||||||
for(PayDetail item: originalList){
|
for(PayDetail item: originalList){
|
||||||
boolean match = item.getVoucherNo() != null && item.getVoucherNo().contains(keyword);
|
|
||||||
|
boolean match =
|
||||||
|
(item.getReferNo() != null && item.getReferNo().contains(keyword)) ||
|
||||||
|
(item.getInvoiceNo() != null && item.getInvoiceNo().contains(keyword)) ||
|
||||||
|
(item.getVoucherNo() != null && item.getVoucherNo().contains(keyword));
|
||||||
|
|
||||||
if(match){
|
if(match){
|
||||||
filteredList.add(item);
|
filteredList.add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,6 +144,7 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
|||||||
private void handleRefundResponse(KPayRefund.RefundResponse response, String referenceNo, String orgAmount) {
|
private void handleRefundResponse(KPayRefund.RefundResponse response, String referenceNo, String orgAmount) {
|
||||||
if (response != null && response.getResponse() != null && "REFUND_SUCCESS".equalsIgnoreCase(response.getResponse().getRefundStatus())) {
|
if (response != null && response.getResponse() != null && "REFUND_SUCCESS".equalsIgnoreCase(response.getResponse().getRefundStatus())) {
|
||||||
LogUtil.d(TAG, "Refund successful!");
|
LogUtil.d(TAG, "Refund successful!");
|
||||||
|
|
||||||
String refundAmount = response.getResponse().getRefundAmount();
|
String refundAmount = response.getResponse().getRefundAmount();
|
||||||
long text = POSUtil.getInstance().convertAmount(refundAmount);
|
long text = POSUtil.getInstance().convertAmount(refundAmount);
|
||||||
|
|
||||||
|
|||||||
@ -40,13 +40,15 @@ public class RefundCertificateManager {
|
|||||||
if (tmsAddress == null || tmsAddress.trim().isEmpty()) {
|
if (tmsAddress == null || tmsAddress.trim().isEmpty()) {
|
||||||
LogUtil.e(TAG, "TMS address is empty");
|
LogUtil.e(TAG, "TMS address is empty");
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
String downloadBase = tmsAddress.trim() + "/api/v1/file/download?filePath="; //local
|
String downloadBase =
|
||||||
// String downloadBase = tmsAddress.trim() + "/file/download?filePath="; // uat and prod
|
tmsAddress.trim() + "/api/v1/file/download?filePath=";
|
||||||
|
|
||||||
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
|
String certUrl =
|
||||||
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();
|
SystemParamsOperation.getInstance().getCertificateUrl();
|
||||||
|
String clientCertUrl =
|
||||||
|
SystemParamsOperation.getInstance().getCertificateClientUrl();
|
||||||
|
|
||||||
if (certUrl == null || clientCertUrl == null) {
|
if (certUrl == null || clientCertUrl == null) {
|
||||||
LogUtil.e(TAG, "Certificate URLs are missing");
|
LogUtil.e(TAG, "Certificate URLs are missing");
|
||||||
@ -56,9 +58,9 @@ public class RefundCertificateManager {
|
|||||||
String timestamp = String.valueOf(System.currentTimeMillis());
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||||
String signature = generateSignature(timestamp);
|
String signature = generateSignature(timestamp);
|
||||||
|
|
||||||
// LogUtil.d(TAG, "Download base => " + downloadBase);
|
LogUtil.d(TAG, "Download base => " + downloadBase);
|
||||||
// LogUtil.d(TAG, "Cert URL => " + certUrl);
|
LogUtil.d(TAG, "Cert URL => " + certUrl);
|
||||||
// LogUtil.d(TAG, "Client Cert URL => " + clientCertUrl);
|
LogUtil.d(TAG, "Client Cert URL => " + clientCertUrl);
|
||||||
|
|
||||||
// ---------- CA CERT ----------
|
// ---------- CA CERT ----------
|
||||||
DownloadUtil.downloadCertificateRx(
|
DownloadUtil.downloadCertificateRx(
|
||||||
|
|||||||
@ -395,10 +395,6 @@ public class SettlementTransactionFragment extends DataBindingFragment implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onConfirm(){
|
public void onConfirm(){
|
||||||
if(saleCount == 0){
|
|
||||||
showDeclineDialog("No Transaction Found!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(sharedViewModel.getTransMenu().getValue() == TransMenu.SETTLEMENT) {
|
if(sharedViewModel.getTransMenu().getValue() == TransMenu.SETTLEMENT) {
|
||||||
/* April 10 , 2024 Smile requested not to send to host even settlement button was clicked */
|
/* April 10 , 2024 Smile requested not to send to host even settlement button was clicked */
|
||||||
settlementViewModel.startSettlementProcess();
|
settlementViewModel.startSettlementProcess();
|
||||||
|
|||||||
@ -1,44 +0,0 @@
|
|||||||
package com.utsmm.kbz.util.helper;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
|
|
||||||
public class KeyboardHelper {
|
|
||||||
|
|
||||||
private KeyboardHelper() {
|
|
||||||
// no instance
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Hide keyboard using a View (Fragment-safe) */
|
|
||||||
public static void hide(Context context, View view) {
|
|
||||||
if (context == null || view == null) return;
|
|
||||||
|
|
||||||
InputMethodManager imm =
|
|
||||||
(InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
||||||
|
|
||||||
if (imm != null) {
|
|
||||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
|
||||||
view.clearFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Hide keyboard using Activity (Activity-safe) */
|
|
||||||
public static void hide(Activity activity) {
|
|
||||||
if (activity == null) return;
|
|
||||||
|
|
||||||
View view = activity.getCurrentFocus();
|
|
||||||
if (view == null) {
|
|
||||||
view = activity.getWindow().getDecorView();
|
|
||||||
}
|
|
||||||
|
|
||||||
InputMethodManager imm =
|
|
||||||
(InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
||||||
|
|
||||||
if (imm != null) {
|
|
||||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
|
||||||
view.clearFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -223,35 +223,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- MMQR Ref Row -->
|
<!-- MMQR Ref Row -->
|
||||||
<!-- <LinearLayout-->
|
|
||||||
<!-- android:layout_width="match_parent"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:orientation="horizontal"-->
|
|
||||||
<!-- android:gravity="center_vertical"-->
|
|
||||||
<!-- android:layout_marginTop="8dp"-->
|
|
||||||
<!-- android:visibility="@{(sharedViewModel.payDetail != null && sharedViewModel.payDetail.qrReferNo != null && !sharedViewModel.payDetail.qrReferNo.empty) ? android.view.View.VISIBLE : android.view.View.GONE}">-->
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:layout_width="0dp"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_weight="1"-->
|
|
||||||
<!-- android:text="MMQR Ref"-->
|
|
||||||
<!-- android:textColor="@color/colorTextContent"-->
|
|
||||||
<!-- android:textSize="14sp"-->
|
|
||||||
<!-- android:fontFamily="@font/rubik_regular" />-->
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="@{sharedViewModel.payDetail.qrReferNo}"-->
|
|
||||||
<!-- android:textColor="@color/colorTextTitle"-->
|
|
||||||
<!-- android:textSize="14sp"-->
|
|
||||||
<!-- android:fontFamily="@font/rubik_medium"-->
|
|
||||||
<!-- tools:text="REF123456789"-->
|
|
||||||
<!-- android:maxLines="1"-->
|
|
||||||
<!-- android:ellipsize="end"/>-->
|
|
||||||
|
|
||||||
<!-- </LinearLayout>-->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -260,37 +231,27 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:visibility="@{(sharedViewModel.payDetail != null && sharedViewModel.payDetail.qrReferNo != null && !sharedViewModel.payDetail.qrReferNo.empty) ? android.view.View.VISIBLE : android.view.View.GONE}">
|
android:visibility="@{(sharedViewModel.payDetail != null && sharedViewModel.payDetail.qrReferNo != null && !sharedViewModel.payDetail.qrReferNo.empty) ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||||
|
|
||||||
<!-- Label : 30% -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="3"
|
android:layout_weight="1"
|
||||||
android:text="MMQR Ref"
|
android:text="MMQR Ref"
|
||||||
android:textColor="@color/colorTextContent"
|
android:textColor="@color/colorTextContent"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:fontFamily="@font/rubik_regular" />
|
android:fontFamily="@font/rubik_regular" />
|
||||||
|
|
||||||
<!-- Value : 70% -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="7"
|
|
||||||
android:gravity="end"
|
|
||||||
|
|
||||||
android:text="@{sharedViewModel.payDetail.qrReferNo}"
|
android:text="@{sharedViewModel.payDetail.qrReferNo}"
|
||||||
android:textColor="@color/colorTextTitle"
|
android:textColor="@color/colorTextTitle"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:fontFamily="@font/rubik_medium"
|
android:fontFamily="@font/rubik_medium"
|
||||||
|
tools:text="REF123456789" />
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
|
|
||||||
tools:text="REF123456789123456789123456789012345" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/txt_search_by_trace"
|
android:hint="@string/txt_search_rrn_trace"
|
||||||
android:text="@={manageViewModel.txtRRNTrace}"
|
android:text="@={manageViewModel.txtRRNTrace}"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textColorHint="@color/colorPrimary"
|
android:textColorHint="@color/colorPrimary"
|
||||||
|
|||||||
@ -118,7 +118,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/txt_search_by_trace"
|
android:hint="@string/txt_search_rrn_trace"
|
||||||
android:textColorHint="@color/colorPrimary"
|
android:textColorHint="@color/colorPrimary"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:text="@={manageViewModel.txtRRNTrace}"
|
android:text="@={manageViewModel.txtRRNTrace}"
|
||||||
|
|||||||
@ -615,6 +615,5 @@
|
|||||||
<string name="txt_total_qr_transactions">Total QR Transactions</string>
|
<string name="txt_total_qr_transactions">Total QR Transactions</string>
|
||||||
<string name="txt_no_qr_transactions_to_settle">No QR transactions to settle</string>
|
<string name="txt_no_qr_transactions_to_settle">No QR transactions to settle</string>
|
||||||
<string name="txt_settle_qr_transactions">Confirm</string>
|
<string name="txt_settle_qr_transactions">Confirm</string>
|
||||||
<string name="txt_search_by_trace">Search By Trace No</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
25
baselib/proguard-rules.pro
vendored
25
baselib/proguard-rules.pro
vendored
@ -28,28 +28,3 @@
|
|||||||
-dontwarn com.android.org.bouncycastle.**
|
-dontwarn com.android.org.bouncycastle.**
|
||||||
|
|
||||||
-keep class org.bouncycastle.** {*;}
|
-keep class org.bouncycastle.** {*;}
|
||||||
|
|
||||||
-keepclassmembers,allowobfuscation class * {
|
|
||||||
@com.google.gson.annotations.SerializedName <fields>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Hilt support for baselib
|
|
||||||
-keep class com.utsmyanmar.baselib.di.** { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.emv.EmvParamOperation { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.emv.TerminalParamOperation { *; }
|
|
||||||
-keep class com.utsmyanmar.baselib.repo.Repository { *; }
|
|
||||||
|
|
||||||
# Keep all Hilt generated classes in baselib
|
|
||||||
-keep class **_HiltModules { *; }
|
|
||||||
-keep class **_HiltModules$* { *; }
|
|
||||||
|
|
||||||
# Keep classes with @Inject annotations
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <init>(...);
|
|
||||||
}
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <fields>;
|
|
||||||
}
|
|
||||||
-keepclasseswithmembers class * {
|
|
||||||
@javax.inject.Inject <methods>;
|
|
||||||
}
|
|
||||||
@ -82,6 +82,9 @@ public class NetworkModule {
|
|||||||
|
|
||||||
public static native String getTMSUrlFromNative();
|
public static native String getTMSUrlFromNative();
|
||||||
|
|
||||||
|
public static String Refund_Base_Url = "https://api.kbzpay.com:18008/payment/gateway/uat/";
|
||||||
|
|
||||||
|
|
||||||
private static OkHttpClient getUnsafeOkHttpClient() {
|
private static OkHttpClient getUnsafeOkHttpClient() {
|
||||||
try {
|
try {
|
||||||
// Create a trust manager that does not validate certificate chains
|
// Create a trust manager that does not validate certificate chains
|
||||||
@ -288,7 +291,7 @@ public class NetworkModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String baseUrl = tmsAddress.trim() + "/api/v1/"; //for on prim
|
String baseUrl = tmsAddress.trim() + "/api/v1/"; //for on prim
|
||||||
// String baseUrl = tmsAddress.trim() + "/"; //for uat and prod
|
// String baseUrl = tmsAddress.trim() + "/"; //for uat
|
||||||
|
|
||||||
final Gson gson =
|
final Gson gson =
|
||||||
new GsonBuilder().create();
|
new GsonBuilder().create();
|
||||||
@ -392,21 +395,6 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
|
|
||||||
// char[] password = "test123".toCharArray();
|
// char[] password = "test123".toCharArray();
|
||||||
|
|
||||||
// public static String Refund_Base_Url = "https://api.kbzpay.com:18008/payment/gateway/uat/";
|
|
||||||
|
|
||||||
|
|
||||||
String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
|
|
||||||
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
|
|
||||||
|
|
||||||
|
|
||||||
// if (IpAddress != null && !IpAddress.isEmpty()) {
|
|
||||||
// refundBaseUrl = IpAddress;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (refundBaseUrl.isEmpty()) {
|
|
||||||
// refundBaseUrl = "https://api.kbzpay.com/payment/gateway/";
|
|
||||||
// }
|
|
||||||
|
|
||||||
String pass = SystemParamsOperation.getInstance().getCertificatePassword();
|
String pass = SystemParamsOperation.getInstance().getCertificatePassword();
|
||||||
if (TextUtils.isEmpty(pass)) {
|
if (TextUtils.isEmpty(pass)) {
|
||||||
pass = "test123";
|
pass = "test123";
|
||||||
@ -468,7 +456,7 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
return new Retrofit.Builder()
|
return new Retrofit.Builder()
|
||||||
.baseUrl(refundBaseUrl)
|
.baseUrl(Refund_Base_Url)
|
||||||
.client(okHttp)
|
.client(okHttp)
|
||||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
@ -480,7 +468,7 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
|
|
||||||
// Provide fallback Retrofit to avoid crash, but no SSL
|
// Provide fallback Retrofit to avoid crash, but no SSL
|
||||||
return new Retrofit.Builder()
|
return new Retrofit.Builder()
|
||||||
.baseUrl(refundBaseUrl)
|
.baseUrl(Refund_Base_Url)
|
||||||
.client(new OkHttpClient())
|
.client(new OkHttpClient())
|
||||||
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
.addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||||
.addConverterFactory(GsonConverterFactory.create())
|
.addConverterFactory(GsonConverterFactory.create())
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.utsmyanmar.baselib.emv;
|
package com.utsmyanmar.baselib.emv;
|
||||||
|
|
||||||
|
import com.sunmi.pay.hardware.aidlv2.bean.AidV2;
|
||||||
import com.utsmyanmar.baselib.db.model.ContactlessAid;
|
import com.utsmyanmar.baselib.db.model.ContactlessAid;
|
||||||
import com.utsmyanmar.paylibs.utils.core_utils.ByteUtil;
|
import com.utsmyanmar.paylibs.utils.core_utils.ByteUtil;
|
||||||
|
|
||||||
|
|||||||
@ -24,12 +24,12 @@ public interface KPayApiService {
|
|||||||
|
|
||||||
|
|
||||||
//this accept "url" bez this api start with https and other are http in uat
|
//this accept "url" bez this api start with https and other are http in uat
|
||||||
// @POST("closeorder")
|
@POST
|
||||||
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
||||||
|
|
||||||
|
|
||||||
//this 2 is for production
|
//this 2 is for production
|
||||||
@POST("closeorder")
|
// @POST("closeorder")
|
||||||
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class SiriusInterceptor implements Interceptor {
|
|||||||
// hashed = TerminalUtil.getInstance().generateHashedString(nonce); // old tms
|
// hashed = TerminalUtil.getInstance().generateHashedString(nonce); // old tms
|
||||||
hashed = TerminalUtil.getInstance().generateHashedString(nonce).toLowerCase(); // new tms
|
hashed = TerminalUtil.getInstance().generateHashedString(nonce).toLowerCase(); // new tms
|
||||||
|
|
||||||
// LogUtil.d(TAG,"hashed :"+ hashed);
|
LogUtil.d(TAG,"hashed :"+ hashed);
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@ public class Repository {
|
|||||||
|
|
||||||
public Observable<KPayQRRequest.CloseOrderResponse> qrCloseOrder(KPayQRRequest.CloseOrderRequest request){
|
public Observable<KPayQRRequest.CloseOrderResponse> qrCloseOrder(KPayQRRequest.CloseOrderRequest request){
|
||||||
String url = "https://api.kbzpay.com/payment/gateway/uat/closeorder"; //close this in prod
|
String url = "https://api.kbzpay.com/payment/gateway/uat/closeorder"; //close this in prod
|
||||||
return kPayApiService.closeOrder(url, request); // this is for local
|
return kPayApiService.closeOrder(url, request);
|
||||||
// return kPayApiService.closeOrder(request); //this is for prod
|
// return kPayApiService.closeOrder(request); //this is for prod
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ public class Repository {
|
|||||||
}
|
}
|
||||||
public Observable<EReceiptResponse> sendReceipt(Object body){
|
public Observable<EReceiptResponse> sendReceipt(Object body){
|
||||||
String apiSecret = BuildConfig.ERECEIPT_SECRET;
|
String apiSecret = BuildConfig.ERECEIPT_SECRET;
|
||||||
// LogUtil.d("kmk", "receipt secret =>" + apiSecret);
|
LogUtil.d("kmk", "receipt secret =>" + apiSecret);
|
||||||
String timestamp = String.valueOf(System.currentTimeMillis());
|
String timestamp = String.valueOf(System.currentTimeMillis());
|
||||||
String bodyString = new Gson().toJson(body);
|
String bodyString = new Gson().toJson(body);
|
||||||
String dataToHash = bodyString + apiSecret + timestamp;
|
String dataToHash = bodyString + apiSecret + timestamp;
|
||||||
|
|||||||
@ -225,7 +225,7 @@ public abstract class EmvBaseViewModel extends BaseViewModel {
|
|||||||
// transData.setCashbackAmount("000000000100"); //if support cashback amount
|
// transData.setCashbackAmount("000000000100"); //if support cashback amount
|
||||||
transData.setEmvTransType(ByteUtil.hexStr2Byte(getTransactionType())); //0x00-sale, 0x20-refund,0x09-sale with cashback
|
transData.setEmvTransType(ByteUtil.hexStr2Byte(getTransactionType())); //0x00-sale, 0x20-refund,0x09-sale with cashback
|
||||||
transData.setCountryCode("104"); //CountryCode
|
transData.setCountryCode("104"); //CountryCode
|
||||||
transData.setCurrencyCode(mPayDetail.getCurrencyCode()); //CurrencyCode, 840 indicate USD dollar
|
transData.setCurrencyCode("104"); //CurrencyCode, 840 indicate USD dollar
|
||||||
transData.setTermId(mPayDetail.getTerminalNo());
|
transData.setTermId(mPayDetail.getTerminalNo());
|
||||||
transData.setMerId(mPayDetail.getMerchantNo());
|
transData.setMerId(mPayDetail.getMerchantNo());
|
||||||
transData.setTransDate(new SimpleDateFormat("yyMMdd", Locale.getDefault()).format(new Date()));
|
transData.setTransDate(new SimpleDateFormat("yyMMdd", Locale.getDefault()).format(new Date()));
|
||||||
|
|||||||
34
paylibs/proguard-rules.pro
vendored
34
paylibs/proguard-rules.pro
vendored
@ -19,37 +19,3 @@
|
|||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
# Keep the JNDI classes
|
|
||||||
-keep class javax.naming.** { *; }
|
|
||||||
-keep class javax.naming.directory.** { *; }
|
|
||||||
|
|
||||||
# Keep the Bouncy Castle classes
|
|
||||||
-keep class org.bouncycastle.** { *; }
|
|
||||||
|
|
||||||
# Keep the Conscrypt classes
|
|
||||||
-keep class org.conscrypt.** { *; }
|
|
||||||
|
|
||||||
# Keep the OpenJSSE classes
|
|
||||||
-keep class org.openjsse.** { *; }
|
|
||||||
|
|
||||||
# Keep specific classes from okhttp3.internal.platform
|
|
||||||
-keep class okhttp3.internal.platform.BouncyCastlePlatform { *; }
|
|
||||||
-keep class okhttp3.internal.platform.ConscryptPlatform { *; }
|
|
||||||
-keep class okhttp3.internal.platform.OpenJSSEPlatform { *; }
|
|
||||||
|
|
||||||
# Keep Nexgo SDK
|
|
||||||
-keep class com.nexgo.** { *; }
|
|
||||||
|
|
||||||
# Keep DDI interface (VERY IMPORTANT)
|
|
||||||
-keep class com.xinguodu.ddiinterface.** { *; }
|
|
||||||
|
|
||||||
# Keep printer implementations
|
|
||||||
-keep class com.nexgo.oaf.apiv3.device.printer.** { *; }
|
|
||||||
|
|
||||||
# Prevent method shrinking/optimization
|
|
||||||
-dontoptimize
|
|
||||||
-dontshrink
|
|
||||||
|
|
||||||
-dontwarn com.xgd.smartpos.manager.app.UsageInfo
|
|
||||||
-dontwarn com.xgd.smartpos.manager.app.UsageStats
|
|
||||||
@ -343,9 +343,9 @@ public abstract class BaseXPrint {
|
|||||||
// print2ColumnsStringNoSpace("AID :", MPU_AID);
|
// print2ColumnsStringNoSpace("AID :", MPU_AID);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if (payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_ACCEPT) || payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_APPROVED)) {
|
if (payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_ACCEPT) || payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_APPROVED)) {
|
||||||
// print2ColumnsStringNoSpace("TXN ID :",payDetail.getReferNo());
|
print2ColumnsStringNoSpace("TXN ID :",payDetail.getReferNo());
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -891,16 +891,15 @@ public abstract class BaseXPrint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dashBreak();
|
dashBreak();
|
||||||
// print2ColumnsString("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal));
|
print2ColumnsString("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal));
|
||||||
printer.appendPrnStr("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + " ", fontNormal, false);
|
|
||||||
dashBreak();
|
dashBreak();
|
||||||
// print2ColumnsString("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount));
|
print2ColumnsString("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount));
|
||||||
printer.appendPrnStr("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount) + " ", fontNormal, false);
|
|
||||||
dashBreak();
|
dashBreak();
|
||||||
// print2ColumnsString("Grand Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount - refundTotal));
|
print2ColumnsString("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount - refundTotal));
|
||||||
printer.appendPrnStr("Grand Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount - refundTotal) + " ", fontNormal, false);
|
|
||||||
dashBreakEnding();
|
dashBreakEnding();
|
||||||
// emptyLine(2);
|
// emptyLine(2);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printErrorBlock(String msg) {
|
private void printErrorBlock(String msg) {
|
||||||
@ -1114,8 +1113,7 @@ public abstract class BaseXPrint {
|
|||||||
printer.appendPrnStr("TIME :" + payDetail.getTransTime(), fontNormal, AlignEnum.LEFT, false);
|
printer.appendPrnStr("TIME :" + payDetail.getTransTime(), fontNormal, AlignEnum.LEFT, false);
|
||||||
if (payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() == 1) {
|
if (payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() == 1) {
|
||||||
// printer.appendPrnStr("TRACE NO:" + traceNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
// printer.appendPrnStr("TRACE NO:" + traceNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
||||||
// printer.appendPrnStr("INV NO :" + invoiceNo , fontNormal, AlignEnum.LEFT,false);
|
printer.appendPrnStr("INV NO :" + invoiceNo , fontNormal, AlignEnum.LEFT,false);
|
||||||
printer.appendPrnStr("TRACE NO :" + traceNum , fontNormal, AlignEnum.LEFT,false);
|
|
||||||
} else if (!payDetail.getTransType().equals(SETTLEMENT) && !payDetail.getTransType().equals(SUMMARY) && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value) {
|
} else if (!payDetail.getTransType().equals(SETTLEMENT) && !payDetail.getTransType().equals(SUMMARY) && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value) {
|
||||||
printer.appendPrnStr("BTH NO :" + batchNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
printer.appendPrnStr("BTH NO :" + batchNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
||||||
} else if (payDetail.getTransType().equals(SUMMARY)) {
|
} else if (payDetail.getTransType().equals(SUMMARY)) {
|
||||||
@ -1201,8 +1199,7 @@ public abstract class BaseXPrint {
|
|||||||
printer.appendPrnStr("TIME :" + payDetail.getTransTime(), fontNormal, AlignEnum.LEFT, false);
|
printer.appendPrnStr("TIME :" + payDetail.getTransTime(), fontNormal, AlignEnum.LEFT, false);
|
||||||
if (payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() == 1) {
|
if (payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() == 1) {
|
||||||
// printer.appendPrnStr("TRACE NO:" + traceNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
// printer.appendPrnStr("TRACE NO:" + traceNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
||||||
// printer.appendPrnStr("INV NO :" + invoiceNo , fontNormal, AlignEnum.LEFT,false);
|
printer.appendPrnStr("INV NO :" + invoiceNo , fontNormal, AlignEnum.LEFT,false);
|
||||||
printer.appendPrnStr("TRACE NO :" + traceNum , fontNormal, AlignEnum.LEFT,false);
|
|
||||||
} else if (!payDetail.getTransType().equals(SETTLEMENT) && !payDetail.getTransType().equals(SUMMARY) && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value) {
|
} else if (!payDetail.getTransType().equals(SETTLEMENT) && !payDetail.getTransType().equals(SUMMARY) && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value) {
|
||||||
// printer.appendPrnStr("BTH NO :" + batchNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
// printer.appendPrnStr("BTH NO :" + batchNum + " INV NO:" + invoiceNo, fontNormal, AlignEnum.LEFT,false);
|
||||||
} else if (payDetail.getTransType().equals(SUMMARY)) {
|
} else if (payDetail.getTransType().equals(SUMMARY)) {
|
||||||
|
|||||||
BIN
release_key.jks
BIN
release_key.jks
Binary file not shown.
Loading…
Reference in New Issue
Block a user