提交修改
This commit is contained in:
parent
d24f5defc3
commit
174c39afe2
@ -1,6 +1,8 @@
|
||||
package com.heyu.api.jsapi.dto.refund;
|
||||
|
||||
public static class FundsFromItem {
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FundsFromItem {
|
||||
@SerializedName("account")
|
||||
public Account account;
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@ package com.heyu.api.jsapi.dto.refund;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.heyu.api.jsapi.dto.pay.GoodsDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Promotion {
|
||||
@SerializedName("promotion_id")
|
||||
public String promotionId;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.api.test;
|
||||
|
||||
import com.heyu.api.jsapi.JsapiPrepay;
|
||||
import com.heyu.api.jsapi.WXPayUtility;
|
||||
import com.heyu.api.jsapi.dto.pay.DirectAPIv3QueryResponse;
|
||||
import com.heyu.api.jsapi.dto.pay.QueryByWxTradeNoRequest;
|
||||
@ -9,7 +10,7 @@ public class JSAPIQueryTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756
|
||||
QueryByWxTradeNo client = new QueryByWxTradeNo(
|
||||
JsapiPrepay client = new JsapiPrepay(
|
||||
TestJSAPI.mchid, // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756
|
||||
TestJSAPI.Certificate_serial_number, // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053
|
||||
TestJSAPI.privateKey, // 商户API证书私钥文件路径,本地文件路径
|
||||
@ -18,10 +19,11 @@ public class JSAPIQueryTest {
|
||||
);
|
||||
|
||||
QueryByWxTradeNoRequest request = new QueryByWxTradeNoRequest();
|
||||
request.transactionId = "4200002963202511079867655660";
|
||||
|
||||
String transactionId = "4200002963202511079867655660";
|
||||
request.mchid = TestJSAPI.mchid;
|
||||
try {
|
||||
DirectAPIv3QueryResponse response = client.run(request);
|
||||
DirectAPIv3QueryResponse response = client.queryOrder(transactionId);
|
||||
// TODO: 请求成功,继续业务逻辑
|
||||
System.out.println(response);
|
||||
} catch (WXPayUtility.ApiException e) {
|
||||
|
||||
19
api-web/api-interface/src/test/java/com/api/test/Test5.java
Normal file
19
api-web/api-interface/src/test/java/com/api/test/Test5.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.api.test;
|
||||
|
||||
public class Test5 {
|
||||
|
||||
|
||||
|
||||
public static final String wechatAccessTokenUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
|
||||
private static String appid = "wx75fa59c097bd3dfd";
|
||||
private static String s = "1837c382de696013a2dfc64591e6b854";
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String url = String.format(wechatAccessTokenUrl, appid, s);
|
||||
System.out.println(url);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user