This commit is contained in:
2021-01-29 09:54:28 +08:00
2 changed files with 21 additions and 18 deletions

View File

@@ -288,7 +288,7 @@ public class PayActivity extends BaseActivity<ActivityPayBinding> {
String privateKey = playmentJsonObj.getString("privateKey"); String privateKey = playmentJsonObj.getString("privateKey");
Log.e("支付宝privateKey值==",privateKey); Log.e("支付宝privateKey值==",privateKey);
// execAliPay(appID, pid, privateKey, billNumber); execAliPay(appID, pid, privateKey, billNumber);
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }
@@ -326,24 +326,27 @@ public class PayActivity extends BaseActivity<ActivityPayBinding> {
Config.getInstance(PayActivity.this).getUser(); Config.getInstance(PayActivity.this).getUser();
String userId = user.getUserid(); String userId = user.getUserid();
String feeCategory = getIntent().getStringExtra("feeCategory"); // String feeCategory = getIntent().getStringExtra("feeCategory");
String tradeNo = ""; String tradeNo = "";
String notifyUrl = ""; String notifyUrl = "";
if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.HOUSEKEEPING)) { // if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.HOUSEKEEPING)) {
notifyUrl = ApiConfig.CALLBACK_HOUSEKEEPING_PAY; // notifyUrl = ApiConfig.CALLBACK_HOUSEKEEPING_PAY;
tradeNo = getIntent().getStringExtra("serve_order_number"); // tradeNo = getIntent().getStringExtra("serve_order_number");
} else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.PROPERTY_FEE)) { // } else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.PROPERTY_FEE)) {
String userHomeId = getIntent().getStringExtra("userHomeId"); // String userHomeId = getIntent().getStringExtra("userHomeId");
String feeType = getIntent().getStringExtra("feeType"); // String feeType = getIntent().getStringExtra("feeType");
tradeNo = billNumber + "o" + userId + "o" + userHomeId + "o" + feeType; // tradeNo = billNumber + "o" + userId + "o" + userHomeId + "o" + feeType;
notifyUrl = ApiConfig.CALLBACK_PROPERTY_PAY; // notifyUrl = ApiConfig.CALLBACK_PROPERTY_PAY;
} else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.RECHARGE)) { // } else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.RECHARGE)) {
tradeNo = billNumber + "o" + userId; // tradeNo = billNumber + "o" + userId;
notifyUrl = ApiConfig.CALLBACK_RECHARGE_PAY; // notifyUrl = ApiConfig.CALLBACK_RECHARGE_PAY;
} else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.PARKING_FEE)) { // } else if (StringUtils.equalsIgnoreCase(feeCategory, Constants.FeeCategory.PARKING_FEE)) {
notifyUrl = ApiConfig.CALLBACK_TEMP_STOP_PAY; // notifyUrl = ApiConfig.CALLBACK_TEMP_STOP_PAY;
tradeNo = getIntent().getStringExtra("orderSn"); // tradeNo = getIntent().getStringExtra("orderSn");
} // }
notifyUrl = ApiConfig.CALLBACK_PAYMENT_PAY;
tradeNo = billNumber+"|"+cart_id;
//String number = mDataBinding.number.getText().toString(); //String number = mDataBinding.number.getText().toString();
aliPayManager.startPay("", "", tradeNo, payment_amount, notifyUrl); aliPayManager.startPay("", "", tradeNo, payment_amount, notifyUrl);
} }

View File

@@ -36,5 +36,5 @@ public class ApiConfig {
public static String CALLBACK_RECHARGE_PAY = BASE_PARENT_URL + "bts/payment/user_wallet_recharge"; //支付宝用户充值余额下单回调 public static String CALLBACK_RECHARGE_PAY = BASE_PARENT_URL + "bts/payment/user_wallet_recharge"; //支付宝用户充值余额下单回调
public static String CALLBACK_PROPERTY_PAY = BASE_PARENT_URL + "bts/payment/user_recharge"; //支付宝用户物业费等等下单回调(账单类型,1水费,2电费.3燃气费,4物业费,5车位管理费,6家政服务费,7报修支付费用) public static String CALLBACK_PROPERTY_PAY = BASE_PARENT_URL + "bts/payment/user_recharge"; //支付宝用户物业费等等下单回调(账单类型,1水费,2电费.3燃气费,4物业费,5车位管理费,6家政服务费,7报修支付费用)
public static String CALLBACK_HOUSEKEEPING_PAY = BASE_PARENT_URL + "bts/payment/serve_notify"; //支付宝家政服务正常下单回调 public static String CALLBACK_HOUSEKEEPING_PAY = BASE_PARENT_URL + "bts/payment/serve_notify"; //支付宝家政服务正常下单回调
public static String CALLBACK_PAYMENT_PAY = BASE_PARENT_URL + "orderpaynotify/payment/notify"; //支付宝提交订单回调
} }