接入oppo的支付

This commit is contained in:
zhl 2020-11-23 13:51:01 +08:00
parent fc1aafadbf
commit a8a1e954f3

View File

@ -203,18 +203,18 @@ public class MainActivity extends Activity {
try {
JSONObject jsonObject = new JSONObject(message);
String cpOrderId = jsonObject.getString("orderId");
String productCode = jsonObject.getString("productCode");
int count = jsonObject.getInt("count");
int money = jsonObject.getInt("money"); // 未传
String cpOrderId = jsonObject.getString("order");
String attach = jsonObject.getString("attach");
int money = jsonObject.getInt("amount"); // 未传
String notifyUrl = jsonObject.getString("notifyUrl"); // 未传
String productName = jsonObject.getString("productName"); // 未传
String productDesc = jsonObject.getString("productDesc"); //未传
String sign = jsonObject.getString("sign"); // 未传
// String sign = jsonObject.getString("sign"); // 未传
//TODO: 平台的支付
PayInfo payInfo = new PayInfo(cpOrderId, productCode, money );
PayInfo payInfo = new PayInfo(cpOrderId, attach, money );
payInfo.setProductDesc(productDesc);
payInfo.setProductName(productName);
payInfo.setAmount(money);
// payInfo.setType(PayInfo.TYPE_AUTO_ORDER_WXPAY);
payInfo.setUseCachedChannel(false);
// 支付结果服务器回调地址不通过服务端回调发货的应用可以不用填写~