|
@@ -35,6 +35,7 @@ import com.hw.nativeapp.utils.ActivityUtils;
|
|
import com.hw.nativeapp.utils.ImageUtils;
|
|
import com.hw.nativeapp.utils.ImageUtils;
|
|
import com.hw.nativeapp.utils.MaskUtil;
|
|
import com.hw.nativeapp.utils.MaskUtil;
|
|
import com.hw.nativeapp.utils.RxUtil;
|
|
import com.hw.nativeapp.utils.RxUtil;
|
|
|
|
+import com.hw.nativeapp.utils.StringUtils;
|
|
import com.squareup.picasso.Picasso;
|
|
import com.squareup.picasso.Picasso;
|
|
|
|
|
|
import butterknife.BindView;
|
|
import butterknife.BindView;
|
|
@@ -51,6 +52,9 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
|
|
|
|
@BindView(R.id.wechat_pay)
|
|
@BindView(R.id.wechat_pay)
|
|
ImageView wechat_pay;
|
|
ImageView wechat_pay;
|
|
|
|
+ @BindView(R.id.tx_totalAmount)
|
|
|
|
+ TextView tx_totalAmount;
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
private int isPage = 0;
|
|
private int isPage = 0;
|
|
@@ -89,7 +93,8 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_payment_method);
|
|
setContentView(R.layout.activity_payment_method);
|
|
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
|
|
|
|
+ getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
|
|
|
+ WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
|
}
|
|
}
|
|
@Override
|
|
@Override
|
|
protected void onStart() {
|
|
protected void onStart() {
|
|
@@ -129,8 +134,12 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
total = transmitIntent.getStringExtra("total");
|
|
total = transmitIntent.getStringExtra("total");
|
|
totalPeice = transmitIntent.getStringExtra("totalPeice");
|
|
totalPeice = transmitIntent.getStringExtra("totalPeice");
|
|
viewerList = JSONArray.parseArray(transmitIntent.getStringExtra("viewerList"));
|
|
viewerList = JSONArray.parseArray(transmitIntent.getStringExtra("viewerList"));
|
|
|
|
+ if (!StringUtils.isEmpty(totalPeice)){
|
|
|
|
+ tx_totalAmount.setText("¥" + totalPeice);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 订单支付
|
|
// 订单支付
|
|
|
|
+ @SuppressLint("CheckResult")
|
|
private void getGotoNativePay(){
|
|
private void getGotoNativePay(){
|
|
JSONObject options = new JSONObject();
|
|
JSONObject options = new JSONObject();
|
|
options.put("orderId", orderId);
|
|
options.put("orderId", orderId);
|
|
@@ -144,16 +153,6 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
//微信支付
|
|
//微信支付
|
|
Bitmap weiEQ = ImageUtils.createQRImage(payInfo, 500, 500);
|
|
Bitmap weiEQ = ImageUtils.createQRImage(payInfo, 500, 500);
|
|
wechat_pay.setImageBitmap(weiEQ);
|
|
wechat_pay.setImageBitmap(weiEQ);
|
|
-// String payType = "alipay";
|
|
|
|
-// if(payType.equals("alipay")){
|
|
|
|
-// //支付宝支付
|
|
|
|
-//
|
|
|
|
-// } else {
|
|
|
|
-// //微信支付
|
|
|
|
-// Bitmap weiEQ = ImageUtils.createQRImage(payInfo, 600, 600);
|
|
|
|
-// wechat_pay.setImageBitmap(weiEQ);
|
|
|
|
-// }
|
|
|
|
- // 开始循环查询订单状态
|
|
|
|
orderCountDownTimer();
|
|
orderCountDownTimer();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -165,6 +164,7 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
}, new ErrorConsumer());
|
|
}, new ErrorConsumer());
|
|
}
|
|
}
|
|
// 订单支付
|
|
// 订单支付
|
|
|
|
+ @SuppressLint("CheckResult")
|
|
private void getPayQuery(){
|
|
private void getPayQuery(){
|
|
JSONObject options = new JSONObject();
|
|
JSONObject options = new JSONObject();
|
|
options.put("orderId", orderId);
|
|
options.put("orderId", orderId);
|
|
@@ -215,6 +215,7 @@ public class PaymentMethodActivity extends BaseActivity {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// 扫码订单支付
|
|
// 扫码订单支付
|
|
|
|
+ @SuppressLint("CheckResult")
|
|
private void gotoMicroPay(String authCode){
|
|
private void gotoMicroPay(String authCode){
|
|
JSONObject options = new JSONObject();
|
|
JSONObject options = new JSONObject();
|
|
options.put("orderId", orderId);
|
|
options.put("orderId", orderId);
|