android 跳转获取微信发票时候,没有走onResp的方法,不知道什么原因?
能够跳转微信, 也能选取发票, 但返回的时候,onResp的方法并没有走.也没有把发票数据带回来.
```
public void invoice(ReadableMap data, Callback callback) {
ChooseCardFromWXCardPackage.Req req = new ChooseCardFromWXCardPackage.Req();
String timeStamp = String.valueOf(System.currentTimeMillis()/1000);
if (data.hasKey("appId")) {
req.appId = data.getString("appId");
}
if (data.hasKey("accessToken")) {
accessToken = data.getString("accessToken");
}
req.cardType = "INVOICE";
req.nonceStr = "sfim_invoice";
req.timeStamp = timeStamp;
//签名类型
req.signType = "SHA1";
// req.locationId = "";
// req.cardId = "";
req.canMultiSelect = "1";
String apiTicket = "";
if (data.hasKey("ticket")) {
apiTicket = data.getString("ticket");
}
Log.d("INVOICE", req.appId);
Log.d("INVOICE", apiTicket);
//sha1签名
req.cardSign = createSign(req.appId, req.nonceStr, req.timeStamp, req.cardType,apiTicket);
Log.d("INVOICE", req.cardSign);
callback.invoke(api.sendReq(req) ? null : INVOKE_FAILED);;
}
```