- app released

- createBraintreePaymentToken url fixed
This commit is contained in:
2019-12-08 19:06:51 +03:00
parent 551c095c34
commit b4a1f1b3f1
6 changed files with 46 additions and 40 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -22,8 +22,8 @@ android {
applicationId "ch.pizzaleu.android"
minSdkVersion 16
targetSdkVersion 28
versionCode 5 // play store'daki version --> canlı: 0 - dahili test: 4
versionName "1.04" // play store'daki version --> canlı: 0.00 - dahili test: 1.03
versionCode 7 // play store'daki version --> canlı: 0 - dahili test: 6
versionName "1.06" // play store'daki version --> canlı: 0.00 - dahili test: 1.05
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.03","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":6,"versionName":"1.05","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -48,7 +48,7 @@ public class ApiEndPoints {
public static final String API_CREATE_BRAINTREE_PAYMENT = PREFIX + "checkBrainTreePayment" + SUFFIX + "&token=";
public static final String API_REPEAT_ORDER = PREFIX + "reOrder" + SUFFIX + "&token=";
public static final String API_CHECK_ORDER_PRICE = PREFIX + "checkOrderPrice" + SUFFIX + "&token=";
public static final String API_CREATE_BRAINTREE_PAYMENT_TOKEN = PREFIX + "createBraintreePaymentToken" + SUFFIX + "&token=";
public static final String API_CREATE_BRAINTREE_PAYMENT_TOKEN = PREFIX + "createPaymentToken" + SUFFIX + "&token=";
public static final String API_GET_DATATRANS_INFO = PREFIX + "getDatatransInfo" + SUFFIX + "&token=";
public static final String API_CREATE_DATATRANS_PAYMENT = PREFIX + "checkDatatransPayment" + SUFFIX + "&token=";

View File

@@ -967,46 +967,52 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment implemen
}
@Override
public void paymentProcessStateChanged(PaymentProcessAndroid datatransPaymentProcess) {
switch (datatransPaymentProcess.getState()) {
public void paymentProcessStateChanged(final PaymentProcessAndroid datatransPaymentProcess) {
BaseActivity.currentActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
switch (datatransPaymentProcess.getState()) {
case STARTED:
createOrderActivity.setPaymentLayoutVisibility(true);
break;
case STARTED:
createOrderActivity.setPaymentLayoutVisibility(true);
break;
case NOT_STARTED:
createOrderActivity.setPaymentLayoutVisibility(false);
break;
case NOT_STARTED:
createOrderActivity.setPaymentLayoutVisibility(false);
break;
case COMPLETED:
createOrderActivity.setPaymentLayoutVisibility(false);
String transcationId = datatransPaymentProcess.getTransactionId();
String paymentMethodName = datatransPaymentProcess.getPaymentMethodType().getName();
AliasPaymentMethod aliasPaymentMethod = datatransPaymentProcess.getAliasPaymentMethod();
if (aliasPaymentMethod != null) {
String json = aliasPaymentMethod.toJson();
Log.i("dgyef", "vryf");
// serialize and securely store aliasPaymentMethod for reuse
case COMPLETED:
createOrderActivity.setPaymentLayoutVisibility(false);
String transcationId = datatransPaymentProcess.getTransactionId();
String paymentMethodName = datatransPaymentProcess.getPaymentMethodType().getName();
AliasPaymentMethod aliasPaymentMethod = datatransPaymentProcess.getAliasPaymentMethod();
if (aliasPaymentMethod != null) {
String json = aliasPaymentMethod.toJson();
Log.i("dgyef", "vryf");
// serialize and securely store aliasPaymentMethod for reuse
}
createDatatransPayment(transcationId, paymentMethodName);
DialogHelper.showAlertDialog(BaseActivity.currentActivity, "Your payment successed.\nTransaction Id: " + transcationId);
break;
case CANCELED:
createOrderActivity.setPaymentLayoutVisibility(false);
DialogHelper.showAlertDialog(BaseActivity.currentActivity, paymentCanceledText);
break;
case ERROR:
createOrderActivity.setPaymentLayoutVisibility(false);
Exception e = datatransPaymentProcess.getException();
if (e instanceof BusinessException) {
BusinessException be = (BusinessException)e;
int errorCode = be.getErrorCode();// Datatrans error code if needed
// display some error message
} else {
// unexpected technical exception, either fatal TechnicalException or // javax.net.ssl.SSLException (certificate error)
}
DialogHelper.showAlertDialog(BaseActivity.currentActivity, e.getMessage());
break;
}
createDatatransPayment(transcationId, paymentMethodName);
break;
case CANCELED:
createOrderActivity.setPaymentLayoutVisibility(false);
DialogHelper.showAlertDialog(BaseActivity.currentActivity, paymentCanceledText);
break;
case ERROR:
createOrderActivity.setPaymentLayoutVisibility(false);
Exception e = datatransPaymentProcess.getException();
if (e instanceof BusinessException) {
BusinessException be = (BusinessException)e;
int errorCode = be.getErrorCode();// Datatrans error code if needed
// display some error message
} else {
// unexpected technical exception, either fatal TechnicalException or // javax.net.ssl.SSLException (certificate error)
}
DialogHelper.showAlertDialog(BaseActivity.currentActivity, e.getMessage());
break;
}
}
});
}
private void createBraintreePayment(final DropInResult dropInResult){