checkOrderPrice() added
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -23,8 +23,8 @@ android {
|
|||||||
applicationId "ch.pizzapp.capri"
|
applicationId "ch.pizzapp.capri"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
versionCode 22 // play store'daki version --> canlı: 21 - dahili test: 15
|
versionCode 22 // play store'daki version --> canlı: 21 - dahili test: 22
|
||||||
versionName "2.24" // play store'daki version --> canlı: 2.23 - dahili test: 2.17
|
versionName "2.24" // play store'daki version --> canlı: 2.23 - dahili test: 2.24
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":21,"versionName":"2.23","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":22,"versionName":"2.24","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||||
@@ -48,6 +48,6 @@ public class ApiEndPoints {
|
|||||||
public static final String API_CHECK_COUPON = PREFIX + "checkCoupon" + SUFFIX + "&token=";
|
public static final String API_CHECK_COUPON = PREFIX + "checkCoupon" + SUFFIX + "&token=";
|
||||||
public static final String API_CREATE_PAYMENT = PREFIX + "checkBrainTreePayment" + SUFFIX + "&token=";
|
public static final String API_CREATE_PAYMENT = PREFIX + "checkBrainTreePayment" + SUFFIX + "&token=";
|
||||||
public static final String API_REPEAT_ORDER = PREFIX + "reOrder" + SUFFIX + "&token=";
|
public static final String API_REPEAT_ORDER = PREFIX + "reOrder" + SUFFIX + "&token=";
|
||||||
public static final String API_CHECK_BASKET_BY_MINIMUM_PRICE = PREFIX + "checkBasketByMinimumPrice" + SUFFIX + "&token=";
|
public static final String API_CHECK_ORDER_PRICE = PREFIX + "checkOrderPrice" + SUFFIX + "&token=";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,8 +226,8 @@ public interface ApiInterface {
|
|||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST
|
@POST
|
||||||
Call<ResponseObject<Boolean>> checkBasketByMinimumPriceOfStore(@Url String url,
|
Call<ResponseObject> checkOrderPrice(@Url String url,
|
||||||
@FieldMap HashMap<String, Object> body);
|
@FieldMap HashMap<String, Object> body);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
createOrderActivity.onPreviousClicked(FRAGMENT_NAME);
|
createOrderActivity.onPreviousClicked(FRAGMENT_NAME);
|
||||||
break;
|
break;
|
||||||
case R.id.nextTextView:
|
case R.id.nextTextView:
|
||||||
checkBasketByMinimumPriceOfStore();
|
checkOrderPrice();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,7 +186,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
orderProductsRecyclerView.setAdapter(productOnOrderSummaryRecyclerAdapter);
|
orderProductsRecyclerView.setAdapter(productOnOrderSummaryRecyclerAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBasketByMinimumPriceOfStore(){
|
private void checkOrderPrice(){
|
||||||
|
|
||||||
DialogHelper.showLoadingDialog();
|
DialogHelper.showLoadingDialog();
|
||||||
|
|
||||||
@@ -204,11 +204,11 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
params.put("coupon", SessionHelper.getSelectedCoupon().getCode());
|
params.put("coupon", SessionHelper.getSelectedCoupon().getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
Call<ResponseObject<Boolean>> call = ApiService.apiInterface.checkBasketByMinimumPriceOfStore(
|
Call<ResponseObject> call = ApiService.apiInterface.checkOrderPrice(
|
||||||
"/" + SessionHelper.getSelectedStore().getStoreName() + ApiEndPoints.API_CHECK_BASKET_BY_MINIMUM_PRICE + SessionHelper.getCustomerToken().getToken(), params);
|
"/" + SessionHelper.getSelectedStore().getStoreName() + ApiEndPoints.API_CHECK_ORDER_PRICE + SessionHelper.getCustomerToken().getToken(), params);
|
||||||
call.enqueue(new Callback<ResponseObject<Boolean>>() {
|
call.enqueue(new Callback<ResponseObject>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ResponseObject<Boolean>> call, Response<ResponseObject<Boolean>> response) {
|
public void onResponse(Call<ResponseObject> call, Response<ResponseObject> response) {
|
||||||
if(response.isSuccessful() && response.body().isSuccess()){
|
if(response.isSuccessful() && response.body().isSuccess()){
|
||||||
checkDeliveryTime();
|
checkDeliveryTime();
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ResponseObject<Boolean>> call, Throwable t) {
|
public void onFailure(Call<ResponseObject> call, Throwable t) {
|
||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
DialogHelper.showFailedDialog();
|
DialogHelper.showFailedDialog();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user