sec commit
29
app/.gitignore
vendored
@ -1 +1,28 @@
|
||||
/build
|
||||
/build
|
||||
|
||||
# Built files
|
||||
*.apk
|
||||
*.aab
|
||||
*.dex
|
||||
*.class
|
||||
|
||||
# Gradle
|
||||
.gradle/
|
||||
build/
|
||||
*/build/
|
||||
|
||||
# Android Studio
|
||||
*.iml
|
||||
.idea/
|
||||
local.properties
|
||||
|
||||
# Keystore
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
@ -14,8 +14,8 @@ android {
|
||||
applicationId "com.utsmm.kbz"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 3
|
||||
versionName "1.03"
|
||||
versionCode 4
|
||||
versionName "1.04"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 3,
|
||||
"versionName": "1.03",
|
||||
"versionCode": 4,
|
||||
"versionName": "1.04",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
||||
@ -143,7 +143,7 @@ public class MyBindingAdapter {
|
||||
imgURL = R.drawable.logo_mpu;
|
||||
break;
|
||||
case "WALLET":
|
||||
imgURL = R.drawable.logo_wave;
|
||||
imgURL = R.drawable.logo_kpay;
|
||||
break;
|
||||
default:
|
||||
imgURL = R.drawable.logo_unk;
|
||||
@ -293,7 +293,7 @@ public class MyBindingAdapter {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@BindingAdapter({"isTrace"})
|
||||
public static void checkIsTraceOrInvoice(TextView textView, PayDetail payDetail) {
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
textView.setText("INV:"+payDetail.getInvoiceNo());
|
||||
} else {
|
||||
textView.setText("TRC:"+payDetail.getVoucherNo());
|
||||
|
||||
@ -12,6 +12,7 @@ import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
import com.utsmyanmar.baselib.util.TimeoutCallback;
|
||||
import com.utsmyanmar.paylibs.utils.POSUtil;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsSettings;
|
||||
import com.utsmyanmar.paylibs.utils.enums.InvalidAmount;
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
|
||||
import com.utsmm.kbz.BR;
|
||||
@ -173,7 +174,7 @@ public class InputAmountFragment extends DataBindingFragment implements DataBind
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -202,14 +203,27 @@ public class InputAmountFragment extends DataBindingFragment implements DataBind
|
||||
public void onConfirm(){
|
||||
if(isInputValid(Objects.requireNonNull(inputAmountViewModel.inputAmountView.getValue()))){
|
||||
inputAmountViewModel.invalidAmountMsg.setValue("");
|
||||
/*
|
||||
* SMILE requested to add ".00" even they type non decimal amount...
|
||||
* 23/09/2024
|
||||
* */
|
||||
if(!inputAmountViewModel.inputAmountView.getValue().contains(".")) {
|
||||
sharedViewModel.amount.setValue(inputAmountViewModel.inputAmountView.getValue()+".00");
|
||||
|
||||
boolean decimalEnabled = SystemParamsOperation.getInstance().getDecimalEnable();
|
||||
String inputValue = inputAmountViewModel.inputAmountView.getValue();
|
||||
|
||||
if (decimalEnabled) {
|
||||
// SMILE requested to add ".00" even they type non decimal amount...
|
||||
// 23/09/2024
|
||||
if (!inputValue.contains(".")) {
|
||||
sharedViewModel.amount.setValue(inputValue + ".00");
|
||||
} else {
|
||||
sharedViewModel.amount.setValue(inputValue);
|
||||
}
|
||||
} else {
|
||||
sharedViewModel.amount.setValue(inputAmountViewModel.inputAmountView.getValue());
|
||||
// If decimal is not enabled, only allow integer values.
|
||||
if (inputValue.contains(".")) {
|
||||
// Show error if decimals are entered when disabled
|
||||
showSingleInfoDialog("Decimal values are not allowed.");
|
||||
return;
|
||||
} else {
|
||||
sharedViewModel.amount.setValue(inputValue);
|
||||
}
|
||||
}
|
||||
|
||||
observeRouteId(false);
|
||||
|
||||
@ -81,7 +81,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
||||
|
||||
PayDetail payDetail = sharedViewModel.payDetail.getValue();
|
||||
|
||||
if(payDetail != null && !payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_APPROVED) && !payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_ACCEPT) && sharedViewModel.transactionsType.getValue() != TransactionsType.MMQR && sharedViewModel.transactionsType.getValue() != TransactionsType.WAVEPAY_REFUND && sharedViewModel.transactionsType.getValue() != TransactionsType.MMQR_INQUIRY_STATUS) {
|
||||
if(payDetail != null && !payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_APPROVED) && !payDetail.getTradeAnswerCode().equals(Constant.ANSWER_CODE_ACCEPT) && sharedViewModel.transactionsType.getValue() != TransactionsType.MMQR && sharedViewModel.transactionsType.getValue() != TransactionsType.MMQR_REFUND && sharedViewModel.transactionsType.getValue() != TransactionsType.MMQR_INQUIRY_STATUS) {
|
||||
|
||||
navigateNextScreen();
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ public class ReceiptFragment extends DataBindingFragment {
|
||||
}
|
||||
SystemParamsOperation systemParamsOperation = SystemParamsOperation.getInstance();
|
||||
// Load sample bank logo
|
||||
data.bankLogo = BitmapFactory.decodeResource(getResources(), R.drawable.weeny_pos_white_banner);
|
||||
data.bankLogo = BitmapFactory.decodeResource(getResources(), R.drawable.logo_kbzbank);
|
||||
|
||||
// Set sample data
|
||||
data.bankName = "YOUR BANK";
|
||||
|
||||
@ -185,18 +185,18 @@ public class TransactionResultFragment extends DataBindingFragment implements Da
|
||||
private boolean isNonWavepayTransaction(TransactionsType transactionType) {
|
||||
return transactionType != TransactionsType.MMQR &&
|
||||
transactionType != TransactionsType.MMQR_INQUIRY_STATUS &&
|
||||
transactionType != TransactionsType.WAVEPAY_REFUND;
|
||||
transactionType != TransactionsType.MMQR_REFUND;
|
||||
}
|
||||
|
||||
private boolean isWavePayNonSuccessTransaction(TransactionsType transactionType, PayDetail payDetail) {
|
||||
return (transactionType == TransactionsType.MMQR && payDetail.getQrTransStatus() != 1) ||
|
||||
(transactionType == TransactionsType.MMQR_INQUIRY_STATUS && payDetail.getQrTransStatus() != 1) ||
|
||||
(transactionType == TransactionsType.WAVEPAY_REFUND && payDetail.getQrTransStatus() != 1);
|
||||
(transactionType == TransactionsType.MMQR_REFUND && payDetail.getQrTransStatus() != 1);
|
||||
}
|
||||
|
||||
private boolean isWavePaySuccessTransaction(TransactionsType transactionType, PayDetail payDetail) {
|
||||
|
||||
return (transactionType == TransactionsType.MMQR || transactionType == TransactionsType.WAVEPAY_REFUND) &&
|
||||
return (transactionType == TransactionsType.MMQR || transactionType == TransactionsType.MMQR_REFUND) &&
|
||||
payDetail.getQrTransStatus() == 1;
|
||||
}
|
||||
|
||||
|
||||
@ -28,8 +28,6 @@ import com.utsmm.kbz.util.DecimalDigitsInputFilter;
|
||||
import com.utsmm.kbz.util.TransactionUtil;
|
||||
import com.utsmm.kbz.util.ecr.CoreUtils;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
@ -126,7 +124,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
payDetail = TransactionUtil.getInstance().initWalletTransaction(TransactionsType.WAVEPAY_REFUND);
|
||||
payDetail = TransactionUtil.getInstance().initWalletTransaction(TransactionsType.MMQR_REFUND);
|
||||
payDetail.setInvoiceNo(SystemParamsOperation.getInstance().getIncrementInvoiceNum());
|
||||
}
|
||||
|
||||
@ -169,7 +167,7 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
.subscribe(
|
||||
response -> {
|
||||
dismissLoadingDialog();
|
||||
handleRefundResponse(response, referenceNo, refundAmount);
|
||||
handleRefundResponse(response, referenceNo);
|
||||
},
|
||||
throwable -> {
|
||||
dismissLoadingDialog();
|
||||
@ -184,10 +182,12 @@ public class QRRefundFragment extends DataBindingFragment {
|
||||
refundDisposable.add(refundDi);
|
||||
}
|
||||
|
||||
private void handleRefundResponse(KPayRefund.RefundResponse response, String referenceNo, String refundAmount) {
|
||||
private void handleRefundResponse(KPayRefund.RefundResponse response, String referenceNo) {
|
||||
if (response != null && response.getResponse() != null && "REFUND_SUCCESS".equalsIgnoreCase(response.getResponse().getRefundStatus())) {
|
||||
LogUtil.d(TAG, "Refund successful!");
|
||||
|
||||
String refundAmount = response.getResponse().getRefundAmount();
|
||||
|
||||
String dateTime = SystemDateTime.getTodayDateFormat() + " " + SystemDateTime.getTodayTimeFormat();
|
||||
payDetail.setAmount(refundAmount == null ? 0 : POSUtil.getInstance().convertAmount(refundAmount));
|
||||
payDetail.setOriginalTransDate(dateTime);
|
||||
|
||||
@ -152,7 +152,7 @@ public class DetailReportFragment extends DataBindingFragment {
|
||||
|
||||
if(sharedViewModel.hostType.getValue() == HostType.MPU) {
|
||||
|
||||
if(payDetail.getAccountType().equals("MPU") && payDetail.getTransactionType() != TransactionsType.WAVEPAY_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value && payDetail.getTransactionType() != TransactionsType.REVERSAL.value && payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
|
||||
if(payDetail.getAccountType().equals("MPU") && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value && payDetail.getTransactionType() != TransactionsType.REVERSAL.value && payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.VOID.value || payDetail.getTransactionType() == TransactionsType.REFUND.value;
|
||||
lists.add(payDetail);
|
||||
count++;
|
||||
@ -164,8 +164,8 @@ public class DetailReportFragment extends DataBindingFragment {
|
||||
}
|
||||
|
||||
} else if(sharedViewModel.hostType.getValue() == HostType.QR) {
|
||||
if( (payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value ) && payDetail.getQrTransStatus() == 1 && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1 ) {
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value;
|
||||
if( (payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value ) && payDetail.getQrTransStatus() == 1 && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1 ) {
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value;
|
||||
lists.add(payDetail);
|
||||
count++;
|
||||
if(isNeedMinusSign) {
|
||||
@ -176,7 +176,7 @@ public class DetailReportFragment extends DataBindingFragment {
|
||||
}
|
||||
} if(sharedViewModel.hostType.getValue() == HostType.VISA_MASTER) {
|
||||
|
||||
if(!payDetail.getAccountType().equals("MPU") && payDetail.getTransactionType() != TransactionsType.WAVEPAY_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value && payDetail.getTransactionType() != TransactionsType.REVERSAL.value && payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
|
||||
if(!payDetail.getAccountType().equals("MPU") && payDetail.getTransactionType() != TransactionsType.MMQR_REFUND.value && payDetail.getTransactionType() != TransactionsType.MMQR.value && payDetail.getTransactionType() != TransactionsType.REVERSAL.value && payDetail.getTransactionType() != TransactionsType.SETTLEMENT.value && POSUtil.getInstance().getYesterdayDate().compareTo(POSUtil.getInstance().getDateByString(payDetail.transDate)) < 1) {
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.VOID.value || payDetail.getTransactionType() == TransactionsType.REFUND.value;
|
||||
lists.add(payDetail);
|
||||
count++;
|
||||
|
||||
@ -94,7 +94,7 @@ public class ManagementFunctionFragment extends DataBindingFragment {
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() != 1) {
|
||||
navigateToNotFoundScreen();
|
||||
return;
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value && payDetail.getQrTransStatus() != 1) {
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value && payDetail.getQrTransStatus() != 1) {
|
||||
navigateToNotFoundScreen();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -313,18 +313,18 @@ public class ReprintAnyTransactionFragment extends DataBindingFragment {
|
||||
// April 2, 2024 client requested to add QR host at host selection type
|
||||
|
||||
if(sharedViewModel.hostType.getValue() == HostType.MPU) {
|
||||
if(pay.getAccountType().equals("MPU") && pay.getTransactionType() != TransactionsType.MMQR.value && pay.getTransactionType() != TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(pay.getAccountType().equals("MPU") && pay.getTransactionType() != TransactionsType.MMQR.value && pay.getTransactionType() != TransactionsType.MMQR_REFUND.value) {
|
||||
filteredLists.add(pay);
|
||||
}
|
||||
|
||||
} else if(sharedViewModel.hostType.getValue() == HostType.QR) {
|
||||
if(pay.getTransactionType() == TransactionsType.MMQR.value || pay.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(pay.getTransactionType() == TransactionsType.MMQR.value || pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
if(pay.getQrTransStatus() == 1) {
|
||||
filteredLists.add(pay);
|
||||
}
|
||||
}
|
||||
} else if(sharedViewModel.hostType.getValue() == HostType.VISA_MASTER) {
|
||||
if(!pay.getAccountType().equals("MPU") && pay.getTransactionType() != TransactionsType.MMQR.value && pay.getTransactionType() != TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(!pay.getAccountType().equals("MPU") && pay.getTransactionType() != TransactionsType.MMQR.value && pay.getTransactionType() != TransactionsType.MMQR_REFUND.value) {
|
||||
filteredLists.add(pay);
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class SelectRefundFragment extends DataBindingFragment {
|
||||
}
|
||||
|
||||
public void onQRRefund() {
|
||||
sharedViewModel.transactionsType.postValue(TransactionsType.WAVEPAY_REFUND);
|
||||
sharedViewModel.transactionsType.postValue(TransactionsType.MMQR_REFUND);
|
||||
routeId = R.id.action_selectRefundFragment_to_QRRefundFragment;
|
||||
safeNavigateToRouteId();
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ public class TransactionSummaryFragment extends DataBindingFragment {
|
||||
if (sharedViewModel.hostType.getValue() == HostType.QR) {
|
||||
if (pay.getTransactionType() == TransactionsType.MMQR.value && pay.getQrTransStatus() == 1) {
|
||||
wave.inc(pay.amount);
|
||||
} else if (pay.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value && pay.getQrTransStatus() == 1) {
|
||||
} else if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value && pay.getQrTransStatus() == 1) {
|
||||
waveRefund.inc(pay.amount);
|
||||
}
|
||||
} else if (sharedViewModel.hostType.getValue() == HostType.MPU) {
|
||||
|
||||
@ -13,6 +13,7 @@ import com.utsmm.kbz.BR;
|
||||
import com.utsmm.kbz.R;
|
||||
import com.utsmm.kbz.config.Constants;
|
||||
import com.utsmm.kbz.util.enums.ResponseStatus;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
|
||||
/*
|
||||
* This file is not using in this project cuz IPEK is used instead of TMK.
|
||||
@ -54,11 +55,8 @@ public class SignOnFragment extends DataBindingFragment {
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
|
||||
signOnViewModel.startSignOnProcess();
|
||||
|
||||
|
||||
|
||||
observeData();
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable/ic_insert_card.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable/ic_swipe_card.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable/ic_tap_card.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable/logo_amex.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable/logo_discover.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable/logo_mir.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
7
app/src/main/res/drawable/pin_dot_dim.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="10dp"
|
||||
android:height="10dp" />
|
||||
<solid android:color="#B0B0B0" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/primary_card_bg.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid
|
||||
android:color="@color/colorPrimary"/>
|
||||
</shape>
|
||||
10
app/src/main/res/drawable/ripple_effect.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#20667eea">
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
BIN
app/src/main/res/drawable/visa_logo.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
@ -55,6 +55,7 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<TextView
|
||||
|
||||
@ -107,263 +107,215 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Available Payment Methods Title - IMPROVED VISIBILITY -->
|
||||
<!-- Available Payment Methods Title - minimalist -->
|
||||
<TextView
|
||||
android:id="@+id/paymentMethodsTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Available Payment Methods"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#202124"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:letterSpacing="0.05"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headerCard"
|
||||
android:letterSpacing="0.02"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/headerCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Payment Methods List - IMPROVED UI/UX WITH BANK COLOR CODES -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/paymentMethodsCard"
|
||||
<!-- Payment Methods modern, minimalist -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/paymentMethodsTitle"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:padding="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/paymentMethodsTitle"
|
||||
app:layout_constraintBottom_toTopOf="@id/manualEntryCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/manualEntryCard">
|
||||
android:weightSum="3">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
android:padding="16dp">
|
||||
<!-- Tap Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
android:backgroundTint="#fff"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:clickable="true">
|
||||
|
||||
<!-- Tap Card Method - IMPROVED WITH BANK COLORS -->
|
||||
<androidx.cardview.widget.CardView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_tap_card"
|
||||
app:tint="#2E7D32"
|
||||
android:contentDescription="NFC Tap" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="#2E7D32"
|
||||
android:padding="16dp">
|
||||
android:text="Tap"
|
||||
android:textColor="#202124"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Contactless"
|
||||
android:textColor="#909090"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_regular" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<!-- Insert Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="12dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
app:cardElevation="2dp"
|
||||
android:backgroundTint="#fff"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:clickable="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Tap"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Contactless Payment"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:alpha="0.85"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="NFC"
|
||||
android:textColor="#2E7D32"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:background="@drawable/bg_rounded_btn_cancel_cv"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Insert Card Method - IMPROVED WITH BANK COLORS -->
|
||||
<androidx.cardview.widget.CardView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_insert_card"
|
||||
app:tint="#1976D2"
|
||||
android:contentDescription="Insert Chip" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="#1976D2"
|
||||
android:padding="16dp">
|
||||
android:text="Chip"
|
||||
android:textColor="#202124"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="EMV"
|
||||
android:textColor="#909090"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_regular" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<!-- Swipe Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="96dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="12dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
app:cardElevation="2dp"
|
||||
android:backgroundTint="#fff"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:focusable="true"
|
||||
android:clickable="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Insert"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Chip Card Payment"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:alpha="0.85"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="CHIP"
|
||||
android:textColor="#1976D2"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:background="@drawable/bg_rounded_btn_cancel_cv"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Swipe Card Method - IMPROVED WITH BANK COLORS -->
|
||||
<androidx.cardview.widget.CardView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_swipe_card"
|
||||
app:tint="#F57C00"
|
||||
android:contentDescription="Swipe Magstripe" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="#F57C00"
|
||||
android:padding="16dp">
|
||||
android:text="Swipe"
|
||||
android:textColor="#202124"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Magstripe"
|
||||
android:textColor="#909090"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_regular" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Swipe"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Magnetic Stripe Payment"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:alpha="0.85"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="MAG"
|
||||
android:textColor="#F57C00"
|
||||
android:textSize="10sp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:background="@drawable/bg_rounded_btn_cancel_cv"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Manual Entry Button - ENHANCED -->
|
||||
<!-- Manual Entry minimalist outlined button -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/manualEntryCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
app:cardElevation="0.5dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:disableBtn="@{sharedVM.ManualEntryStatus ?? false}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:backgroundTint="#fff">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:background="@color/colorPrimary"
|
||||
android:padding="18dp"
|
||||
android:onClick="@{()-> click.onClickManualEntry()}">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_txt_manual_entry"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#1976D2"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium" />
|
||||
|
||||
|
||||
@ -51,18 +51,18 @@
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- Amount now in header, subtle style below title -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{sharedViewModel.amount == null ? ` `:sharedViewModel._currencyText+` `+sharedViewModel.amount }"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:textAlignment="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:alpha="0.80"
|
||||
tools:text="MMK 2,500.00" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -89,6 +89,52 @@
|
||||
android:padding="20dp">
|
||||
|
||||
|
||||
<!-- PIN length indicator (6 dots) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/pinIndicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/pin_dot_dim"
|
||||
android:layout_margin="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.utsmyanmar.baselib.ui.PinEditText
|
||||
android:id="@+id/passwordEditText"
|
||||
|
||||
@ -627,7 +627,7 @@ public abstract class BaseXPrint {
|
||||
|
||||
for (PayDetail pay : lists) {
|
||||
|
||||
boolean isNeedMinusSign = pay.getTransactionType() == TransactionsType.VOID.value || pay.getTransactionType() == TransactionsType.REFUND.value || pay.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value;
|
||||
boolean isNeedMinusSign = pay.getTransactionType() == TransactionsType.VOID.value || pay.getTransactionType() == TransactionsType.REFUND.value || pay.getTransactionType() == TransactionsType.MMQR_REFUND.value;
|
||||
|
||||
if (hostType == HostType.MPU || hostType == HostType.VISA_MASTER) {
|
||||
print2ColumnsString(pay.getAccountType(), PrintUtils.getInstance().maskCardNumberPciDss(pay.getCardNo()));
|
||||
@ -636,14 +636,14 @@ public abstract class BaseXPrint {
|
||||
print2ColumnsString(pay.getReferNo(), "");
|
||||
|
||||
} else if (hostType == HostType.QR) {
|
||||
if (pay.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
print2ColumnsString("QR PAYMENT", "");
|
||||
} else {
|
||||
print2ColumnsString(pay.getCustomerMobile().toUpperCase(), "");
|
||||
}
|
||||
print2ColumnsString("**/**", "");
|
||||
print2ColumnsString(pay.getTransType().replace("_", " "), pay.getVoucherNo());
|
||||
if (pay.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
print2ColumnsString(pay.getReferNo() + "(RRN)", isNeedMinusSign ? "-" + PrintUtils.getInstance().getSeparatorNumberFormat(pay.getAmount()) : "" + PrintUtils.getInstance().getSeparatorNumberFormat(pay.getAmount()));
|
||||
} else {
|
||||
print2ColumnsString(pay.getQrTransId(), isNeedMinusSign ? "-" + PrintUtils.getInstance().getSeparatorNumberFormat(pay.getAmount()) : "" + PrintUtils.getInstance().getSeparatorNumberFormat(pay.getAmount()));
|
||||
@ -856,7 +856,7 @@ public abstract class BaseXPrint {
|
||||
|
||||
if (payDetail.getTransactionType() == TransactionsType.MMQR.value && payDetail.getQrTransStatus() == 1) {
|
||||
printer.appendPrnStr("TRACE NO:" + traceNum + " INV NO: " + invoiceNo, fontNormal, AlignEnum.LEFT);
|
||||
} else if (!payDetail.getTransType().equals(SETTLEMENT) && !payDetail.getTransType().equals(SUMMARY) && payDetail.getTransactionType() != TransactionsType.WAVEPAY_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);
|
||||
} else if (payDetail.getTransType().equals(SUMMARY)) {
|
||||
printer.appendPrnStr("HOST :" + HOST_NAME_MPU + "", fontNormal, AlignEnum.LEFT);
|
||||
@ -871,7 +871,7 @@ public abstract class BaseXPrint {
|
||||
emptyLine(1);
|
||||
printer.appendPrnStr(transType.replace("_", " "), fontBold, AlignEnum.CENTER);
|
||||
|
||||
if (!(payDetail.getQrTransStatus() != 1 && (payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR.value))) {
|
||||
if (!(payDetail.getQrTransStatus() != 1 && (payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR.value))) {
|
||||
printer.appendPrnStr("\n", fontNormal, AlignEnum.LEFT);
|
||||
printer.appendPrnStr("\n", fontNormal, AlignEnum.LEFT);
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
try {
|
||||
this.callbackStatus = printXStatus;
|
||||
|
||||
if (payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if (payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
printQRPayReceipt(payDetail, isMerchantCopy);
|
||||
} else if (payDetail.getTransactionType() == TransactionsType.SETTLEMENT.value) {
|
||||
printSmileSettlementReport(payDetail,printXStatus);
|
||||
@ -159,7 +159,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
printLogo();
|
||||
printMerchantHeader();
|
||||
printTransHeader(payDetail);
|
||||
printTransDetailWave(payDetail);
|
||||
printTransDetailQR(payDetail);
|
||||
LogUtil.d(TAG,"QR trans status:"+payDetail.getQrTransStatus());
|
||||
if (payDetail.getQrTransStatus() == 1) {
|
||||
printTransFooter(true,payDetail, isMerchantCopy);
|
||||
@ -283,7 +283,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
}
|
||||
|
||||
|
||||
private void printTransDetailWave(PayDetail payDetail) {
|
||||
private void printTransDetailQR(PayDetail payDetail) {
|
||||
try {
|
||||
|
||||
// payDetail.getCustomerMobile() // as channel type
|
||||
@ -296,7 +296,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
print2ColumnsStringNoSpace("TRXN ID ",": "+ (payDetail.getQrTransId() == null || payDetail.getQrTransId().isEmpty() ? "-": payDetail.getQrTransId()));
|
||||
print2ColumnsStringNoSpace("STATUS ",": "+ PrintUtils.getInstance().getQrTransStatus(payDetail.getQrTransStatus()));
|
||||
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value && payDetail.getQrTransStatus() == 1) {
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value && payDetail.getQrTransStatus() == 1) {
|
||||
print2ColumnsStringNoSpace("TRXN REF ",":"+ payDetail.getReferNo());
|
||||
print2ColumnsStringNoSpace("TXN DATE/TIME",":"+ payDetail.getOriginalTransDate());
|
||||
print2ColumnsStringNoSpace("STATUS ",":"+ PrintUtils.getInstance().getQrTransStatus(payDetail.getQrTransStatus()));
|
||||
@ -308,7 +308,7 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
}
|
||||
|
||||
|
||||
if (!(payDetail.getQrTransStatus() != 1 && (payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR.value))) {
|
||||
if (!(payDetail.getQrTransStatus() != 1 && (payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR.value))) {
|
||||
emptyLine(2);
|
||||
}
|
||||
// check is pin change
|
||||
@ -316,34 +316,25 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
if (payDetail.getQrTransStatus() == 1) {
|
||||
|
||||
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value;
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value;
|
||||
print2ColumnsStringBoldCenter("TOTAL MMK", isNeedMinusSign? "- "+PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()): PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()));
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value) {
|
||||
String data = payDetail.getReferNo()+"-"+payDetail.getAmount()+"-"+payDetail.getQrTransId()+"-"+payDetail.getMerchantNo()+"-"+payDetail.getCustomerMobile().toUpperCase()+"-"+payDetail.getOriginalTransDate();
|
||||
|
||||
LogUtil.d(TAG,"QR DATA : "+data);
|
||||
emptyLine(1);
|
||||
|
||||
|
||||
printer.appendQRcode(data, 250, AlignEnum.CENTER);
|
||||
/*
|
||||
* below commented QR code is more quick
|
||||
* */
|
||||
// Bitmap qrCode = PrintUtils.getInstance().generateQRCode(data,300,300);
|
||||
// if(payDetail.getTransactionType() == TransactionsType.MMQR.value) {
|
||||
// String data = payDetail.getReferNo()+"-"+payDetail.getAmount()+"-"+payDetail.getQrTransId()+"-"+payDetail.getMerchantNo()+"-"+payDetail.getCustomerMobile().toUpperCase()+"-"+payDetail.getOriginalTransDate();
|
||||
//
|
||||
// Bitmap mi = BitmapUtils.scale(qrCode,250,250);
|
||||
// LogUtil.d(TAG,"QR DATA : "+data);
|
||||
// emptyLine(1);
|
||||
//
|
||||
// printer.appendImage(mi,AlignEnum.CENTER);
|
||||
|
||||
|
||||
}
|
||||
//
|
||||
// printer.appendQRcode(data, 250, AlignEnum.CENTER);
|
||||
//
|
||||
// }
|
||||
|
||||
emptyLine(1);
|
||||
|
||||
} else {
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
printer.appendPrnStr("(TRANSACTION FAIL)", fontNormal, AlignEnum.CENTER);
|
||||
emptyLine(1);
|
||||
printer.appendPrnStr(reformattedExceededString(payDetail.getTradeResultDes()), fontNormal, AlignEnum.CENTER);
|
||||
|
||||
@ -67,6 +67,20 @@ public class SignOnProcess {
|
||||
payDetail.setTransType(TransactionsType.SIGN_ON.name);
|
||||
payDetail.setTransactionType(TransactionsType.SIGN_ON.value);
|
||||
|
||||
if(SystemParamsOperation.getInstance().getDemoStatus()) {
|
||||
|
||||
byte[] encryptedPIK = ByteUtil.hexStr2Bytes("6950E9DE0594AC50465DF7F4CC842C11");
|
||||
int res = PayLibNex.getInstance().deviceEngine.getPinPad().writeWKey(9, WorkKeyTypeEnum.PINKEY,encryptedPIK,encryptedPIK.length);
|
||||
resultCode = res;
|
||||
if (res < 0) {
|
||||
flag = false;
|
||||
LogUtil.d(TAG, "Fail PIK result code:" + res);
|
||||
} else {
|
||||
flag = true;
|
||||
LogUtil.d(TAG, "Success PIK result code:" + res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.BPC_SIGN_ON, MessageType.NETWORK_MANAGEMENT);
|
||||
ISOSocket.getInstance().enqueue(sendBytes, sendBytes.length,false, new ISOCallback() {
|
||||
|
||||
@ -178,7 +178,7 @@ public class POSUtil {
|
||||
BigDecimal unscaled = new BigDecimal(payDetail.amount);
|
||||
BigDecimal scaled = unscaled.scaleByPowerOfTen(-x);
|
||||
double amounts = Double.parseDouble(scaled.toString());
|
||||
return payDetail.getTransactionType() == TransactionsType.VOID.value || payDetail.getTransactionType() == TransactionsType.REFUND.value || payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value ? "-"+formatter.format(amounts) : ""+formatter.format(amounts);
|
||||
return payDetail.getTransactionType() == TransactionsType.VOID.value || payDetail.getTransactionType() == TransactionsType.REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value ? "-"+formatter.format(amounts) : ""+formatter.format(amounts);
|
||||
}
|
||||
|
||||
public String getTransName(PayDetail payDetail) {
|
||||
@ -282,7 +282,7 @@ public class POSUtil {
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value) {
|
||||
return payDetail.getCustomerMobile().toUpperCase();
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
return "QR PAYMENT";
|
||||
} else {
|
||||
return payDetail.getAccountType();
|
||||
@ -297,7 +297,7 @@ public class POSUtil {
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value) {
|
||||
return payDetail.getQrTransId();
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
} else if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
return payDetail.getReferNo()+"(RRN)";
|
||||
} else {
|
||||
return payDetail.getReferNo();
|
||||
@ -310,7 +310,7 @@ public class POSUtil {
|
||||
public String checkTraceOrInvoice(PayDetail payDetail) {
|
||||
if(payDetail != null) {
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR.value || payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
return payDetail.getInvoiceNo();
|
||||
} else {
|
||||
return payDetail.getVoucherNo();
|
||||
@ -420,7 +420,7 @@ public class POSUtil {
|
||||
|
||||
} else {
|
||||
// return "Transaction failed";
|
||||
if(payDetail.getTransactionType() == TransactionsType.WAVEPAY_REFUND.value) {
|
||||
if(payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||
if(payDetail.getTradeResultDes() != null && !payDetail.getTradeResultDes().isEmpty()) {
|
||||
return "Declined \n "+payDetail.getTradeResultDes();
|
||||
} else {
|
||||
|
||||
@ -47,7 +47,7 @@ public enum TransactionsType {
|
||||
|
||||
DETAIL_REPORT("DETAIL_REPORT",33,"000000"),
|
||||
|
||||
WAVEPAY_REFUND("QR_REFUND",34,"000000");
|
||||
MMQR_REFUND("QR_REFUND",34,"000000");
|
||||
|
||||
public final String name;
|
||||
|
||||
|
||||