prod ready

This commit is contained in:
moon 2026-05-08 14:10:14 +06:30
parent 928879b9e7
commit 528bcbb004
13 changed files with 33 additions and 65 deletions

View File

@ -14,8 +14,8 @@ android {
applicationId "com.utsmm.kbz"
minSdk 24
targetSdk 33
versionCode 32
versionName "2.12"
versionCode 2
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -116,8 +116,8 @@ public class MainActivity extends AppCompatActivity implements
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
// Keep screen on
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
@ -160,10 +160,8 @@ public class MainActivity extends AppCompatActivity implements
}
private void initKey(){
// SystemParamsOperation.getInstance().setTmsAddress("https://api-tms-uat.kbzbank.com:8443/sirius");
SystemParamsOperation.getInstance().setTmsAddress("https://sirius-nest.utsmyanmar.com/api/v1");
// SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms-uat.kbzbank.com:8443/receipt");
SystemParamsOperation.getInstance().setEReceiptAddress("https://receipt-nest.utsmyanmar.com/api/v1");
SystemParamsOperation.getInstance().setTmsAddress("https://api-tms.kbzbank.com/sirius");
SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms.kbzbank.com/receipt");
PinPad pinPad = MyApplication.getInstance().deviceEngine.getPinPad();
byte[] encryptedPIK = SystemParamsOperation.getInstance().getPIK();
@ -436,16 +434,14 @@ public class MainActivity extends AppCompatActivity implements
SystemParamsOperation.getInstance().setDownloadedParams(false);
handleAutoSettlementIntent(getIntent());
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
}
@Override
public void onStop(){
super.onStop();
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
// BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
// BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
}
@Override
@ -563,9 +559,6 @@ public class MainActivity extends AppCompatActivity implements
@Override
public void onDestroy() {
super.onDestroy();
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
// BaseApplication.getInstance().deviceEngine.getPlatform().enableHomeButton();
// BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
// Clean up RxJava disposables
compositeDisposable.clear();
// Reset screen mode

View File

@ -160,18 +160,10 @@ public class MainFragment extends DataBindingFragment {
NexGoSDK.getInstance().cancelCheckCard();
NexGoSDK.getInstance().closeReader();
enableHomeButton();
// enablePinPadSound(false);
// disableTaskButton();
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
});
}
// private void enablePinPadSound(boolean flag) {n
// int result = BaseApplication.getInstance().deviceEngine.getPlatform().enablePinpadBeep(flag);
// LogUtil.d(TAG, "Pin Pad Beep Result:" + result);
// }
private void disableHomeButton() {
int result = BaseApplication.getInstance().deviceEngine.getPlatform().disableHomeButton();
LogUtil.d(TAG, "Disable Home Button Result:" + result);

View File

@ -42,8 +42,7 @@ public class RefundCertificateManager {
return;
};
// String downloadBase = tmsAddress.trim() + "/api/v1/file/download?filePath="; //local
String downloadBase = tmsAddress.trim() + "/file/download?filePath="; // uat and prod
String downloadBase = tmsAddress.trim() + "/file/download?filePath=";
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();

View File

@ -142,6 +142,7 @@
android:weightSum="3">
<!-- Tap Card -->
<!-- android:onClick="@{()->click.onClickTap()}"-->
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="96dp"
@ -150,7 +151,6 @@
android:layout_weight="1"
app:cardCornerRadius="12dp"
app:cardElevation="2dp"
android:onClick="@{()->click.onClickTap()}"
android:backgroundTint="#fff"
android:foreground="?android:attr/selectableItemBackground"
android:focusable="true"

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.00-uat",
"versionCode": 33,
"versionName": "2.13-uat",
"outputFile": "app-uat-release.apk"
}
],

View File

