slip font change

This commit is contained in:
MooN 2025-12-12 02:07:31 +06:30
parent a47137f624
commit d5bef92cff
10 changed files with 18 additions and 8 deletions

View File

@ -113,7 +113,7 @@ public class HostConfigFragment extends DataBindingFragment {
return; return;
} }
printer.setGray(GrayLevelEnum.LEVEL_2); printer.setGray(GrayLevelEnum.LEVEL_2);
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_regular); Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_bold);
printer.setTypeface(typeface); printer.setTypeface(typeface);
SystemParamsOperation sp = SystemParamsOperation.getInstance(); SystemParamsOperation sp = SystemParamsOperation.getInstance();

Binary file not shown.

View File

@ -289,8 +289,8 @@ public class NetworkModule {
tmsAddress = getTMSUrlFromNative(); tmsAddress = getTMSUrlFromNative();
} }
String baseUrl = tmsAddress.trim() + "/api/v1/"; String baseUrl = tmsAddress.trim() + "/api/v1/"; //for on prim
// String baseUrl = tmsAddress.trim() + "/"; // String baseUrl = tmsAddress.trim() + "/"; //for uat
final Gson gson = final Gson gson =
new GsonBuilder().create(); new GsonBuilder().create();
@ -487,8 +487,8 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
OkHttpClient client = new OkHttpClient.Builder() OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(interceptor) .addInterceptor(interceptor)
.build(); .build();
String baseUrl = "http://receipt-nest.utsmyanmar.com/"; String eReceiptAddress = SystemParamsOperation.getInstance().getEreceiptAddress();
// String baseUrl = "https://api-tms-uat.kbzbank.com:8443/receipt/"; String baseUrl = eReceiptAddress + "/";
return new Retrofit.Builder() return new Retrofit.Builder()
.baseUrl(baseUrl) .baseUrl(baseUrl)

View File

@ -40,6 +40,7 @@ import com.utsmyanmar.baselib.network.model.KPayRefund;
import com.utsmyanmar.baselib.repo.local.PayWaveRepository; import com.utsmyanmar.baselib.repo.local.PayWaveRepository;
import com.utsmyanmar.baselib.util.EReceiptHelper; import com.utsmyanmar.baselib.util.EReceiptHelper;
import com.utsmyanmar.paylibs.model.PayDetail; import com.utsmyanmar.paylibs.model.PayDetail;
import com.utsmyanmar.paylibs.utils.LogUtil;
import java.util.List; import java.util.List;
@ -113,6 +114,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);
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;

View File

@ -29,4 +29,5 @@ android.useAndroidX=true
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
# Disable Android Studio's Jetifier to avoid conflicts # Disable Android Studio's Jetifier to avoid conflicts
android.enableJetifier=false android.enableJetifier=false
ERECEIPT_SECRET=y812J21lhha11OS #ERECEIPT_SECRET=y812J21lhha11OS
ERECEIPT_SECRET=8f4df38d1001bcc4620b5c736c66a03eef4653eb3ba31105faa2f2ee294c4a46

Binary file not shown.

View File

@ -117,7 +117,7 @@ public abstract class BaseXPrint {
Resources resources = PayLibsUtils.getInstance().context.getResources(); Resources resources = PayLibsUtils.getInstance().context.getResources();
// Typeface typeface = ResourcesCompat.getFont(PayLibsUtils.getInstance().context, R.font.consolas); // Typeface typeface = ResourcesCompat.getFont(PayLibsUtils.getInstance().context, R.font.consolas);
// printer.setTypeface(typeface); // printer.setTypeface(typeface);
printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/ubuntu_mono.ttf")); printer.setTypeface(Typeface.createFromAsset(PayLibsUtils.getInstance().context.getAssets(), "fonts/consolab.ttf"));
printer.setGray(getGrayLevel()); printer.setGray(getGrayLevel());
} }

View File

@ -1649,4 +1649,9 @@ public class SystemParamsOperation {
SystemParamsSettings params = getSystemParamsSettings(); SystemParamsSettings params = getSystemParamsSettings();
return params.getCertificatePassword(); return params.getCertificatePassword();
} }
public String getEreceiptAddress() {
SystemParamsSettings params = getSystemParamsSettings();
return params.getEreceiptAddress();
}
} }

View File

@ -43,8 +43,10 @@ public class SystemParamsSettings implements Serializable {
// private String tmsAddress = "https://tms.smile-mm.com"; // private String tmsAddress = "https://tms.smile-mm.com";
// private String tmsAddress = "http://128.199.170.203"; // private String tmsAddress = "http://128.199.170.203";
private String tmsAddress = "http://sirius-nest.utsmyanmar.com"; private String tmsAddress = "http://sirius-nest.utsmyanmar.com";
// private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius"; // private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius"; //for uat
private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com"; private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com";
// String baseUrl = "http://receipt-nest.utsmyanmar.com/"; //for uat
private String terminalCapability = "E0E8C8"; private String terminalCapability = "E0E8C8";

Binary file not shown.