Class WechatPay2Credential

java.lang.Object
com.wechat.pay.java.core.auth.WechatPay2Credential
All Implemented Interfaces:
Credential

public final class WechatPay2Credential extends Object implements Credential
微信支付认证凭据生成器
  • Field Details

  • Constructor Details

    • WechatPay2Credential

      public WechatPay2Credential(String merchantId, Signer signer)
  • Method Details

    • getMerchantId

      public String getMerchantId()
      Description copied from interface: Credential
      获取商户号
      Specified by:
      getMerchantId in interface Credential
      Returns:
      商户号
    • getSchema

      public String getSchema()
      Description copied from interface: Credential
      获取认证类型
      Specified by:
      getSchema in interface Credential
      Returns:
      认证类型
    • getAuthorization

      public String getAuthorization(URI uri, String httpMethod, String signBody)
      Description copied from interface: Credential
      获取认证信息
      Specified by:
      getAuthorization in interface Credential
      Parameters:
      uri - 请求uri
      httpMethod - HTTP方法,GET、POST等
      signBody - 用于签名的请求体
      Returns:
      认证信息