@ -21,16 +21,8 @@ import com.utsmyanmar.paylibs.utils.LogUtil;
public final class TerminalKeyUtil {
public static final String TAG = TerminalKeyUtil.class.getSimpleName();
private static final byte[] main_key_data = ByteUtil.hexStr2Bytes("B4D74774CC846CAFF6D1AAAC2EB79CFF".toUpperCase()); // KBZ UAT
// private static final byte[] main_key_usd_data = ByteUtil.hexStr2Bytes("3f4bcac6cc559ab12bbbc5a51118f3f5".toUpperCase()); // KBZ UAT
// private static final byte[] main_key_data = ByteUtil.hexStr2Bytes("875f63741753d18811a3449090d1777b".toUpperCase());
// private static final byte[] main_key_data = ByteUtil.hexStr2Bytes("e121249099a677e8b7d4f6a9d49fe8d1".toUpperCase()); // MPU
private static final byte[] main_key_data = ByteUtil.hexStr2Bytes("".toUpperCase()); // KBZ PROD
private static final byte[] work_key_data = new byte[16];
public static void initNexKey() {
byte[] IPEKByte = ByteUtil.hexStr2Bytes("5A4CFF6DE93F0488926166F3317EFD2F"); // IPEK
byte[] IPEKKCVByte = ByteUtil.hexStr2Bytes("1F0C18");
@ -54,8 +46,8 @@ public final class TerminalKeyUtil {
// int result = pinPad.dukptKeyInject(9, DukptKeyTypeEnum.IPEK,IPEKByte,16,KSNByte);
// int result = pinPad.dukptKeyInject(9, DukptKeyTypeEnum.BDK,IPEKByte,16,ksn);
LogUtil.d(TAG, "save tmk key result: "+result);
LogUtil.d(TAG, "save tmk kcv: "+ByteUtil.bytes2HexStr(kcv));
// LogUtil.d(TAG, "save tmk key result: "+result);
// LogUtil.d(TAG, "save tmk kcv: "+ByteUtil.bytes2HexStr(kcv));
// byte[] encryptedPIK = SystemParamsOperation.getInstance().getKeyPIK().get(0);
//

View File

@ -254,7 +254,8 @@ public class NetworkModule {
}
if (baseUrl.isEmpty()) {
baseUrl = "http://api-uat.kbzpay.com/payment/gateway/uat/";
// baseUrl = "http://api-uat.kbzpay.com/payment/gateway/uat/"; //UAT
baseUrl = "https://api.kbzpay.com/payment/gateway/"; //Prod
}
return new Retrofit.Builder()
.baseUrl(baseUrl)
@ -310,8 +311,8 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
// char[] password = "test123".toCharArray();
// String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
String refundBaseUrl = "https://api-uat.kbzpay.com:18008/payment/gateway/uat/";
String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
// String refundBaseUrl = "https://api-uat.kbzpay.com:18008/payment/gateway/uat/";
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
@ -325,7 +326,7 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
String pass = SystemParamsOperation.getInstance().getCertificatePassword();
if (TextUtils.isEmpty(pass)) {
pass = "test123";
pass = "";
}
char[] password = pass.toCharArray();

View File

@ -3,15 +3,10 @@ package com.utsmyanmar.baselib.network;
import com.utsmyanmar.baselib.network.model.KPayQRQueryRequest;
import com.utsmyanmar.baselib.network.model.KPayQRRequest;
import com.utsmyanmar.baselib.network.model.KPayQRResponse;
import com.utsmyanmar.baselib.network.model.MMQRStatusResponse;
import com.utsmyanmar.baselib.network.model.WaveQRRequest;
import com.utsmyanmar.baselib.network.model.WaveQRResponse;
import com.utsmyanmar.baselib.network.model.WaveStatusRequest;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Url;
public interface KPayApiService {
@ -23,13 +18,13 @@ public interface KPayApiService {
Observable<KPayQRQueryRequest.QRQueryResponse> checkStatus(@Body KPayQRQueryRequest.QRQueryRequest waveStatusRequest);
//this accept "url" bez this api start with https and other are http in uat
@POST
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
//this accepts "url" bez this api start with https and other are http in uat
// @POST
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
//this 2 is for production
// @POST("closeorder")
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
@POST("closeorder")
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
}

View File

@ -86,9 +86,9 @@ public class Repository {
}
public Observable<KPayQRRequest.CloseOrderResponse> qrCloseOrder(KPayQRRequest.CloseOrderRequest request){
String url = "https://api-uat.kbzpay.com/payment/gateway/uat/closeorder"; //close this in prod
return kPayApiService.closeOrder(url, request); // this is for local
// return kPayApiService.closeOrder(request); //this is for prod
// String url = "https://api-uat.kbzpay.com/payment/gateway/uat/closeorder"; //close this in prod
// return kPayApiService.closeOrder(url, request); // this is for uat
return kPayApiService.closeOrder(request); //this is for prod
}
public Observable<KPayQRQueryRequest.QRQueryResponse> qrStatusCheck(KPayQRQueryRequest.QRQueryRequest request) {

View File

@ -40,12 +40,8 @@ public class SystemParamsSettings implements Serializable {
private boolean checkExpSwitch = false;
// private String tmsAddress = "https://tms.smile-mm.com";
// private String tmsAddress = "http://128.199.170.203";
private String tmsAddress = "https://sirius-nest.utsmyanmar.com/api/v1";
// private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius"; //for uat
private String ereceiptAddress = "https://receipt-nest.utsmyanmar.com/api/v1"; //for on prime
// private String ereceiptAddress = "https://api-tms-uat.kbzbank.com:8443/receipt"; //for uat
private String tmsAddress = "https://api-tms.kbzbank.com/sirius";
private String ereceiptAddress = "https://api-tms.kbzbank.com/receipt";
private String binValues = "";