Commit 6e67daed by jeffrey

不知道修改了啥

parent 7a2e0b2d
......@@ -12,4 +12,5 @@ public class MyApplication extends Application {
public void onCreate() {
super.onCreate();
}
}
......@@ -15,8 +15,9 @@ import retrofit2.http.Query;
public interface HttpService {
// public String base_url = "http://test.haoyiwangluo.com/";
public String base_url = "http://www.haoyiwangluo.com/";
public String base_url = "http://test.haoyiwangluo.com/";
// public String base_url = "http://www.haoyiwangluo.com/";
public String notify_money_come = "index/pay/notify/person_app";
@POST("index/pay/notify/person_app")
Call<String> postClientMoney(@Field("notify_text") String notify_text, @Field("pay_to") String pay_to, @Field("type") String type);
......
......@@ -48,7 +48,7 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
private static String paytype;
private Save2SharedPreferences save2SharedPreferences;
// private Save2SharedPreferences save2SharedPreferences;
// @Override
// public void onCreate() {
......@@ -62,6 +62,7 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
return START_STICKY;
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onNotificationPosted(StatusBarNotification sbn) {
......@@ -70,15 +71,15 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
}
String pay2set = "";
save2SharedPreferences = new Save2SharedPreferences();
// save2SharedPreferences = new Save2SharedPreferences();
if (aliPayPackageName.equals(sbn.getPackageName())) {
paytype = aliPayType;
pay2set = save2SharedPreferences.read(MainActivity.ALIPAYNAME,getApplicationContext());
pay2set = Save2SharedPreferences.read(MainActivity.ALIPAYNAME,getApplicationContext());
}
if (weChatPayPackageName.equals(sbn.getPackageName())) {
paytype = weChatPayType;
pay2set = save2SharedPreferences.read(MainActivity.WECHATPAYNAME,getApplicationContext());
pay2set = Save2SharedPreferences.read(MainActivity.WECHATPAYNAME,getApplicationContext());
}
......@@ -86,8 +87,8 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
Log.i("xiaolong", "open" + "-----" + sbn.getPackageName());
Log.i("xiaolong", "open" + "------" + sbn.getNotification().tickerText);
String alipay = save2SharedPreferences.read(MainActivity.ALIPAYNAME,getApplicationContext());
String api = save2SharedPreferences.read(MainActivity.API,getApplicationContext());
String alipay = Save2SharedPreferences.read(MainActivity.ALIPAYNAME,getApplicationContext());
String api = Save2SharedPreferences.read(MainActivity.API,getApplicationContext());
Log.i("xiaolong", "open" + "-----" + alipay);
Log.i("xiaolong", "open" + "------" + api);
......@@ -154,6 +155,8 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
}
cancelNotification(sbn.getKey());
}
......@@ -166,7 +169,7 @@ public class WeChatNotificationListenerService extends NotificationListenerServi
public void run() {
try {
OkHttpClient client = new OkHttpClient();
String api = save2SharedPreferences.read(MainActivity.API,getApplicationContext());
String api = Save2SharedPreferences.read(MainActivity.API,getApplicationContext());
//这边讲请求不用ref的方式,是因为api地址后期会随着变化而变化,不可以写成结构形式
RequestBody requestBody = new FormBody.Builder()
......
# APP接口
# APP接口
## 接口URL
http://test.fourth-pay.checheng.net/app-api/
## 接口说明
### 请求方法
POST
### 通用请求参数
token: string,由服务端生成提供
### HTTP返回码
200: 请求成功
401: TOKEN验证失败
422: 请求失败,返回{'message': '错误信息', errors: [...]}
## 接口
### 获取要生成的金额
#### 请求URL
amounts
#### 请求参数
channel: string, 支付宝为'alipaypersonal'、微信为'wechatpersonal'
username: string, 支付宝或微信的账号名称
#### 响应结果
返回所有需要生产的金额: 如[1, 2, 3]
### 提交二维码
#### 请求URL
amounts/submit
#### 请求参数
channel: string, 支付宝为'alipaypersonal'、微信为'wechatpersonal'
username: string, 支付宝或微信的账号名称
data: array, 数组中每条数据结构为{amount: 1, code: 'HTTP://alipay.com/897jas8fau0s9'}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment