yixian 7 years ago
parent b1bebb8d0f
commit aa70140535

@ -0,0 +1,45 @@
package au.com.royalpay.payment.manage.support.wechatclients;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WechatRedpack;
import au.com.royalpay.payment.tools.connections.mpsupport.impls.AbstractMpWechatClientApi;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
/**
* Created by yishuqian on 11/01/2017.
*/
@Service
public class NAPWechatApi extends AbstractMpWechatClientApi implements MpWechatApi {
@PostConstruct
public void initTemplates() {
}
@Override
public String targetMpAccount() {
return "globalpay";
}
@Override
public String getOpenIdKey() {
return "globalpay_openid";
}
@Override
public JSONObject sendRedpack(WechatRedpack redpackInfo) {
throw new ServerErrorException("Cannot send redpack with this merchant");
}
@Override
public JSONObject redpackStatus(String redpackId) {
throw new ServerErrorException("Cannot send redpack with this merchant");
}
@Override
public boolean matchOpenId(String openId) {
return openId.startsWith("olHWD");
}
}

@ -10,4 +10,11 @@ app.wechatpay.merchants.1431999902.app-id=wx703febcbd34dae38
app.wechatpay.merchants.1431999902.merchant-id=1431999902
app.wechatpay.merchants.1431999902.mch-key=p3tgzrAJbe6eQrunbv8jb8gz5yXxvJdE
app.wechatpay.merchants.1431999902.key-file=classpath:apiclient_new_cert.p12
app.wechatpay.merchants.1431999902.example-sub-merchant-id=42991963
app.wechatpay.merchants.1431999902.example-sub-merchant-id=42991963
app.wechatpay.merchants.1487387142.app-id=wx3e14d1144d898197
app.wechatpay.merchants.1487387142.mp-id=globalpay
app.wechatpay.merchants.1487387142.merchant-id=1487387142
app.wechatpay.merchants.1487387142.mch-key=OuvLIL93STqFhTngNaBGT8751ZJn4FKL
app.wechatpay.merchants.1487387142.key-file=classpath:napclient_cert.p12
app.wechatpay.merchants.1487387142.example-sub-merchant-id=117551742
Loading…
Cancel
Save