new e-receipt settlement request
This commit is contained in:
parent
f49a333af2
commit
2f1466d67b
18
CHANGELOG.md
18
CHANGELOG.md
@ -33,4 +33,20 @@
|
||||
- signature re-show on void
|
||||
- signature re-show on refund
|
||||
- pre-auth, pre-auth can, pre-auth com s' manual entry flow are changed
|
||||
- can show/hide manual entry in all transactions
|
||||
- can show/hide manual entry in all transactions
|
||||
|
||||
## [2.35] - 29-05-2026
|
||||
- app crash fix
|
||||
|
||||
## [2.36] - 29-05-2026
|
||||
- local database migration
|
||||
|
||||
## [2.37] - 06-07-2026
|
||||
- **General**
|
||||
- E-receipt send to backend service
|
||||
- One Click Settlement
|
||||
|
||||
## [2.38] - 06-07-2026
|
||||
- **General**
|
||||
- SETTLEMENT both in one click
|
||||
- showing each transaction detail when SETTLE
|
||||
@ -14,8 +14,8 @@ android {
|
||||
applicationId "com.utsmm.kbz"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 47
|
||||
versionName "2.38"
|
||||
versionCode 44
|
||||
versionName "2.39"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ public class QRPayFragment extends DataBindingFragment {
|
||||
features.add(new QRPayItem("Refund", R.drawable.ic_refund, true));
|
||||
}
|
||||
features.add(new QRPayItem("History", R.drawable.ic_history, true));
|
||||
// features.add(new QRPayItem("Mock QR", R.drawable.ic_qr_pay, true));
|
||||
features.add(new QRPayItem("Mock QR", R.drawable.ic_qr_pay, true));
|
||||
|
||||
// List<QRPayItem> features = List.of(
|
||||
// new QRPayItem("Sale", R.drawable.ic_qr_pay, true),
|
||||
|
||||
@ -3,8 +3,10 @@ package com.utsmm.kbz.util;
|
||||
import com.utsmm.kbz.BuildConfig;
|
||||
import com.utsmm.kbz.util.enums.TransResultStatus;
|
||||
import com.utsmm.kbz.util.tms.TMSUtil;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.CardTransaction;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptRequest;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.Transaction;
|
||||
import com.utsmyanmar.paylibs.model.CardSettleData;
|
||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||
import com.utsmyanmar.paylibs.model.QRSettleData;
|
||||
import com.utsmyanmar.paylibs.model.SettleData;
|
||||
@ -203,6 +205,15 @@ public class EReceiptUtil {
|
||||
request.setDE37("0000");
|
||||
request.setDE49(currencyCodeToText(payDetail.getCurrencyCode()));
|
||||
|
||||
request.setDE14("");
|
||||
request.setDE24(payDetail.getVoucherNo());
|
||||
request.setDE43(SystemParamsOperation.getInstance().getMerchantName());
|
||||
|
||||
List<CardSettleData> cardSettleDataList = payDetail.getCardSettleData();
|
||||
if (cardSettleDataList != null && !cardSettleDataList.isEmpty()) {
|
||||
request.setCardTransactions(buildCardTransactions(cardSettleDataList));
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
request.setDE2(POSUtil.getInstance().getCardNumMasking(payDetail.getCardNo()));
|
||||
@ -305,6 +316,29 @@ public class EReceiptUtil {
|
||||
return currencyCode;
|
||||
}
|
||||
|
||||
private static List<CardTransaction> buildCardTransactions(List<CardSettleData> cardSettleDataList) {
|
||||
List<CardTransaction> list = new ArrayList<>();
|
||||
for (CardSettleData card : cardSettleDataList) {
|
||||
CardTransaction ct = new CardTransaction();
|
||||
ct.setCardType(card.getCardType());
|
||||
ct.setCardNumber(POSUtil.getInstance().getCardNumMasking(card.getCardNum()));
|
||||
ct.setInvoiceNumber(card.getInvoiceNum());
|
||||
ct.setTransactionType(card.getTransType());
|
||||
ct.setAmount(getDecimalAmountStatic(card.getAmount()));
|
||||
ct.setApproveCode(card.getApprovalCode());
|
||||
String dateTime = card.getTransDate() + "T" + card.getTransTime() + "+08:00";
|
||||
ct.setTransactionTime(dateTime);
|
||||
list.add(ct);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private static String getDecimalAmountStatic(long amount) {
|
||||
double realAmount = amount / 100.0;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
return df.format(realAmount);
|
||||
}
|
||||
|
||||
private static List<Transaction> buildTransactions(List<QRSettleData> qrSettleData) {
|
||||
List<Transaction> list = new ArrayList<>();
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -11,8 +11,8 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 41,
|
||||
"versionName": "2.36-uat",
|
||||
"versionCode": 44,
|
||||
"versionName": "2.39-uat",
|
||||
"outputFile": "app-uat-release.apk"
|
||||
}
|
||||
],
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
package com.utsmyanmar.baselib.network.model.e_receipt;
|
||||
|
||||
public class CardTransaction {
|
||||
|
||||
private String cardType;
|
||||
private String cardNumber;
|
||||
private String invoiceNumber;
|
||||
private String transactionType;
|
||||
private String amount;
|
||||
private String approveCode;
|
||||
private String transactionTime;
|
||||
|
||||
public CardTransaction() {}
|
||||
|
||||
public String getCardType() {
|
||||
return cardType;
|
||||
}
|
||||
|
||||
public void setCardType(String cardType) {
|
||||
this.cardType = cardType;
|
||||
}
|
||||
|
||||
public String getCardNumber() {
|
||||
return cardNumber;
|
||||
}
|
||||
|
||||
public void setCardNumber(String cardNumber) {
|
||||
this.cardNumber = cardNumber;
|
||||
}
|
||||
|
||||
public String getInvoiceNumber() {
|
||||
return invoiceNumber;
|
||||
}
|
||||
|
||||
public void setInvoiceNumber(String invoiceNumber) {
|
||||
this.invoiceNumber = invoiceNumber;
|
||||
}
|
||||
|
||||
public String getTransactionType() {
|
||||
return transactionType;
|
||||
}
|
||||
|
||||
public void setTransactionType(String transactionType) {
|
||||
this.transactionType = transactionType;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getApproveCode() {
|
||||
return approveCode;
|
||||
}
|
||||
|
||||
public void setApproveCode(String approveCode) {
|
||||
this.approveCode = approveCode;
|
||||
}
|
||||
|
||||
public String getTransactionTime() {
|
||||
return transactionTime;
|
||||
}
|
||||
|
||||
public void setTransactionTime(String transactionTime) {
|
||||
this.transactionTime = transactionTime;
|
||||
}
|
||||
}
|
||||
@ -43,7 +43,12 @@ public class EReceiptRequest {
|
||||
private String hostId;
|
||||
private String paymentIdentifier;
|
||||
|
||||
private String DE24;
|
||||
private String DE43;
|
||||
private String DE14;
|
||||
|
||||
private List<Transaction> transactions;
|
||||
private List<CardTransaction> cardTransactions;
|
||||
|
||||
public EReceiptRequest() {}
|
||||
|
||||
@ -269,6 +274,18 @@ public class EReceiptRequest {
|
||||
this.cardLabel = cardLabel;
|
||||
}
|
||||
public void setMmqrRef(String mmqrRef){ this.mmqrRef = mmqrRef; }
|
||||
|
||||
public String getDE24() { return DE24; }
|
||||
public void setDE24(String DE24) { this.DE24 = DE24; }
|
||||
|
||||
public String getDE43() { return DE43; }
|
||||
public void setDE43(String DE43) { this.DE43 = DE43; }
|
||||
|
||||
public String getDE14() { return DE14; }
|
||||
public void setDE14(String DE14) { this.DE14 = DE14; }
|
||||
|
||||
public List<CardTransaction> getCardTransactions() { return cardTransactions; }
|
||||
public void setCardTransactions(List<CardTransaction> cardTransactions) { this.cardTransactions = cardTransactions; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,3 +31,6 @@ android.nonTransitiveRClass=true
|
||||
android.enableJetifier=false
|
||||
ERECEIPT_SECRET=y812J21lhha11OS
|
||||
#ERECEIPT_SECRET=8f4df38d1001bcc4620b5c736c66a03eef4653eb3ba31105faa2f2ee294c4a46
|
||||
|
||||
# Enabled parallel sync for Gradle 9.4+
|
||||
org.gradle.tooling.parallel=true
|
||||
|
||||
11
opencode.json
Normal file
11
opencode.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"mcp": {
|
||||
"codebase-memory": {
|
||||
"type": "local",
|
||||
"command": "codebase-memory-mcp",
|
||||
"args": [],
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user