up
This commit is contained in:
parent
f9801997f5
commit
05be4ff1b8
|
@ -94,7 +94,7 @@ public class QrCodeScannerActivity extends AppCompatActivity {
|
||||||
Intent scannedQrIntent = new Intent(QrCodeScannerActivity.this, ApprovePayementActivity.class);
|
Intent scannedQrIntent = new Intent(QrCodeScannerActivity.this, ApprovePayementActivity.class);
|
||||||
scannedQrIntent.putExtra("VALUE",intentData);
|
scannedQrIntent.putExtra("VALUE",intentData);
|
||||||
scannedQrIntent.putExtra("USER_HASH",user_hash);
|
scannedQrIntent.putExtra("USER_HASH",user_hash);
|
||||||
scannedQrIntent.putExtra("USER_PDW",user_password);
|
scannedQrIntent.putExtra("USER_PWD",user_password);
|
||||||
scannedQrIntent.putExtra("WALLET_HASH",wallet_hash);
|
scannedQrIntent.putExtra("WALLET_HASH",wallet_hash);
|
||||||
scannedQrIntent.putExtra("SESSION_ID",session_id);
|
scannedQrIntent.putExtra("SESSION_ID",session_id);
|
||||||
QrCodeScannerActivity.this.startActivity(scannedQrIntent);
|
QrCodeScannerActivity.this.startActivity(scannedQrIntent);
|
||||||
|
|
|
@ -2,8 +2,8 @@ package monnethic.mobile.restApi;
|
||||||
|
|
||||||
public class Config {
|
public class Config {
|
||||||
//BASE
|
//BASE
|
||||||
//static private String BASE_URL = "http://37.187.101.44:10053/";
|
static private String BASE_URL = "http://37.187.101.44:10053/";
|
||||||
static private String BASE_URL = "http://10.0.2.2:10053/";
|
//static private String BASE_URL = "http://10.0.2.2:10053/";
|
||||||
//static private String BASE_URL = "http://localhost:10053/";
|
//static private String BASE_URL = "http://localhost:10053/";
|
||||||
static private String BASE_URL_USER = BASE_URL+"api/rest/user/";
|
static private String BASE_URL_USER = BASE_URL+"api/rest/user/";
|
||||||
static private String BASE_URL_TRANSACTION = BASE_URL+"api/rest/transaction/";
|
static private String BASE_URL_TRANSACTION = BASE_URL+"api/rest/transaction/";
|
||||||
|
|
|
@ -69,6 +69,7 @@ public class ApprovePayementActivity extends AppCompatActivity {
|
||||||
public void sendTransaction(){
|
public void sendTransaction(){
|
||||||
SendingTransaction sendingTransaction = new SendingTransaction(user_hash,user_password,wallet_hash,wallet_dest,amount,"gonette");
|
SendingTransaction sendingTransaction = new SendingTransaction(user_hash,user_password,wallet_hash,wallet_dest,amount,"gonette");
|
||||||
try {
|
try {
|
||||||
|
|
||||||
String transaction_hash = new TransactionTask().execute(sendingTransaction).get();
|
String transaction_hash = new TransactionTask().execute(sendingTransaction).get();
|
||||||
if(transaction_hash!=null){
|
if(transaction_hash!=null){
|
||||||
Toast.makeText(this, "transaction id : "+transaction_hash, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, "transaction id : "+transaction_hash, Toast.LENGTH_LONG).show();
|
||||||
|
@ -85,6 +86,7 @@ public class ApprovePayementActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected String doInBackground(SendingTransaction... sendingTransactions) {
|
protected String doInBackground(SendingTransaction... sendingTransactions) {
|
||||||
try{
|
try{
|
||||||
|
|
||||||
TransactionApiHandler transactionApiHandler = new TransactionApiHandler();
|
TransactionApiHandler transactionApiHandler = new TransactionApiHandler();
|
||||||
return transactionApiHandler.doTransaction(sendingTransactions[0]);
|
return transactionApiHandler.doTransaction(sendingTransactions[0]);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
@ -1,71 +1,76 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="monnethic.mobile.transaction.ApprovePayementActivity">
|
tools:context="monnethic.mobile.transaction.ApprovePayementActivity">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
<TextView
|
android:orientation="vertical"
|
||||||
android:id="@+id/textViewAmount"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="wrap_content"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:layout_height="wrap_content"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_marginStart="61dp"
|
|
||||||
android:layout_marginTop="284dp"
|
|
||||||
android:text="AMOUNT :" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textViewDestAddress"
|
android:id="@+id/textViewDestAddress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignStart="@+id/textViewAmount"
|
android:layout_marginTop="150dp"
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_marginStart="1dp"
|
|
||||||
android:layout_marginTop="188dp"
|
|
||||||
android:text="TO :" />
|
android:text="TO :" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/destAddress"
|
android:id="@+id/destAddress"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/textViewDestAddress"
|
android:layout_marginTop="15dp" />
|
||||||
android:layout_marginStart="-27dp"
|
|
||||||
android:layout_marginTop="9dp"
|
|
||||||
android:layout_toEndOf="@+id/textViewDestAddress" />
|
<TextView
|
||||||
|
android:id="@+id/textViewAmount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:text="AMOUNT :" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/amountApprove"
|
android:id="@+id/amountApprove"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignStart="@+id/textViewAmount"
|
android:layout_marginTop="15dp"/>
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_marginBottom="235dp" />
|
|
||||||
|
|
||||||
<Button
|
<RelativeLayout
|
||||||
android:id="@+id/buttonCancel"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_marginTop="30dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_marginBottom="40dp">
|
||||||
android:layout_marginStart="79dp"
|
|
||||||
android:layout_marginBottom="111dp"
|
|
||||||
android:text="CANCEL" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/buttonValidate"
|
android:id="@+id/buttonCancel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@+id/buttonCancel"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginEnd="81dp"
|
android:layout_marginStart="70dp"
|
||||||
android:layout_marginBottom="-1dp"
|
android:text="CANCEL" />
|
||||||
android:text="VALIDATE" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<Button
|
||||||
|
android:id="@+id/buttonValidate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="0dp"
|
||||||
|
android:layout_marginEnd="69dp"
|
||||||
|
android:text="VALIDATE" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:text="Adresse :"
|
android:text="Address:"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/textViewAmount"
|
app:layout_constraintBottom_toTopOf="@+id/textViewAmount"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textViewAdresseDisplay"
|
app:layout_constraintEnd_toStartOf="@+id/textViewAdresseDisplay"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginBottom="140dp"
|
android:layout_marginBottom="140dp"
|
||||||
android:text="Montant :"
|
android:text="Amount:"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textViewAmountDisplay"
|
app:layout_constraintEnd_toStartOf="@+id/textViewAmountDisplay"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
|
Loading…
Reference in a new issue