prod ready
This commit is contained in:
parent
928879b9e7
commit
528bcbb004
@ -14,8 +14,8 @@ android {
|
|||||||
applicationId "com.utsmm.kbz"
|
applicationId "com.utsmm.kbz"
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 32
|
versionCode 2
|
||||||
versionName "2.12"
|
versionName "2.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,8 +116,8 @@ 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();
|
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
||||||
|
|
||||||
// Keep screen on
|
// Keep screen on
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
@ -160,10 +160,8 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initKey(){
|
private void initKey(){
|
||||||
// SystemParamsOperation.getInstance().setTmsAddress("https://api-tms-uat.kbzbank.com:8443/sirius");
|
SystemParamsOperation.getInstance().setTmsAddress("https://api-tms.kbzbank.com/sirius");
|
||||||
SystemParamsOperation.getInstance().setTmsAddress("https://sirius-nest.utsmyanmar.com/api/v1");
|
SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms.kbzbank.com/receipt");
|
||||||
// SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms-uat.kbzbank.com:8443/receipt");
|
|
||||||
SystemParamsOperation.getInstance().setEReceiptAddress("https://receipt-nest.utsmyanmar.com/api/v1");
|
|
||||||
|
|
||||||
PinPad pinPad = MyApplication.getInstance().deviceEngine.getPinPad();
|
PinPad pinPad = MyApplication.getInstance().deviceEngine.getPinPad();
|
||||||
byte[] encryptedPIK = SystemParamsOperation.getInstance().getPIK();
|
byte[] encryptedPIK = SystemParamsOperation.getInstance().getPIK();
|
||||||
@ -436,16 +434,14 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
SystemParamsOperation.getInstance().setDownloadedParams(false);
|
SystemParamsOperation.getInstance().setDownloadedParams(false);
|
||||||
|
|
||||||
handleAutoSettlementIntent(getIntent());
|
handleAutoSettlementIntent(getIntent());
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
BaseApplication.getInstance().deviceEngine.getPlatform().hideNavigationBar();
|
||||||
BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
// BaseApplication.getInstance().deviceEngine.getPlatform().showNavigationBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@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().enableTaskButton();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -563,9 +559,6 @@ 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().enableHomeButton();
|
|
||||||
// BaseApplication.getInstance().deviceEngine.getPlatform().enableTaskButton();
|
|
||||||
// Clean up RxJava disposables
|
// Clean up RxJava disposables
|
||||||
compositeDisposable.clear();
|
compositeDisposable.clear();
|
||||||
// Reset screen mode
|
// Reset screen mode
|
||||||
|
|||||||
@ -160,18 +160,10 @@ public class MainFragment extends DataBindingFragment {
|
|||||||
NexGoSDK.getInstance().cancelCheckCard();
|
NexGoSDK.getInstance().cancelCheckCard();
|
||||||
NexGoSDK.getInstance().closeReader();
|
NexGoSDK.getInstance().closeReader();
|
||||||
enableHomeButton();
|
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() {
|
private void disableHomeButton() {
|
||||||
int result = BaseApplication.getInstance().deviceEngine.getPlatform().disableHomeButton();
|
int result = BaseApplication.getInstance().deviceEngine.getPlatform().disableHomeButton();
|
||||||
LogUtil.d(TAG, "Disable Home Button Result:" + result);
|
LogUtil.d(TAG, "Disable Home Button Result:" + result);
|
||||||
|
|||||||
@ -42,8 +42,7 @@ public class RefundCertificateManager {
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
// String downloadBase = tmsAddress.trim() + "/api/v1/file/download?filePath="; //local
|
String downloadBase = tmsAddress.trim() + "/file/download?filePath=";
|
||||||
String downloadBase = tmsAddress.trim() + "/file/download?filePath="; // uat and prod
|
|
||||||
|
|
||||||
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
|
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
|
||||||
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();
|
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();
|
||||||
|
|||||||
@ -142,6 +142,7 @@
|
|||||||
android:weightSum="3">
|
android:weightSum="3">
|
||||||
|
|
||||||
<!-- Tap Card -->
|
<!-- Tap Card -->
|
||||||
|
<!-- android:onClick="@{()->click.onClickTap()}"-->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="96dp"
|
android:layout_height="96dp"
|
||||||
@ -150,7 +151,6 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:cardCornerRadius="12dp"
|
app:cardCornerRadius="12dp"
|
||||||
app:cardElevation="2dp"
|
app:cardElevation="2dp"
|
||||||
android:onClick="@{()->click.onClickTap()}"
|
|
||||||
android:backgroundTint="#fff"
|
android:backgroundTint="#fff"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -11,8 +11,8 @@
|
|||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 1,
|
"versionCode": 33,
|
||||||
"versionName": "1.00-uat",
|
"versionName": "2.13-uat",
|
||||||
"outputFile": "app-uat-release.apk"
|
"outputFile": "app-uat-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -21,16 +21,8 @@ import com.utsmyanmar.paylibs.utils.LogUtil;
|
|||||||
public final class TerminalKeyUtil {
|
public final class TerminalKeyUtil {
|
||||||
|
|
||||||
public static final String TAG = TerminalKeyUtil.class.getSimpleName();
|
public static final String TAG = TerminalKeyUtil.class.getSimpleName();
|
||||||
|
private static final byte[] main_key_data = ByteUtil.hexStr2Bytes("".toUpperCase()); // KBZ PROD
|
||||||
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[] work_key_data = new byte[16];
|
private static final byte[] work_key_data = new byte[16];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void initNexKey() {
|
public static void initNexKey() {
|
||||||
byte[] IPEKByte = ByteUtil.hexStr2Bytes("5A4CFF6DE93F0488926166F3317EFD2F"); // IPEK
|
byte[] IPEKByte = ByteUtil.hexStr2Bytes("5A4CFF6DE93F0488926166F3317EFD2F"); // IPEK
|
||||||
byte[] IPEKKCVByte = ByteUtil.hexStr2Bytes("1F0C18");
|
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.IPEK,IPEKByte,16,KSNByte);
|
||||||
// int result = pinPad.dukptKeyInject(9, DukptKeyTypeEnum.BDK,IPEKByte,16,ksn);
|
// int result = pinPad.dukptKeyInject(9, DukptKeyTypeEnum.BDK,IPEKByte,16,ksn);
|
||||||
|
|
||||||
LogUtil.d(TAG, "save tmk key result: "+result);
|
// LogUtil.d(TAG, "save tmk key result: "+result);
|
||||||
LogUtil.d(TAG, "save tmk kcv: "+ByteUtil.bytes2HexStr(kcv));
|
// LogUtil.d(TAG, "save tmk kcv: "+ByteUtil.bytes2HexStr(kcv));
|
||||||
|
|
||||||
// byte[] encryptedPIK = SystemParamsOperation.getInstance().getKeyPIK().get(0);
|
// byte[] encryptedPIK = SystemParamsOperation.getInstance().getKeyPIK().get(0);
|
||||||
//
|
//
|
||||||
|
|||||||
@ -254,7 +254,8 @@ public class NetworkModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (baseUrl.isEmpty()) {
|
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()
|
return new Retrofit.Builder()
|
||||||
.baseUrl(baseUrl)
|
.baseUrl(baseUrl)
|
||||||
@ -310,8 +311,8 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
|
|
||||||
// char[] password = "test123".toCharArray();
|
// char[] password = "test123".toCharArray();
|
||||||
|
|
||||||
// String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
|
String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
|
||||||
String refundBaseUrl = "https://api-uat.kbzpay.com:18008/payment/gateway/uat/";
|
// String refundBaseUrl = "https://api-uat.kbzpay.com:18008/payment/gateway/uat/";
|
||||||
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
|
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
|
||||||
|
|
||||||
|
|
||||||
@ -325,7 +326,7 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
|
|
||||||
String pass = SystemParamsOperation.getInstance().getCertificatePassword();
|
String pass = SystemParamsOperation.getInstance().getCertificatePassword();
|
||||||
if (TextUtils.isEmpty(pass)) {
|
if (TextUtils.isEmpty(pass)) {
|
||||||
pass = "test123";
|
pass = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
char[] password = pass.toCharArray();
|
char[] password = pass.toCharArray();
|
||||||
|
|||||||
@ -3,15 +3,10 @@ package com.utsmyanmar.baselib.network;
|
|||||||
import com.utsmyanmar.baselib.network.model.KPayQRQueryRequest;
|
import com.utsmyanmar.baselib.network.model.KPayQRQueryRequest;
|
||||||
import com.utsmyanmar.baselib.network.model.KPayQRRequest;
|
import com.utsmyanmar.baselib.network.model.KPayQRRequest;
|
||||||
import com.utsmyanmar.baselib.network.model.KPayQRResponse;
|
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 io.reactivex.rxjava3.core.Observable;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.POST;
|
import retrofit2.http.POST;
|
||||||
import retrofit2.http.Url;
|
|
||||||
|
|
||||||
public interface KPayApiService {
|
public interface KPayApiService {
|
||||||
|
|
||||||
@ -23,13 +18,13 @@ public interface KPayApiService {
|
|||||||
Observable<KPayQRQueryRequest.QRQueryResponse> checkStatus(@Body KPayQRQueryRequest.QRQueryRequest waveStatusRequest);
|
Observable<KPayQRQueryRequest.QRQueryResponse> checkStatus(@Body KPayQRQueryRequest.QRQueryRequest waveStatusRequest);
|
||||||
|
|
||||||
|
|
||||||
//this accept "url" bez this api start with https and other are http in uat
|
//this accepts "url" bez this api start with https and other are http in uat
|
||||||
@POST
|
// @POST
|
||||||
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @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(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,9 +86,9 @@ public class Repository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Observable<KPayQRRequest.CloseOrderResponse> qrCloseOrder(KPayQRRequest.CloseOrderRequest request){
|
public Observable<KPayQRRequest.CloseOrderResponse> qrCloseOrder(KPayQRRequest.CloseOrderRequest request){
|
||||||
String url = "https://api-uat.kbzpay.com/payment/gateway/uat/closeorder"; //close this in prod
|
// 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(url, request); // this is for uat
|
||||||
// return kPayApiService.closeOrder(request); //this is for prod
|
return kPayApiService.closeOrder(request); //this is for prod
|
||||||
}
|
}
|
||||||
|
|
||||||
public Observable<KPayQRQueryRequest.QRQueryResponse> qrStatusCheck(KPayQRQueryRequest.QRQueryRequest request) {
|
public Observable<KPayQRQueryRequest.QRQueryResponse> qrStatusCheck(KPayQRQueryRequest.QRQueryRequest request) {
|
||||||
|
|||||||
@ -40,12 +40,8 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private boolean checkExpSwitch = false;
|
private boolean checkExpSwitch = false;
|
||||||
|
|
||||||
// private String tmsAddress = "https://tms.smile-mm.com";
|
private String tmsAddress = "https://api-tms.kbzbank.com/sirius";
|
||||||
// private String tmsAddress = "http://128.199.170.203";
|
private String ereceiptAddress = "https://api-tms.kbzbank.com/receipt";
|
||||||
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 binValues = "";
|
private String binValues = "";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user