Compare commits
No commits in common. "2c98727f2efa4e5ba98bff722367c42157fc7288" and "67fc55800a1822d8eef3fb5bf79bb4e74b880546" have entirely different histories.
2c98727f2e
...
67fc55800a
@ -160,7 +160,7 @@ public class MainActivity extends AppCompatActivity implements
|
|||||||
SystemParamsOperation.getInstance().setTmsAddress("https://api-tms-uat.kbzbank.com:8443/sirius");
|
SystemParamsOperation.getInstance().setTmsAddress("https://api-tms-uat.kbzbank.com:8443/sirius");
|
||||||
// SystemParamsOperation.getInstance().setTmsAddress("https://sirius-nest.utsmyanmar.com");
|
// SystemParamsOperation.getInstance().setTmsAddress("https://sirius-nest.utsmyanmar.com");
|
||||||
SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms-uat.kbzbank.com:8443/receipt");
|
SystemParamsOperation.getInstance().setEReceiptAddress("https://api-tms-uat.kbzbank.com:8443/receipt");
|
||||||
// SystemParamsOperation.getInstance().setEReceiptAddress("https://receipt-nest.utsmyanmar.com");
|
// SystemParamsOperation.getInstance().setEReceiptAddress("http://receipt-nest.utsmyanmar.com");
|
||||||
|
|
||||||
PinPad pinPad = MyApplication.getInstance().deviceEngine.getPinPad();
|
PinPad pinPad = MyApplication.getInstance().deviceEngine.getPinPad();
|
||||||
byte[] encryptedPIK = SystemParamsOperation.getInstance().getPIK();
|
byte[] encryptedPIK = SystemParamsOperation.getInstance().getPIK();
|
||||||
|
|||||||
@ -28,7 +28,6 @@ import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
|||||||
public class PrintReceiptFragment extends DataBindingFragment implements DataBindingFragment.BackPressCallback {
|
public class PrintReceiptFragment extends DataBindingFragment implements DataBindingFragment.BackPressCallback {
|
||||||
private SharedViewModel sharedViewModel;
|
private SharedViewModel sharedViewModel;
|
||||||
private static final String TAG = PrintReceiptFragment.class.getSimpleName();
|
private static final String TAG = PrintReceiptFragment.class.getSimpleName();
|
||||||
private boolean printerDisabled = SystemParamsOperation.getInstance().getPrinterDisabled();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int currentId() {
|
protected int currentId() {
|
||||||
@ -49,6 +48,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
@Override
|
@Override
|
||||||
protected void initViewModel() {
|
protected void initViewModel() {
|
||||||
sharedViewModel = getFragmentScopeViewModel(SharedViewModel.class);
|
sharedViewModel = getFragmentScopeViewModel(SharedViewModel.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -76,7 +76,6 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
|
setToolBarTitleWithoutBackIcon(getResourceString(R.string.title_print_receipt));
|
||||||
|
|
||||||
sharedViewModel.printReceiptButtons.setValue(0);
|
sharedViewModel.printReceiptButtons.setValue(0);
|
||||||
sharedViewModel.printerDisabled.setValue(printerDisabled);
|
|
||||||
|
|
||||||
|
|
||||||
PayDetail payDetail = sharedViewModel.payDetail.getValue();
|
PayDetail payDetail = sharedViewModel.payDetail.getValue();
|
||||||
@ -123,12 +122,7 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
sharedViewModel.setPrintStatus(PrintStatus.NOT_PRINT);
|
sharedViewModel.setPrintStatus(PrintStatus.NOT_PRINT);
|
||||||
|
|
||||||
if(printerDisabled){
|
|
||||||
sharedViewModel.postPrintReceiptMsg("Receipt is saved as E-receipt!");
|
|
||||||
}else{
|
|
||||||
sharedViewModel.postPrintReceiptMsg("Print Receipt for Merchant?");
|
sharedViewModel.postPrintReceiptMsg("Print Receipt for Merchant?");
|
||||||
}
|
|
||||||
|
|
||||||
observePrintProcess();
|
observePrintProcess();
|
||||||
|
|
||||||
@ -284,10 +278,6 @@ public class PrintReceiptFragment extends DataBindingFragment implements DataBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onContinue(){
|
|
||||||
isCardInside();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void alertPaperRoll(String title, String message) {
|
private void alertPaperRoll(String title, String message) {
|
||||||
|
|||||||
@ -115,7 +115,6 @@ public class SharedViewModel extends ViewModel {
|
|||||||
public SingleLiveEvent<HostType> hostType = new SingleLiveEvent<>();
|
public SingleLiveEvent<HostType> hostType = new SingleLiveEvent<>();
|
||||||
|
|
||||||
public MutableLiveData<Integer> printReceiptButtons = new MutableLiveData<>(0);
|
public MutableLiveData<Integer> printReceiptButtons = new MutableLiveData<>(0);
|
||||||
public SingleLiveEvent<Boolean> printerDisabled = new SingleLiveEvent<>();
|
|
||||||
|
|
||||||
public SingleLiveEvent<String> printReceiptMsg = new SingleLiveEvent<>();
|
public SingleLiveEvent<String> printReceiptMsg = new SingleLiveEvent<>();
|
||||||
|
|
||||||
|
|||||||
@ -68,60 +68,8 @@ public class DashboardTransFragment extends DataBindingFragment {
|
|||||||
initData();
|
initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void initData() {
|
|
||||||
// TMSUtil.getInstance().checkFeaturesList(requireActivity(),featuresList);
|
|
||||||
// mainAdapter.notifyDataSetChanged();
|
|
||||||
// }
|
|
||||||
|
|
||||||
Boolean isRefundEnabled = SystemParamsOperation.getInstance().getRefundStatus();
|
|
||||||
Boolean isVoidEnabled = SystemParamsOperation.getInstance().getVoidStatus();
|
|
||||||
Boolean isPreAuthEnabled = SystemParamsOperation.getInstance().getPreAuthStatus();
|
|
||||||
Boolean isCashAdvanceEnabled = SystemParamsOperation.getInstance().getCashAdvanceStatus();
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
featuresList.clear();
|
TMSUtil.getInstance().checkFeaturesList(requireActivity(),featuresList);
|
||||||
|
|
||||||
ArrayList<Features> allFeatures = new ArrayList<>();
|
|
||||||
TMSUtil.getInstance().checkFeaturesList(requireActivity(), allFeatures);
|
|
||||||
|
|
||||||
for (Features feature : allFeatures) {
|
|
||||||
|
|
||||||
switch (feature.getFeaturesType()) {
|
|
||||||
|
|
||||||
case REFUND:
|
|
||||||
if (isRefundEnabled) {
|
|
||||||
featuresList.add(feature);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case VOID:
|
|
||||||
if (isVoidEnabled) {
|
|
||||||
featuresList.add(feature);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PRE_AUTH_SALE:
|
|
||||||
|
|
||||||
case PRE_AUTH_COMPLETE_VOID:
|
|
||||||
|
|
||||||
case PRE_AUTH_VOID:
|
|
||||||
|
|
||||||
case PRE_AUTH_COMPLETE:
|
|
||||||
if (isPreAuthEnabled) {
|
|
||||||
featuresList.add(feature);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CASH_ADVANCE:
|
|
||||||
if(isCashAdvanceEnabled){
|
|
||||||
featuresList.add(feature);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
featuresList.add(feature);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mainAdapter.notifyDataSetChanged();
|
mainAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +131,7 @@ public class DashboardTransFragment extends DataBindingFragment {
|
|||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
Boolean demoStatus = SystemParamsOperation.getInstance().getDemoStatus();
|
Boolean demoStatus = SystemParamsOperation.getInstance().getDemoStatus();
|
||||||
|
LogUtil.d("KMK", "demo => " + demoStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClickEvent {
|
public class ClickEvent {
|
||||||
|
|||||||
@ -42,8 +42,8 @@ public class RefundCertificateManager {
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
// String downloadBase = tmsAddress.trim() + "/api/v1/file/download?filePath="; //local
|
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="; // uat and prod
|
||||||
|
|
||||||
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
|
String certUrl = SystemParamsOperation.getInstance().getCertificateUrl();
|
||||||
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();
|
String clientCertUrl = SystemParamsOperation.getInstance().getCertificateClientUrl();
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import com.utsmm.kbz.databinding.FragmentHostConfigBinding;
|
|||||||
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
||||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
|
||||||
|
|
||||||
|
|
||||||
public class HostConfigFragment extends DataBindingFragment {
|
public class HostConfigFragment extends DataBindingFragment {
|
||||||
|
|||||||
@ -647,9 +647,6 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
else if(TextUtils.equals(name,"bin_list")) {
|
else if(TextUtils.equals(name,"bin_list")) {
|
||||||
SystemParamsOperation.getInstance().setBinValue(data);
|
SystemParamsOperation.getInstance().setBinValue(data);
|
||||||
}
|
}
|
||||||
else if(TextUtils.equals(name, "printer_disabled")){
|
|
||||||
SystemParamsOperation.getInstance().setPrinterDisabled(parseBoolean(data));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
||||||
|
|||||||
@ -10,9 +10,6 @@
|
|||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="com.utsmm.kbz.ui.settings.HostConfigViewModel" />
|
type="com.utsmm.kbz.ui.settings.HostConfigViewModel" />
|
||||||
<variable
|
|
||||||
name="sharedViewModel"
|
|
||||||
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
|
|
||||||
<variable
|
<variable
|
||||||
name="click"
|
name="click"
|
||||||
type="com.utsmm.kbz.ui.settings.HostConfigFragment.ClickHandler" />
|
type="com.utsmm.kbz.ui.settings.HostConfigFragment.ClickHandler" />
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="com.utsmyanmar.paylibs.utils.POSUtil" />
|
<import type="com.utsmyanmar.paylibs.utils.POSUtil" />
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
<variable
|
||||||
name="sharedViewModel"
|
name="sharedViewModel"
|
||||||
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
|
type="com.utsmm.kbz.ui.core_viewmodel.SharedViewModel" />
|
||||||
@ -297,6 +296,9 @@
|
|||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -381,53 +383,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:visibility="@{sharedViewModel.printerDisabled ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<!-- Confirm Button -->
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="4dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/colorPrimary"
|
|
||||||
android:gravity="center"
|
|
||||||
android:onClick="@{()->click.onContinue()}"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="14dp">
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="@font/rubik_medium"
|
|
||||||
android:text="@string/txt_continue"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="15sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -616,6 +616,5 @@
|
|||||||
<string name="txt_no_qr_transactions_to_settle">No QR transactions to settle</string>
|
<string name="txt_no_qr_transactions_to_settle">No QR transactions to settle</string>
|
||||||
<string name="txt_settle_qr_transactions">Confirm</string>
|
<string name="txt_settle_qr_transactions">Confirm</string>
|
||||||
<string name="txt_search_by_trace">Search By Trace No</string>
|
<string name="txt_search_by_trace">Search By Trace No</string>
|
||||||
<string name="txt_continue">Continue</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@ -6,7 +6,6 @@
|
|||||||
<domain includeSubdomains="true">128.199.170.203</domain>
|
<domain includeSubdomains="true">128.199.170.203</domain>
|
||||||
<domain includeSubdomains="true">152.42.199.193</domain>
|
<domain includeSubdomains="true">152.42.199.193</domain>
|
||||||
<domain includeSubdomains="true">api.kbzpay.com</domain>
|
<domain includeSubdomains="true">api.kbzpay.com</domain>
|
||||||
<domain includeSubdomains="true">api-uat.kbzpay.com</domain>
|
|
||||||
<domain includeSubdomains="true">sirius-nest.utsmyanmar.com</domain>
|
<domain includeSubdomains="true">sirius-nest.utsmyanmar.com</domain>
|
||||||
</domain-config>
|
</domain-config>
|
||||||
|
|
||||||
|
|||||||
@ -254,7 +254,7 @@ public class NetworkModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (baseUrl.isEmpty()) {
|
if (baseUrl.isEmpty()) {
|
||||||
baseUrl = "http://api-uat.kbzpay.com/payment/gateway/uat/";
|
baseUrl = "http://api.kbzpay.com/payment/gateway/uat/";
|
||||||
}
|
}
|
||||||
return new Retrofit.Builder()
|
return new Retrofit.Builder()
|
||||||
.baseUrl(baseUrl)
|
.baseUrl(baseUrl)
|
||||||
@ -302,6 +302,88 @@ public class NetworkModule {
|
|||||||
.create(SiriusApiService.class);
|
.create(SiriusApiService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @Provides
|
||||||
|
// @Singleton
|
||||||
|
// @KPayRefundRetrofit
|
||||||
|
// public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
||||||
|
// char[] password = "test123".toCharArray();
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
//
|
||||||
|
// if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
|
||||||
|
// Security.addProvider(new BouncyCastleProvider());
|
||||||
|
// }
|
||||||
|
// // Client keystore
|
||||||
|
// KeyStore clientKeyStore = KeyStore.getInstance("PKCS12",new BouncyCastleProvider());
|
||||||
|
// InputStream clientStream = context.getResources().openRawResource(R.raw.client);
|
||||||
|
// clientKeyStore.load(clientStream, password);
|
||||||
|
// clientStream.close();
|
||||||
|
//
|
||||||
|
// KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
|
||||||
|
// kmf.init(clientKeyStore, password);
|
||||||
|
// KeyManager[] keyManagers = kmf.getKeyManagers();
|
||||||
|
//
|
||||||
|
// InputStream caInput = context.getResources().openRawResource(R.raw.certi);
|
||||||
|
// CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||||
|
// Certificate ca = cf.generateCertificate(caInput);
|
||||||
|
//
|
||||||
|
// KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||||
|
// keyStore.load(null, null);
|
||||||
|
// keyStore.setCertificateEntry("ca", ca);
|
||||||
|
//
|
||||||
|
// TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
||||||
|
// tmf.init(keyStore);
|
||||||
|
// TrustManager[] trustManagers = tmf.getTrustManagers();
|
||||||
|
//
|
||||||
|
// X509TrustManager x509TrustManager = null;
|
||||||
|
// for (TrustManager tm : trustManagers) {
|
||||||
|
// if (tm instanceof X509TrustManager) {
|
||||||
|
// x509TrustManager = (X509TrustManager) tm;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||||
|
// sslContext.init(kmf.getKeyManagers(), new TrustManager[]{x509TrustManager}, null);
|
||||||
|
//
|
||||||
|
// HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
|
||||||
|
// loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||||
|
//
|
||||||
|
// OkHttpClient okHttp = new OkHttpClient.Builder()
|
||||||
|
// .sslSocketFactory(sslContext.getSocketFactory(), x509TrustManager)
|
||||||
|
// .addInterceptor(loggingInterceptor)
|
||||||
|
// .hostnameVerifier(new HostnameVerifier() {
|
||||||
|
// @Override
|
||||||
|
// public boolean verify(String hostname, SSLSession session) {
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .build();
|
||||||
|
//
|
||||||
|
// return new Retrofit.Builder()
|
||||||
|
// .baseUrl(Refund_Base_Url)
|
||||||
|
// .client(okHttp)
|
||||||
|
// .addCallAdapterFactory(RxJava3CallAdapterFactory.create())
|
||||||
|
// .addConverterFactory(GsonConverterFactory.create())
|
||||||
|
// .build();
|
||||||
|
//
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
//
|
||||||
|
// OkHttpClient okHttp = new OkHttpClient();
|
||||||
|
// return new Retrofit.Builder()
|
||||||
|
// .baseUrl(Refund_Base_Url)
|
||||||
|
// .client(okHttp)
|
||||||
|
// .addConverterFactory(GsonConverterFactory.create())
|
||||||
|
// .build();
|
||||||
|
//
|
||||||
|
//// throw new RuntimeException("Failed to create Retrofit instance", e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
//@Reusable
|
//@Reusable
|
||||||
//@KPayRefundRetrofit
|
//@KPayRefundRetrofit
|
||||||
@Provides
|
@Provides
|
||||||
@ -310,8 +392,10 @@ public Retrofit provideKPayRefundRetrofit(@ApplicationContext Context context) {
|
|||||||
|
|
||||||
// char[] password = "test123".toCharArray();
|
// char[] password = "test123".toCharArray();
|
||||||
|
|
||||||
// String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
|
// public static String Refund_Base_Url = "https://api.kbzpay.com:18008/payment/gateway/uat/";
|
||||||
String refundBaseUrl = "https://api-uat.kbzpay.com:18008/payment/gateway/uat/";
|
|
||||||
|
|
||||||
|
String refundBaseUrl = "https://api.kbzpay.com:8008/payment/gateway/";
|
||||||
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
|
// String IpAddress = SystemParamsOperation.getInstance().getSecHostIpAddress();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,12 +24,12 @@ public interface KPayApiService {
|
|||||||
|
|
||||||
|
|
||||||
//this accept "url" bez this api start with https and other are http in uat
|
//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 2 is for production
|
|
||||||
// @POST("closeorder")
|
// @POST("closeorder")
|
||||||
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
// Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
||||||
|
|
||||||
|
|
||||||
|
//this 2 is for production
|
||||||
|
@POST("closeorder")
|
||||||
|
Observable<KPayQRRequest.CloseOrderResponse> closeOrder(@Url String url, @Body KPayQRRequest.CloseOrderRequest closeOrderRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -86,7 +86,7 @@ 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.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 local
|
||||||
// return kPayApiService.closeOrder(request); //this is for prod
|
// return kPayApiService.closeOrder(request); //this is for prod
|
||||||
}
|
}
|
||||||
|
|||||||
@ -877,9 +877,8 @@ public abstract class BaseXPrint {
|
|||||||
printString("Status :" + pay.getStatus());
|
printString("Status :" + pay.getStatus());
|
||||||
printString("Date :" + pay.getDate());
|
printString("Date :" + pay.getDate());
|
||||||
printString("Time :" + pay.getTime());
|
printString("Time :" + pay.getTime());
|
||||||
printString("Amount : MMK "
|
|
||||||
+ (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value ? "-" : "")
|
printString("Amount :" + "MMK " + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(pay.getAmount()));
|
||||||
+ PrintUtils.getInstance().getSeparatorOnlyNumberFormat(pay.getAmount()));
|
|
||||||
|
|
||||||
if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
if (pay.getTransactionType() == TransactionsType.MMQR_REFUND.value) {
|
||||||
refundTotal += pay.getAmount();
|
refundTotal += pay.getAmount();
|
||||||
@ -893,7 +892,7 @@ public abstract class BaseXPrint {
|
|||||||
|
|
||||||
dashBreak();
|
dashBreak();
|
||||||
// print2ColumnsString("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal));
|
// print2ColumnsString("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal));
|
||||||
printer.appendPrnStr("Refund Total:MMK", "- " + PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + " ", fontNormal, false);
|
printer.appendPrnStr("Refund Total:MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(refundTotal) + " ", fontNormal, false);
|
||||||
dashBreak();
|
dashBreak();
|
||||||
// print2ColumnsString("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount));
|
// print2ColumnsString("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount));
|
||||||
printer.appendPrnStr("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount) + " ", fontNormal, false);
|
printer.appendPrnStr("Sale Total :MMK", PrintUtils.getInstance().getSeparatorOnlyNumberFormat(totalAmount) + " ", fontNormal, false);
|
||||||
|
|||||||
@ -1750,15 +1750,4 @@ public class SystemParamsOperation {
|
|||||||
paramsSettings.setCertificateClientUrl(url);
|
paramsSettings.setCertificateClientUrl(url);
|
||||||
saveSystemParamsSettings(paramsSettings);
|
saveSystemParamsSettings(paramsSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrinterDisabled(boolean printerDisabled) {
|
|
||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
|
||||||
paramsSettings.setPrinterDisabled(printerDisabled);
|
|
||||||
saveSystemParamsSettings(paramsSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getPrinterDisabled() {
|
|
||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
|
||||||
return paramsSettings.getPrinterDisabled();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -42,10 +42,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 = "https://sirius-nest.utsmyanmar.com";
|
private String tmsAddress = "https://sirius-nest.utsmyanmar.com";
|
||||||
private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius"; //for uat
|
// private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius"; //for uat
|
||||||
// private String ereceiptAddress = "https://receipt-nest.utsmyanmar.com"; //for on prime
|
private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com"; //for on prime
|
||||||
private String ereceiptAddress = "https://api-tms-uat.kbzbank.com:8443/receipt"; //for uat
|
// private String ereceiptAddress = "https://api-tms-uat.kbzbank.com:8443/receipt"; //for uat
|
||||||
|
|
||||||
private String binValues = "";
|
private String binValues = "";
|
||||||
|
|
||||||
@ -260,7 +260,6 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
private String terminalIdForEreceipt = "";
|
private String terminalIdForEreceipt = "";
|
||||||
private String certificateUrl = "";
|
private String certificateUrl = "";
|
||||||
private String certificateClientUrl = "";
|
private String certificateClientUrl = "";
|
||||||
private boolean printerDisabled = false;
|
|
||||||
|
|
||||||
public boolean isQrPartialRefundEnable(){
|
public boolean isQrPartialRefundEnable(){
|
||||||
return qrPartialRefundEnable;
|
return qrPartialRefundEnable;
|
||||||
@ -1068,18 +1067,6 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.certificateClientUrl = url;
|
this.certificateClientUrl = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrinterDisabled() {
|
|
||||||
return printerDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrinterDisabled(boolean printerDisabled) {
|
|
||||||
this.printerDisabled = printerDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getPrinterDisabled() {
|
|
||||||
return printerDisabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* // 流水号起始
|
/* // 流水号起始
|
||||||
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
||||||
// 批次号起始
|
// 批次号起始
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user