@ -1,625 +0,0 @@ |
|||||||
package com.cst.im30.activity; |
|
||||||
|
|
||||||
import android.app.Activity; |
|
||||||
import android.app.AlertDialog; |
|
||||||
import android.content.Context; |
|
||||||
import android.content.Intent; |
|
||||||
import android.graphics.Color; |
|
||||||
import android.graphics.drawable.ColorDrawable; |
|
||||||
import android.os.Bundle; |
|
||||||
import android.os.Handler; |
|
||||||
import android.os.Looper; |
|
||||||
import android.view.LayoutInflater; |
|
||||||
import android.view.View; |
|
||||||
import android.widget.Button; |
|
||||||
import android.widget.ImageView; |
|
||||||
import android.widget.TextView; |
|
||||||
import android.widget.Toast; |
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity; |
|
||||||
|
|
||||||
import com.bumptech.glide.Glide; |
|
||||||
import com.cst.im30.R; |
|
||||||
import com.cst.im30.entity.Transaction; |
|
||||||
import com.cst.im30.api.RetrofitAPICollection; |
|
||||||
import com.cst.im30.api.RetrofitClient; |
|
||||||
|
|
||||||
import org.json.JSONException; |
|
||||||
import org.json.JSONObject; |
|
||||||
|
|
||||||
import java.math.BigInteger; |
|
||||||
import java.security.MessageDigest; |
|
||||||
import java.security.NoSuchAlgorithmException; |
|
||||||
|
|
||||||
import retrofit2.Call; |
|
||||||
import retrofit2.Callback; |
|
||||||
import retrofit2.Response; |
|
||||||
import retrofit2.Retrofit; |
|
||||||
import retrofit2.converter.gson.GsonConverterFactory; |
|
||||||
|
|
||||||
public class StatusActivity extends AppCompatActivity { |
|
||||||
|
|
||||||
//Set value to get temp value-RefNum
|
|
||||||
private static String vRefNum; |
|
||||||
//Set value to get temp value-Status
|
|
||||||
private static String vStatus; |
|
||||||
//Set value to get temp value-Amount
|
|
||||||
private static String vAmount; |
|
||||||
private Transaction transaction; |
|
||||||
private Button buttonDonationSuccess, buttonRetry, buttonNoRetry; |
|
||||||
//private Transaction transaction;
|
|
||||||
private TextView textStatus, textInfo, textAmount; |
|
||||||
private ImageView imageStatus; |
|
||||||
private String status, responseCode, responseDesc, referenceNum, amountTransaction; |
|
||||||
|
|
||||||
public static String getRefNum() { |
|
||||||
return vRefNum; |
|
||||||
} |
|
||||||
|
|
||||||
public static String getStatus() { |
|
||||||
return vStatus; |
|
||||||
} |
|
||||||
|
|
||||||
public static String getAmount() { |
|
||||||
return vAmount; |
|
||||||
} |
|
||||||
|
|
||||||
public static void showFinishMessage(final Context context, String title, String message) { |
|
||||||
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); |
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
|
||||||
View dialogView = inflater.inflate(R.layout.pop_up_message_no_option, null); |
|
||||||
|
|
||||||
TextView textTitle = dialogView.findViewById(R.id.text_title_pop_up_message_no_option); |
|
||||||
TextView textMessage = dialogView.findViewById(R.id.text_message_pop_up_message_no_option); |
|
||||||
Button buttonOk = dialogView.findViewById(R.id.button_ok_pop_up_message_no_option); |
|
||||||
|
|
||||||
textTitle.setText(title); |
|
||||||
textMessage.setText(message); |
|
||||||
|
|
||||||
dialogBuilder.setCancelable(false); |
|
||||||
dialogBuilder.setView(dialogView); |
|
||||||
|
|
||||||
final AlertDialog alertDialogFinishMessage = dialogBuilder.create(); |
|
||||||
alertDialogFinishMessage.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); |
|
||||||
alertDialogFinishMessage.show(); |
|
||||||
|
|
||||||
buttonOk.setOnClickListener(new View.OnClickListener() { |
|
||||||
@Override |
|
||||||
public void onClick(View v) { |
|
||||||
alertDialogFinishMessage.dismiss(); |
|
||||||
((Activity) context).finish(); |
|
||||||
|
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
private static String encrytThisString(String input) { |
|
||||||
|
|
||||||
try { |
|
||||||
// getInstance() method is called with algorithm SHA-512
|
|
||||||
MessageDigest md = MessageDigest.getInstance("SHA-512"); |
|
||||||
|
|
||||||
// digest() method is called
|
|
||||||
// to calculate message digest of the input string
|
|
||||||
// returned as array of byte
|
|
||||||
byte[] messageDigest = md.digest(input.getBytes()); |
|
||||||
|
|
||||||
// Convert byte array into signum representation
|
|
||||||
BigInteger no = new BigInteger(1, messageDigest); |
|
||||||
|
|
||||||
// Convert message digest into hex value
|
|
||||||
String hashtext = no.toString(16); |
|
||||||
|
|
||||||
// Add preceding 0s to make it 32 bit
|
|
||||||
while (hashtext.length() < 32) { |
|
||||||
hashtext = "0" + hashtext; |
|
||||||
} |
|
||||||
|
|
||||||
// return the HashText
|
|
||||||
return hashtext; |
|
||||||
} // For specifying wrong message digest algorithms
|
|
||||||
catch (NoSuchAlgorithmException e) { |
|
||||||
throw new RuntimeException(e); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
protected void onCreate(Bundle savedInstanceState) { |
|
||||||
super.onCreate(savedInstanceState); |
|
||||||
setContentView(R.layout.activity_status); |
|
||||||
|
|
||||||
/*try { |
|
||||||
transaction = (Transaction) getIntent().getSerializableExtra("transaction"); |
|
||||||
} catch (Exception e) { |
|
||||||
//Bugsnag.notify(e);
|
|
||||||
}*/ |
|
||||||
|
|
||||||
buttonDonationSuccess = findViewById(R.id.button_ok_donation_sta); |
|
||||||
buttonRetry = findViewById(R.id.button_pay_again_sta); |
|
||||||
buttonNoRetry = findViewById(R.id.button_no_pay_again_sta); |
|
||||||
textStatus = findViewById(R.id.text_status_sta); |
|
||||||
textInfo = findViewById(R.id.text_info_sta); |
|
||||||
textAmount = findViewById(R.id.text_info_amount_sta); |
|
||||||
imageStatus = findViewById(R.id.image_status_sta); |
|
||||||
|
|
||||||
/*//Get data from StatusActivty - refNum & amount only
|
|
||||||
String referenceNumber = ResponseActivity.getRefNum(); |
|
||||||
//get and set again
|
|
||||||
vRefNum = referenceNumber; |
|
||||||
String statusTemp = ResponseActivity.getStatus(); |
|
||||||
vStatus = statusTemp; |
|
||||||
String amount = ResponseActivity.getAmount(); |
|
||||||
vAmount = amount;*/ |
|
||||||
|
|
||||||
|
|
||||||
//Get status from Response Screen
|
|
||||||
Intent intentRefNum = getIntent(); |
|
||||||
Bundle refNumGet = intentRefNum.getExtras(); |
|
||||||
if (refNumGet != null) { |
|
||||||
String refNumSet = (String) refNumGet.get("referenceNumTransaction"); |
|
||||||
referenceNum = refNumSet; |
|
||||||
} |
|
||||||
|
|
||||||
/*Intent intentSign = getIntent(); |
|
||||||
Bundle signGet = intentSign.getExtras(); |
|
||||||
String */ |
|
||||||
|
|
||||||
Intent intentStatus = getIntent(); |
|
||||||
Bundle statusGet = intentStatus.getExtras(); |
|
||||||
if (statusGet != null) { |
|
||||||
String statusSet = (String) statusGet.get("statusTransaction"); |
|
||||||
status = statusSet; |
|
||||||
} |
|
||||||
|
|
||||||
Intent intentAmount = getIntent(); |
|
||||||
Bundle amountGet = intentAmount.getExtras(); |
|
||||||
if (amountGet != null) { |
|
||||||
String amountSet = (String) amountGet.get("amountTransaction"); |
|
||||||
amountTransaction = amountSet; |
|
||||||
} |
|
||||||
|
|
||||||
//Get HLB response from Response Activity
|
|
||||||
Intent intentResponse = getIntent(); |
|
||||||
Bundle extra = intentResponse.getExtras(); |
|
||||||
String payRespCodeTransaction = extra.getString("payRespCodeTransaction"); |
|
||||||
//transaction.setResponseCode(payRespCodeTransaction);
|
|
||||||
//all HLB response
|
|
||||||
String getAllHLBresponse = extra.getString("hlbResponse"); |
|
||||||
//String payResponseCode = transaction.getResponseCode();
|
|
||||||
String payRespErrorDescTransaction = extra.getString("payRespErrorDescTransaction"); |
|
||||||
String payRespIssuerIdTransaction = extra.getString("payRespIssuerIdTransaction"); |
|
||||||
String payFunctionTransaction = extra.getString("payFunctionTransaction"); |
|
||||||
//String payFunction = transaction.setFunction(payFunctionTransaction);
|
|
||||||
String payRespQrTxnIdTransaction = extra.getString("payRespQrTxnIdTransaction"); |
|
||||||
String payRespInvoiceNoTransaction = extra.getString("payRespInvoiceNoTransaction"); |
|
||||||
String payRespSchemeTransaction = extra.getString("payRespSchemeTransaction"); |
|
||||||
String payRespBatchNoTransaction = extra.getString("payRespBatchNoTransaction"); |
|
||||||
String payRespTxnDateTransaction = extra.getString("payRespTxnDateTransaction"); |
|
||||||
String payRespTxnTimeTransaction = extra.getString("payRespTxnTimeTransaction"); |
|
||||||
String payPrintReceiptIdTransaction = extra.getString("payPrintReceiptIdTransaction"); |
|
||||||
String payRespQrWalletIdTransaction = extra.getString("payRespQrWalletIdTransaction"); |
|
||||||
String payRespCardAppCryptogramTransaction = extra.getString("payRespCardAppCryptogramTransaction"); |
|
||||||
String payRespAppLabelTransaction = extra.getString("payRespAppLabelTransaction"); |
|
||||||
String payRespCardRefNumTransaction = extra.getString("payRespCardRefNumTransaction"); |
|
||||||
String payCameraModeTransaction = extra.getString("payCameraModeTransaction"); |
|
||||||
//String payCameraMode = transaction.setCameraMode(payCameraModeTransaction);
|
|
||||||
String payRespCardAuthCodeTransaction = extra.getString("payRespCardAuthCodeTransaction"); |
|
||||||
String payRespCardAidTransaction = extra.getString("payRespCardAidTransaction"); |
|
||||||
String payRespHashPanTransaction = extra.getString("payRespHashPanTransaction"); |
|
||||||
String payRespMerchInfoTransaction = extra.getString("payRespMerchInfoTransaction"); |
|
||||||
String payRespMidTransaction = extra.getString("payRespMidTransaction"); |
|
||||||
String payRespTidTransaction = extra.getString("payRespTidTransaction"); |
|
||||||
String payRespTvrTransaction = extra.getString("payRespTvrTransaction"); |
|
||||||
String payRespCustomerIdTransaction = extra.getString("payRespCustomerIdTransaction"); |
|
||||||
String payTypeTransaction = extra.getString("payTypeTransaction"); |
|
||||||
//String payType = transaction.setType(payTypeTransaction);
|
|
||||||
String payRespTraceNoTransaction = extra.getString("payRespTraceNoTransaction"); |
|
||||||
String payRespCvmDescTransaction = extra.getString("payRespCvmDescTransaction"); |
|
||||||
String payAddAmountTransaction = extra.getString("payAddAmountTransaction"); |
|
||||||
String payRespCardNoTransaction = extra.getString("payRespCardNoTransaction"); |
|
||||||
String payAmountTransaction = extra.getString("payAmountTransaction"); |
|
||||||
|
|
||||||
String merchanCode = "MER0001"; |
|
||||||
//String terminalCode = transaction.getTid();
|
|
||||||
String secretKey = "Uthos^eY5pfO"; |
|
||||||
//Signature=merchant_code+secret_key_reference_number+amount+payment_type ->23/08/2021-requery
|
|
||||||
//String encryptedSign = merchanCode + secretKey + referenceNum + amount + payTypeTransaction;
|
|
||||||
//String encryptedSignValueRequery = encrytThisString(encryptedSign);
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
//String encryptedSigns = merchanCode + secretKey + referenceNum + amount + payRespCodeTransaction;
|
|
||||||
//String encryptedSignValueUpdate = encrytThisString(encryptedSigns);
|
|
||||||
//String paramsResponse = "{\"id\":13,\"merchant_code\":\"MER0001\"}";
|
|
||||||
//String paramsResponse = {"id":13,"merchant_code":"MER0001","terminal_code":"TER001","reference_number":"PAY0021","response_code":"00","payment_type":"01","amount":"1.00","payment_function":"01","payment_camera_mode":null,"status":"success","created_at":"2021-08-23T03:19:30.000000Z","updated_at":"2021-08-23T06:29:40.000000Z"};
|
|
||||||
String paramsResponse = getAllHLBresponse; |
|
||||||
|
|
||||||
|
|
||||||
//if (status.toLowerCase().trim().equals("success") && transaction.getType().toLowerCase().contains("sale")) {
|
|
||||||
if (status.toLowerCase().trim().equals("success")) { |
|
||||||
textStatus.setText(getResources().getString(R.string.txt_success_status)); |
|
||||||
textInfo.setText(getResources().getString(R.string.txt_info_status)); |
|
||||||
//textAmount.setText("Donation Amount: " + "RM " + amount);
|
|
||||||
Glide.with(StatusActivity.this).asBitmap().load(R.drawable.ic_status_success_fancy).into(imageStatus); |
|
||||||
|
|
||||||
/*//direct update the status to server
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = status; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
//String paymentTypeTransaction = payTypeTransaction;
|
|
||||||
//String paymentFunctionTransaction = payFunctionTransaction;
|
|
||||||
//String paymentCameraMode = payCameraModeTransaction;
|
|
||||||
//TODO: change this hardcoded value later
|
|
||||||
//String signValue = "testSignature";
|
|
||||||
//String paramResponse = "HLB params here..";
|
|
||||||
//JSONObject obj = ((Parcel) ((Bundle) getArguments()).getSerializable("events")).getObj();
|
|
||||||
//String paramResponse = obj.toString();
|
|
||||||
|
|
||||||
String merchanCode = "MER0001"; |
|
||||||
//String terminalCode = transaction.getTid();
|
|
||||||
String secretKey = "Uthos^eY5pfO"; |
|
||||||
//String finalStatus = "fail";
|
|
||||||
//String amount = realAmount;
|
|
||||||
//String responseCode = transaction.getResponseCode();
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
String encryptedSign = merchanCode + secretKey + refNum + amount + payRespCodeTransaction; |
|
||||||
String encryptedSignValueUpdate = encrytThisString(encryptedSign); |
|
||||||
String paramsResponse = "{\"id\":13,\"merchant_code\":\"MER0001\"}";*/ |
|
||||||
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
//String encryptedSigns = merchanCode + secretKey + referenceNum + amount + payRespCodeTransaction;
|
|
||||||
String encryptedSignValueUpdate = "";//encrytThisString(encryptedSigns);
|
|
||||||
|
|
||||||
//hide button so user won't need to interact with it
|
|
||||||
//buttonDonationSuccess.setVisibility(View.VISIBLE);
|
|
||||||
buttonDonationSuccess.setVisibility(View.GONE); |
|
||||||
buttonRetry.setVisibility(View.GONE); |
|
||||||
buttonNoRetry.setVisibility(View.GONE); |
|
||||||
|
|
||||||
//hold the info from UDC kiosk donation received for 5 second then proceed to HLB app
|
|
||||||
final Handler handler = new Handler(Looper.getMainLooper()); |
|
||||||
handler.postDelayed(new Runnable() { |
|
||||||
@Override |
|
||||||
public void run() { |
|
||||||
//Do something after 5000ms = 5 seconds
|
|
||||||
//update Status success to server
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
updateResponseFromhlb(referenceNum, status, merchanCode, amountTransaction, payRespCodeTransaction, |
|
||||||
encryptedSignValueUpdate, paramsResponse); |
|
||||||
//updateResponseFromhlb(payment);
|
|
||||||
|
|
||||||
/*{ //current jSON at API side -UPDATE
|
|
||||||
"id": 11, |
|
||||||
"reference_number": "PAY001", |
|
||||||
"payment_type": null, |
|
||||||
"payment_function": null, |
|
||||||
"payment_camera_mode": null, |
|
||||||
"signature": null, |
|
||||||
"amount": "1.00", |
|
||||||
"status": "success", |
|
||||||
"params_response": null, |
|
||||||
"created_at": "2021-06-20T13:32:40.000000Z", |
|
||||||
"updated_at": "2021-08-19T00:32:17.000000Z" |
|
||||||
}*/ |
|
||||||
|
|
||||||
Intent i = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
i.putExtra("statusCurrent", status); |
|
||||||
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); |
|
||||||
startActivity(i); |
|
||||||
} |
|
||||||
}, 5000); |
|
||||||
|
|
||||||
} else { |
|
||||||
textStatus.setText(getResources().getString(R.string.txt_fail_status)); |
|
||||||
textInfo.setText(getResources().getString(R.string.txt_fail_info_status)); |
|
||||||
//textAmount.setText("Donation Amount: " + "RM " + amount);
|
|
||||||
Glide.with(StatusActivity.this).asBitmap().load(R.drawable.ic_status_fail_fancy).into(imageStatus); |
|
||||||
|
|
||||||
buttonDonationSuccess.setVisibility(View.GONE); |
|
||||||
buttonRetry.setVisibility(View.VISIBLE); |
|
||||||
buttonNoRetry.setVisibility(View.VISIBLE); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
//button ok ->hide because useless/ no need user to press
|
|
||||||
/*buttonDonationSuccess.setOnClickListener(view -> { |
|
||||||
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = status; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
|
|
||||||
//update Status to server
|
|
||||||
updateResponseFromhlb(refNum, finalResultPayRespCodeStatus, finalAmount); |
|
||||||
|
|
||||||
|
|
||||||
Intent i = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
i.putExtra("statusCurrent", finalResultPayRespCodeStatus); |
|
||||||
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); |
|
||||||
startActivity(i); |
|
||||||
});*/ |
|
||||||
|
|
||||||
//button no retry pay again
|
|
||||||
buttonNoRetry.setOnClickListener(view -> { |
|
||||||
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = status; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
String paymentTypeTransaction = payTypeTransaction; |
|
||||||
String paymentFunctionTransaction = payFunctionTransaction; |
|
||||||
String paymentCameraMode = payCameraModeTransaction; |
|
||||||
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
//String encryptedSigns = merchanCode + secretKey + referenceNum + amount + payRespCodeTransaction;
|
|
||||||
String encryptedSignValueUpdate ="";// encrytThisString(encryptedSigns);
|
|
||||||
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
//update Status = FAIL to server
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
updateResponseFromhlb(referenceNum, finalResultPayRespCodeStatus, merchanCode, finalAmount, payRespCodeTransaction, |
|
||||||
encryptedSignValueUpdate, paramsResponse); |
|
||||||
|
|
||||||
/*updateResponseFromhlb(refNum, paymentTypeTransaction, paymentFunctionTransaction, |
|
||||||
paymentCameraMode, signValue, finalAmount, finalResultPayRespCodeStatus, paramResponse);*/ |
|
||||||
|
|
||||||
Intent intent = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
intent.putExtra("statusCurrent", finalResultPayRespCodeStatus); |
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); |
|
||||||
startActivity(intent); |
|
||||||
|
|
||||||
}); |
|
||||||
|
|
||||||
//button retry
|
|
||||||
//buttonRetry.setOnClickListener(view -> buttonRetryPayment(status));
|
|
||||||
buttonRetry.setOnClickListener(view -> { |
|
||||||
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = "pending"; |
|
||||||
vStatus = finalResultPayRespCodeStatus; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
|
|
||||||
//Signature=merchant_code+secret_key_reference_number+amount+payment_type ->23/08/2021-requery
|
|
||||||
String encryptedSign ="";// merchanCode + secretKey + referenceNum + amount + payTypeTransaction;
|
|
||||||
String encryptedSignValueRequery = encrytThisString(encryptedSign); |
|
||||||
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
String encryptedSigns ="";// merchanCode + secretKey + referenceNum + amount + payRespCodeTransaction;
|
|
||||||
String encryptedSignValueUpdate = encrytThisString(encryptedSigns); |
|
||||||
|
|
||||||
|
|
||||||
//update Status to server ->no need to update 1st, just retry the payment
|
|
||||||
//updateResponseFromhlb(refNum, finalResultPayRespCodeStatus, finalAmount);
|
|
||||||
|
|
||||||
//check the status from server 1st, if pending proceed, if fail sho success show something
|
|
||||||
//requery + update API
|
|
||||||
checkStatusPayment(refNum, merchanCode, payTypeTransaction, finalAmount, encryptedSignValueRequery, |
|
||||||
paramsResponse, payRespCodeTransaction, encryptedSignValueUpdate); |
|
||||||
|
|
||||||
/*//String transactionStatus = status; ->pending
|
|
||||||
String transactionReference = refNum; |
|
||||||
String transactionStatus = finalResultPayRespCodeStatus; |
|
||||||
String transactionAmount = finalAmount; |
|
||||||
|
|
||||||
retryPayment(finalAmount);*/ |
|
||||||
|
|
||||||
/*Intent intents = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
intents.putExtra("referenceCurrent", transactionReference); |
|
||||||
intents.putExtra("statusCurrent", transactionStatus); |
|
||||||
intents.putExtra("amountCurrent", transactionAmount); |
|
||||||
intents.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); |
|
||||||
startActivity(intents);*/ |
|
||||||
|
|
||||||
}); |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
//refNum, merchanCode, payTypeTransaction, finalAmount, encryptedSignValueRequery
|
|
||||||
private void checkStatusPayment(String referenceNumber, String merchanCode, String payType, String amount, String encryptedSignValueRequery, |
|
||||||
String paramResponse, String payRespCode, String encryptedSignValueUpdate) { |
|
||||||
|
|
||||||
//TODO: Please cleanup and fix afterwards
|
|
||||||
String tempHostUrl = "http://udcsys-api-build.testpigeon.net"; |
|
||||||
String buildToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiOTA2ZTNkN2VmNmZkNmNhZjVjYTVkNWEzYjI5ZDRiMWYxZjlmYTc4ZDcxYzYyNGE0N2FmMTYwMGQzZWY3ZGU5OGE5MGY2NzJlNzE4NmVmZGIiLCJpYXQiOjE2MDg1MzYyMTMsIm5iZiI6MTYwODUzNjIxMywiZXhwIjoxNjQwMDcyMjEzLCJzdWIiOiIxMSIsInNjb3BlcyI6W119.i2jDd1Zux2UkoLhzif762ghsJFhQ32Gk6g0Z2pXDRHKWVoK4kHv__Fnxb4XhdJncfzSmMibZGguOEVPNuRotMjhC7a-lgHKItqeamOSxQNONuhea601R3k8QVDA92mnRKBsDiQw6-mcCw-K5t49I1TkkwauQ1EYQU5GI4vttxbdO_irZfQgINfyCmAkqo_IWgc8498pCuI5lMA2vI9X3BETtNt8WS451hU59fy7K_sjiojFG6mvwu7C-z0ZPcqKQ8F7c2JfZq0qphslMrqj0nZh0skGf0Qf6ZmRrftkNONcO9j9jh5eJfEHIEmGqNhDeO9ftQq5BuWfm6FhYVIW1YnBKrNk6lLkk38fuKjk8FevNwH6knVZjb3Q27Kr7K2cbbvlPEp846VrJrwIdJjfpDuAoorjMQAw-yVJQYOrb_v8F1jhnoMC_Qdu5Qc1AjbDrHggrZtkG9f7pw60reoNk01OCVsOD5ecldm05PfJ2NqhdZn1oXXxFOXc8lcBWpYkfhrOzw0fpxH4hFk4j8HSvy4n0EkB5ZfctDYx6JxXfoCsW7zYgm52ZCZISV5Kchkhlk6W2C1pUs8YjtxAU2I8A6wVbJwGVbwsDudgPXMuNH_PVk3YkljWU-zkPbMLWMOc-DNyioE-dAoq1VWPXoNuhaOqMDR4RCiZPhvJg0yxfA68"; |
|
||||||
|
|
||||||
//String paymentType = "01"; //01=Card Payment
|
|
||||||
|
|
||||||
//Get REQUERY Payment from UDC Laravel Echo Listener Server
|
|
||||||
RetrofitAPICollection service = RetrofitClient.getRetrofitClient(tempHostUrl).create(RetrofitAPICollection.class); |
|
||||||
/*Retrofit retrofit = new Retrofit.Builder() |
|
||||||
.baseUrl("http://udcsys-api-build.testpigeon.net") |
|
||||||
.addConverterFactory(GsonConverterFactory.create()) |
|
||||||
.build();*/ |
|
||||||
|
|
||||||
Call<String> callCardPayStatus = service.requeryCardPayment("Bearer " + buildToken, |
|
||||||
referenceNumber, |
|
||||||
merchanCode, |
|
||||||
payType, |
|
||||||
amount, |
|
||||||
encryptedSignValueRequery); |
|
||||||
|
|
||||||
callCardPayStatus.enqueue(new Callback<String>() { |
|
||||||
@Override |
|
||||||
public void onResponse(Call<String> call, Response<String> response) { |
|
||||||
|
|
||||||
/*Toast.makeText(StatusActivity.this,"\n" + |
|
||||||
"Update data process completed!",Toast.LENGTH_SHORT).show();*/ |
|
||||||
if (response.isSuccessful()) { |
|
||||||
try { |
|
||||||
JSONObject responseJSON = new JSONObject(response.body()); |
|
||||||
|
|
||||||
String responseStatus = responseJSON.getString("status"); |
|
||||||
|
|
||||||
if (responseStatus.toLowerCase().trim().equals("fail")) { |
|
||||||
//set the fail info
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = status; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
String payRespCodeTransaction = payRespCode; |
|
||||||
String encryptedSignUpdate = encryptedSignValueUpdate; |
|
||||||
//String paymentTypeTransaction = transaction.getType();
|
|
||||||
//String paymentFunctionTransaction = transaction.getFunction();
|
|
||||||
//String paymentCameraMode = transaction.getCameraMode();
|
|
||||||
//TODO: change this hardcoded value later
|
|
||||||
//String signValue = "testSignature";
|
|
||||||
//String paramResponse = "HLB params here..";
|
|
||||||
/*updateResponseFromhlb(refNum, payTypeTransaction, payFunctionTransaction, |
|
||||||
payCameraModeTransaction, signValue, finalAmount, finalResultPayRespCodeStatus, paramResponse);*/ |
|
||||||
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
//update Status = FAIL to server
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
updateResponseFromhlb(referenceNum, finalResultPayRespCodeStatus, merchanCode, finalAmount, payRespCodeTransaction, |
|
||||||
encryptedSignUpdate, paramResponse); |
|
||||||
|
|
||||||
/*updateResponseFromhlb(refNum, paymentTypeTransaction, paymentFunctionTransaction, paymentCameraMode, |
|
||||||
signValue, finalAmount, finalResultPayRespCodeStatus, paramResponse);*/ |
|
||||||
|
|
||||||
//show screen/info about cannot retry
|
|
||||||
setResult(RESULT_OK); |
|
||||||
StatusActivity.showFinishMessage(StatusActivity.this, "Payment Fail!", "Payment status : " + responseStatus); |
|
||||||
|
|
||||||
//hold the info from UDC kiosk donation received for 5 second then proceed to HLB app
|
|
||||||
final Handler handler = new Handler(Looper.getMainLooper()); |
|
||||||
handler.postDelayed(new Runnable() { |
|
||||||
@Override |
|
||||||
public void run() { |
|
||||||
//Do something after 5000ms = 5 seconds
|
|
||||||
//direct user to main screen
|
|
||||||
|
|
||||||
Intent intent = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
intent.putExtra("statusCurrent", finalResultPayRespCodeStatus); |
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); |
|
||||||
startActivity(intent); |
|
||||||
} |
|
||||||
}, 5000); |
|
||||||
|
|
||||||
|
|
||||||
} else if (responseStatus.toLowerCase().trim().equals("pending")) { |
|
||||||
//if status not fail, proceed the retry payment process
|
|
||||||
String refNum = referenceNum; |
|
||||||
String finalResultPayRespCodeStatus = "pending"; |
|
||||||
vStatus = finalResultPayRespCodeStatus; |
|
||||||
String finalAmount = amountTransaction; |
|
||||||
|
|
||||||
//String transactionStatus = status; ->pending
|
|
||||||
String transactionReference = refNum; |
|
||||||
String transactionStatus = finalResultPayRespCodeStatus; |
|
||||||
String transactionAmount = finalAmount; |
|
||||||
|
|
||||||
retryPayment(transactionAmount); |
|
||||||
} |
|
||||||
|
|
||||||
} catch (JSONException e) { |
|
||||||
e.printStackTrace(); |
|
||||||
} |
|
||||||
} //if response is NoSuccessful
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onFailure(Call<String> call, Throwable t) { |
|
||||||
Toast.makeText(StatusActivity.this, "Unsuccessfully update data!\n", Toast.LENGTH_SHORT).show(); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
private void retryPayment(String finalAmount) { |
|
||||||
|
|
||||||
String amount = finalAmount; |
|
||||||
//Get the amount from current screen
|
|
||||||
String payAmount = amount; |
|
||||||
|
|
||||||
//Convert double value of amount from UDC kiosk app to integer 1st
|
|
||||||
double doubleValue = Double.parseDouble(payAmount); |
|
||||||
double centValue = doubleValue * 100; |
|
||||||
|
|
||||||
//Convert amount to time 100 for HLB to process
|
|
||||||
int correctAmount = (int) Math.round(centValue); |
|
||||||
|
|
||||||
String pay_amount = ""; |
|
||||||
|
|
||||||
Bundle extra = new Bundle(); |
|
||||||
String pay_function = "01"; //Sale Payment Function
|
|
||||||
pay_amount = pay_amount.valueOf(correctAmount); |
|
||||||
String pay_type = "01"; //Card Payment
|
|
||||||
String pay_camera_mode = "01"; //Internal Device Back Camera
|
|
||||||
String pay_print_receipt_id = "N"; //Set Requirement
|
|
||||||
String pay_resp_code = ""; |
|
||||||
|
|
||||||
//Pack Request Message
|
|
||||||
extra.putString("pay_function", pay_function); |
|
||||||
extra.putString("pay_amount", pay_amount); |
|
||||||
extra.putString("pay_type", pay_type); |
|
||||||
extra.putString("pay_camera_mode", pay_camera_mode); |
|
||||||
extra.putString("pay_print_receipt_id", pay_print_receipt_id); |
|
||||||
extra.putString("pay_resp_code", pay_resp_code); |
|
||||||
|
|
||||||
//API to call Payment App
|
|
||||||
Intent intent = new Intent("com.revenue.edc.hlb.pro.app2app"); |
|
||||||
intent.putExtras(extra); |
|
||||||
|
|
||||||
startActivity(intent); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
//updateResponseToApi(String referenceNumber, String status, String merchantCode, String amount, String responseCode,
|
|
||||||
// String encryptedSignValueUpdate, String paramsResponse)
|
|
||||||
//Signature = merchant_code+secret_key+reference_number+amount+response_code ->23/08/2021-update
|
|
||||||
private void updateResponseFromhlb(String referenceNumber, String status, String merchantCode, String amount, String responseCode, |
|
||||||
String encryptedSignValueUpdate, String paramsResponse) { |
|
||||||
String buildToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiOTA2ZTNkN2VmNmZkNmNhZjVjYTVkNWEzYjI5ZDRiMWYxZjlmYTc4ZDcxYzYyNGE0N2FmMTYwMGQzZWY3ZGU5OGE5MGY2NzJlNzE4NmVmZGIiLCJpYXQiOjE2MDg1MzYyMTMsIm5iZiI6MTYwODUzNjIxMywiZXhwIjoxNjQwMDcyMjEzLCJzdWIiOiIxMSIsInNjb3BlcyI6W119.i2jDd1Zux2UkoLhzif762ghsJFhQ32Gk6g0Z2pXDRHKWVoK4kHv__Fnxb4XhdJncfzSmMibZGguOEVPNuRotMjhC7a-lgHKItqeamOSxQNONuhea601R3k8QVDA92mnRKBsDiQw6-mcCw-K5t49I1TkkwauQ1EYQU5GI4vttxbdO_irZfQgINfyCmAkqo_IWgc8498pCuI5lMA2vI9X3BETtNt8WS451hU59fy7K_sjiojFG6mvwu7C-z0ZPcqKQ8F7c2JfZq0qphslMrqj0nZh0skGf0Qf6ZmRrftkNONcO9j9jh5eJfEHIEmGqNhDeO9ftQq5BuWfm6FhYVIW1YnBKrNk6lLkk38fuKjk8FevNwH6knVZjb3Q27Kr7K2cbbvlPEp846VrJrwIdJjfpDuAoorjMQAw-yVJQYOrb_v8F1jhnoMC_Qdu5Qc1AjbDrHggrZtkG9f7pw60reoNk01OCVsOD5ecldm05PfJ2NqhdZn1oXXxFOXc8lcBWpYkfhrOzw0fpxH4hFk4j8HSvy4n0EkB5ZfctDYx6JxXfoCsW7zYgm52ZCZISV5Kchkhlk6W2C1pUs8YjtxAU2I8A6wVbJwGVbwsDudgPXMuNH_PVk3YkljWU-zkPbMLWMOc-DNyioE-dAoq1VWPXoNuhaOqMDR4RCiZPhvJg0yxfA68"; |
|
||||||
|
|
||||||
//Get REQUERY Payment from UDC Laravel Echo Listener Server
|
|
||||||
Retrofit retrofit = new Retrofit.Builder() |
|
||||||
.baseUrl("http://udcsys-api-build.testpigeon.net") |
|
||||||
.addConverterFactory(GsonConverterFactory.create()) |
|
||||||
.build(); |
|
||||||
|
|
||||||
RetrofitAPICollection retrofitAPICollection = retrofit.create(RetrofitAPICollection.class); |
|
||||||
Call<String> call = retrofitAPICollection.updateStatusCardPayment("Bearer " + buildToken, |
|
||||||
referenceNumber, |
|
||||||
status, |
|
||||||
merchantCode, |
|
||||||
amount, |
|
||||||
responseCode, |
|
||||||
encryptedSignValueUpdate, |
|
||||||
paramsResponse); |
|
||||||
|
|
||||||
call.enqueue(new Callback<String>() { |
|
||||||
@Override |
|
||||||
public void onResponse(Call<String> call, Response<String> response) { |
|
||||||
//txtStatus.setText(response.body().getReferenceNumber()+ " ".concat(response.body().getStatus()+ " "));
|
|
||||||
|
|
||||||
Toast.makeText(StatusActivity.this, "\n" + |
|
||||||
"Update data process completed!", Toast.LENGTH_SHORT).show(); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void onFailure(Call<String> call, Throwable t) { |
|
||||||
Toast.makeText(StatusActivity.this, "Unsuccessfully update data!\n", Toast.LENGTH_SHORT).show(); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
private void buttonRetryPayment(String transactionStatus) { |
|
||||||
|
|
||||||
//Get status from Response Screen , send to MainActivity for retry process
|
|
||||||
Intent intent = new Intent(StatusActivity.this, MainActivity.class); |
|
||||||
//intent.putExtra("transaction", transaction);
|
|
||||||
intent.putExtra("status", transactionStatus); |
|
||||||
startActivity(intent); |
|
||||||
//setResult(RESULT_OK);
|
|
||||||
//finish();
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,170 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||||
android:width="108dp" |
|
||||||
android:height="108dp" |
|
||||||
android:viewportWidth="108" |
|
||||||
android:viewportHeight="108"> |
|
||||||
<path |
|
||||||
android:fillColor="#3DDC84" |
|
||||||
android:pathData="M0,0h108v108h-108z" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M9,0L9,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,0L19,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M29,0L29,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M39,0L39,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M49,0L49,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M59,0L59,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M69,0L69,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M79,0L79,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M89,0L89,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M99,0L99,108" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,9L108,9" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,19L108,19" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,29L108,29" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,39L108,39" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,49L108,49" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,59L108,59" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,69L108,69" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,79L108,79" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,89L108,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M0,99L108,99" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,29L89,29" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,39L89,39" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,49L89,49" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,59L89,59" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,69L89,69" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M19,79L89,79" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M29,19L29,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M39,19L39,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M49,19L49,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M59,19L59,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M69,19L69,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
<path |
|
||||||
android:fillColor="#00000000" |
|
||||||
android:pathData="M79,19L79,89" |
|
||||||
android:strokeWidth="0.8" |
|
||||||
android:strokeColor="#33FFFFFF" /> |
|
||||||
</vector> |
|
@ -1,189 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
||||||
xmlns:tools="http://schemas.android.com/tools" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="match_parent" |
|
||||||
android:backgroundTint="@color/white" |
|
||||||
android:gravity="center" |
|
||||||
android:orientation="vertical" |
|
||||||
tools:context=".activity.StatusActivity"> |
|
||||||
|
|
||||||
<RelativeLayout |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content"> |
|
||||||
|
|
||||||
<ImageView |
|
||||||
android:id="@+id/image_status_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="200dp" |
|
||||||
android:layout_centerHorizontal="true" |
|
||||||
android:contentDescription="@string/txt_image_description" |
|
||||||
android:src="@drawable/ic_status_success" /> |
|
||||||
|
|
||||||
</RelativeLayout> |
|
||||||
|
|
||||||
<RelativeLayout |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content"> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:id="@+id/text_status_sta" |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:layout_centerHorizontal="true" |
|
||||||
android:text="@string/txt_success_status" |
|
||||||
android:textColor="#1d504a" |
|
||||||
android:textSize="30sp" |
|
||||||
android:textStyle="bold" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:id="@+id/text_info_sta" |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:layout_below="@id/text_status_sta" |
|
||||||
android:layout_centerHorizontal="true" |
|
||||||
android:paddingLeft="30dp" |
|
||||||
android:paddingTop="30dp" |
|
||||||
android:paddingRight="30dp" |
|
||||||
android:paddingBottom="20dp" |
|
||||||
android:text="@string/txt_info_status" |
|
||||||
android:textAlignment="center" |
|
||||||
android:textColor="@color/grey_8e98a6" |
|
||||||
android:textSize="20sp" /> |
|
||||||
|
|
||||||
<TextView |
|
||||||
android:id="@+id/text_info_amount_sta" |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:layout_below="@id/text_info_sta" |
|
||||||
android:layout_centerHorizontal="true" |
|
||||||
android:paddingLeft="30dp" |
|
||||||
android:paddingRight="30dp" |
|
||||||
android:text="@string/txt_info_amount_status" |
|
||||||
android:textAlignment="center" |
|
||||||
android:textColor="@color/black" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" /> |
|
||||||
|
|
||||||
</RelativeLayout> |
|
||||||
|
|
||||||
<RelativeLayout |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content"> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_ok_donation_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="70dp" |
|
||||||
android:layout_marginStart="40dp" |
|
||||||
android:layout_marginTop="40dp" |
|
||||||
android:layout_marginEnd="40dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_enable_bg" |
|
||||||
android:gravity="center" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_ok_donation_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" /> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_pay_again_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="70dp" |
|
||||||
android:layout_below="@id/button_ok_donation_sta" |
|
||||||
android:layout_marginStart="40dp" |
|
||||||
android:layout_marginTop="40dp" |
|
||||||
android:layout_marginEnd="40dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_enable_bg" |
|
||||||
android:gravity="center" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_pay_again_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" |
|
||||||
android:visibility="visible" /> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_no_pay_again_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="70dp" |
|
||||||
android:layout_below="@id/button_pay_again_sta" |
|
||||||
android:layout_marginStart="40dp" |
|
||||||
android:layout_marginTop="20dp" |
|
||||||
android:layout_marginEnd="40dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_disable_bg" |
|
||||||
android:gravity="center" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_no_pay_again_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" |
|
||||||
android:visibility="visible" /> |
|
||||||
|
|
||||||
</RelativeLayout> |
|
||||||
|
|
||||||
<!--<LinearLayout |
|
||||||
android:layout_width="wrap_content" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:orientation="horizontal"> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_ok_donation_sta" |
|
||||||
android:layout_width="match_parent" |
|
||||||
android:layout_height="wrap_content" |
|
||||||
android:layout_marginStart="80dp" |
|
||||||
android:layout_marginTop="40dp" |
|
||||||
android:layout_marginEnd="80dp" |
|
||||||
android:layout_marginBottom="80dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_enable_bg" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_ok_donation_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" /> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_pay_again_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="150dp" |
|
||||||
android:layout_marginStart="40dp" |
|
||||||
android:layout_marginTop="40dp" |
|
||||||
android:layout_marginEnd="40dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_enable_bg" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_pay_again_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" |
|
||||||
android:visibility="visible" /> |
|
||||||
|
|
||||||
<Button |
|
||||||
android:id="@+id/button_no_pay_again_sta" |
|
||||||
android:layout_width="200dp" |
|
||||||
android:layout_height="150dp" |
|
||||||
android:layout_marginStart="40dp" |
|
||||||
android:layout_marginTop="40dp" |
|
||||||
android:layout_marginEnd="40dp" |
|
||||||
android:layout_weight="1" |
|
||||||
android:background="@drawable/btn_general_enable_bg" |
|
||||||
android:padding="20dp" |
|
||||||
android:text="@string/btn_no_pay_again_status" |
|
||||||
android:textAllCaps="false" |
|
||||||
android:textColor="@color/white" |
|
||||||
android:textSize="20sp" |
|
||||||
android:textStyle="bold" |
|
||||||
android:visibility="visible" /> |
|
||||||
|
|
||||||
</LinearLayout>--> |
|
||||||
|
|
||||||
</LinearLayout> |
|
@ -1,5 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
|
||||||
<background android:drawable="@drawable/ic_udc_launcher_background" /> |
|
||||||
<foreground android:drawable="@mipmap/ic_udc_launcher_foreground" /> |
|
||||||
</adaptive-icon> |
|
@ -1,5 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
|
||||||
<background android:drawable="@drawable/ic_udc_launcher_background" /> |
|
||||||
<foreground android:drawable="@mipmap/ic_udc_launcher_foreground" /> |
|
||||||
</adaptive-icon> |
|
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |