Coder Social home page Coder Social logo

Comments (7)

xy-peng avatar xy-peng commented on June 11, 2024 1

我的建议是,不同的商户使用不同的回调路径,这样就能识别不同的商户了。例如,将商户号的摘要放到回调路径中。

from wechatpay-java.

wweiaixingxing avatar wweiaixingxing commented on June 11, 2024

其他方案 可以提供在CertificateProvider 接口 提供删除此 ConcurrentHashMap<BigInteger, X509Certificate> certificates =
new ConcurrentHashMap<>() 方法,重新构建支付参数不报错
RSAAutoCertificateConfig.Builder builder = new RSAAutoCertificateConfig.Builder();
//商户号
builder.merchantId(merchant.getMerchantNo())
.privateKey(merchant.getApiClientKey().split(",")[0])
.merchantSerialNumber(merchant.getMerchantSerialNo().split(",")[0])
//只能用pem
.apiV3Key(merchant.getApiKey())
.build();
//通过构造函数产生
beanDefinitionBuilder.addConstructorArgValue(builder);
// 注册bean
defaultListableBeanFactory.registerBeanDefinition(name, beanDefinitionBuilder.getRawBeanDefinition());

from wechatpay-java.

wweiaixingxing avatar wweiaixingxing commented on June 11, 2024

@xy-peng 多商户功能新增了吗?

from wechatpay-java.

xy-peng avatar xy-peng commented on June 11, 2024

一直是可以支持多个商户的,每个商户构造一个自己的 Config 即可。

你遇到了什么具体的问题吗?

from wechatpay-java.

hppx5456 avatar hppx5456 commented on June 11, 2024

服务商模式的支付回调// 如果已经初始化了 RSAAutoCertificateConfig,可直接使用
// 没有的话,则构造一个
NotificationConfig config = new RSAAutoCertificateConfig.Builder()
.merchantId(merchantId)
.privateKeyFromPath(privateKeyPath)
.merchantSerialNumber(merchantSerialNumber)
.apiV3Key(apiV3key)
.build();
这里需要merchantId,我的业务场景是服务商下的特约商户进行支付,那么回调的时候这个merchantId该传什么值呢,如果传特约商户的merchantId,这时我有多个特约商户又该怎么确定是那个呢

from wechatpay-java.

timber0725 avatar timber0725 commented on June 11, 2024

我的建议是,不同的商户使用不同的回调路径,这样就能识别不同的商户了。例如,将商户号的摘要放到回调路径中。

大牛我这里有一个问题 不好解决 是我的商户配置是从mysql中读取的 考虑的问题就是如果修改了去重新创建RSAAutoCertificateConfig 但问题就在于微信并没有提供更新配置信息的方法 现在无法更新 如果您有什么建议请联系我 xiaoGdeweixin99 微信 谢谢

from wechatpay-java.

xy-peng avatar xy-peng commented on June 11, 2024

@timber0725 请见 #202#194

from wechatpay-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.