diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f237378d..b21242f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,18 +8,18 @@ jobs: build: strategy: matrix: - java-version: [ 8, 11, 17 ] + java-version: [ 11, 17, 21 ] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java-version }} distribution: 'temurin' cache: 'gradle' - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Build with Gradle - run: ./gradlew build \ No newline at end of file + run: ./gradlew build diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6f42f908..8711c140 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: check-tag: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Regex Match id: regex-match run: | @@ -26,14 +26,14 @@ jobs: needs: [check-tag] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - java-version: '8' + java-version: '17' distribution: 'temurin' - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/actions/wrapper-validation@v3 # 发布项目 - name: Publish run: ./gradlew publish @@ -41,4 +41,4 @@ jobs: SONATYPE_NEXUS_USERNAME: ${{secrets.SONATYPE_NEXUS_USERNAME}} SONATYPE_NEXUS_PASSWORD: ${{secrets.SONATYPE_NEXUS_PASSWORD}} SIGNING_KEY: ${{secrets.SIGNING_KEY}} - SIGNING_PASSWORD: ${{secrets.SIGNING_PASSWORD}} \ No newline at end of file + SIGNING_PASSWORD: ${{secrets.SIGNING_PASSWORD}} diff --git a/.github/workflows/sonarcloud-scan.yml b/.github/workflows/sonarcloud-scan.yml index 706a2eb0..962b8316 100644 --- a/.github/workflows/sonarcloud-scan.yml +++ b/.github/workflows/sonarcloud-scan.yml @@ -9,27 +9,28 @@ on: - 'feat_*' - 'fix_*' - 'refactor_*' - + jobs: build: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: java-version: 17 + distribution: 'temurin' - name: Cache SonarCloud packages - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Gradle packages - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} diff --git a/buildSrc/src/main/groovy/common.gradle b/buildSrc/src/main/groovy/common.gradle index 41c9f8f3..c2f7e5f5 100644 --- a/buildSrc/src/main/groovy/common.gradle +++ b/buildSrc/src/main/groovy/common.gradle @@ -7,6 +7,9 @@ plugins { id "jacoco" } +sourceCompatibility = JavaVersion.VERSION_1_8 +targetCompatibility = JavaVersion.VERSION_1_8 + version projectPropVersion group projectPropGroup compileJava.options.encoding = "UTF-8" @@ -19,7 +22,7 @@ repositories { spotless { java { removeUnusedImports() - googleJavaFormat('1.7') + googleJavaFormat('1.22.0') } } diff --git a/core/build.gradle b/core/build.gradle index f5426359..f1c55c85 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -21,7 +21,7 @@ dependencies { implementation "org.slf4j:slf4j-api:${slf4jVersion}" testImplementation "junit:junit:${junitVersion}" - testImplementation "org.mockito:mockito-inline:${mockitoInlineVersion}" + testImplementation "org.mockito:mockito-core:${mockitoCoreVersion}" testImplementation "com.squareup.okhttp3:mockwebserver:${okhttpVersion}" testImplementation "org.awaitility:awaitility:${awaitilityVersion}" diff --git a/core/src/main/java/com/wechat/pay/java/core/AbstractRSAConfig.java b/core/src/main/java/com/wechat/pay/java/core/AbstractRSAConfig.java index 72e05787..0d58f3f9 100644 --- a/core/src/main/java/com/wechat/pay/java/core/AbstractRSAConfig.java +++ b/core/src/main/java/com/wechat/pay/java/core/AbstractRSAConfig.java @@ -51,14 +51,19 @@ protected AbstractRSAConfig( /** 商户号 */ private final String merchantId; + /** 商户私钥 */ private final PrivateKey privateKey; + /** 商户证书序列号 */ private final String merchantSerialNumber; + /** 微信支付平台证书Provider */ private final CertificateProvider certificateProvider; + /** 微信支付平台公钥 */ private final PublicKey publicKey; + /** 微信支付平台公钥Id */ private final String publicKeyId; diff --git a/core/src/main/java/com/wechat/pay/java/core/RSAPublicKeyConfig.java b/core/src/main/java/com/wechat/pay/java/core/RSAPublicKeyConfig.java index f5a1a223..cc73aef8 100644 --- a/core/src/main/java/com/wechat/pay/java/core/RSAPublicKeyConfig.java +++ b/core/src/main/java/com/wechat/pay/java/core/RSAPublicKeyConfig.java @@ -112,7 +112,6 @@ public RSAPublicKeyConfig build() { requireNonNull(publicKey); requireNonNull(publicKeyId); requireNonNull(privateKey); - requireNonNull(apiV3Key); requireNonNull(merchantSerialNumber); return new RSAPublicKeyConfig(this); diff --git a/core/src/main/java/com/wechat/pay/java/core/certificate/CertificateDownloader.java b/core/src/main/java/com/wechat/pay/java/core/certificate/CertificateDownloader.java index 46d226b3..ae5fa35d 100644 --- a/core/src/main/java/com/wechat/pay/java/core/certificate/CertificateDownloader.java +++ b/core/src/main/java/com/wechat/pay/java/core/certificate/CertificateDownloader.java @@ -6,6 +6,7 @@ import com.wechat.pay.java.core.certificate.model.DownloadCertificateResponse; import com.wechat.pay.java.core.certificate.model.EncryptCertificate; import com.wechat.pay.java.core.cipher.AeadCipher; +import com.wechat.pay.java.core.exception.ServiceException; import com.wechat.pay.java.core.http.Constant; import com.wechat.pay.java.core.http.HttpClient; import com.wechat.pay.java.core.http.HttpMethod; @@ -76,10 +77,17 @@ public Map download() { .addHeader(Constant.ACCEPT, " */*") .addHeader(Constant.CONTENT_TYPE, MediaType.APPLICATION_JSON.getValue()) .build(); - HttpResponse httpResponse = - httpClient.execute(httpRequest, DownloadCertificateResponse.class); - - return decryptCertificate(httpResponse); + try { + HttpResponse httpResponse = + httpClient.execute(httpRequest, DownloadCertificateResponse.class); + return decryptCertificate(httpResponse); + } catch (ServiceException e) { + // 如果证书不存在,可能是切换为平台公钥,该处不报错 + if (e.getErrorCode().equals("NOT_FOUND")) { + return new HashMap<>(); + } + throw e; + } } /** diff --git a/core/src/main/java/com/wechat/pay/java/core/cipher/AbstractVerifier.java b/core/src/main/java/com/wechat/pay/java/core/cipher/AbstractVerifier.java index 5ce17fce..4c99a7e0 100644 --- a/core/src/main/java/com/wechat/pay/java/core/cipher/AbstractVerifier.java +++ b/core/src/main/java/com/wechat/pay/java/core/cipher/AbstractVerifier.java @@ -40,6 +40,7 @@ protected AbstractVerifier(String algorithmName, CertificateProvider certificate * * @param algorithmName 获取Signature对象时指定的算法,例如SHA256withRSA * @param publicKey 验签使用的微信支付平台公钥,非空 + * @param publicKeyId 验签使用的微信支付平台公钥id */ protected AbstractVerifier(String algorithmName, PublicKey publicKey, String publicKeyId) { this.publicKey = requireNonNull(publicKey); @@ -48,6 +49,25 @@ protected AbstractVerifier(String algorithmName, PublicKey publicKey, String pub this.certificateProvider = null; } + /** + * AbstractVerifier 构造函数,仅在平台证书和平台公钥灰度切换阶段使用 + * + * @param algorithmName 获取Signature对象时指定的算法,例如SHA256withRSA + * @param publicKey 验签使用的微信支付平台公钥,非空 + * @param publicKeyId 验签使用的微信支付平台公钥id + * @param certificateProvider 验签使用的微信支付平台证书管理器,非空 + */ + protected AbstractVerifier( + String algorithmName, + PublicKey publicKey, + String publicKeyId, + CertificateProvider certificateProvider) { + this.publicKey = requireNonNull(publicKey); + this.publicKeyId = publicKeyId; + this.algorithmName = requireNonNull(algorithmName); + this.certificateProvider = requireNonNull(certificateProvider); + } + protected boolean verify(X509Certificate certificate, String message, String signature) { try { Signature sign = Signature.getInstance(algorithmName); @@ -87,15 +107,19 @@ public boolean verify(String serialNumber, String message, String signature) { if (serialNumber.equals(publicKeyId)) { return verify(message, signature); } - logger.error("publicKeyId[{}] and serialNumber[{}] are not equal", publicKeyId, serialNumber); - return false; + // 如果证书为空,则说明是传入的publicKeyId错误,如果不为空,则继续使用证书验签 + if (certificateProvider == null) { + logger.error( + "publicKeyId[{}] and serialNumber[{}] are not equal", publicKeyId, serialNumber); + return false; + } } // 使用证书验签 requireNonNull(certificateProvider); X509Certificate certificate = certificateProvider.getCertificate(serialNumber); if (certificate == null) { logger.error( - "Verify the signature and get the WechatPay certificate corresponding to " + "Verify the signature and get the WechatPay certificate or publicKey corresponding to " + "serialNumber[{}] is empty.", serialNumber); return false; diff --git a/core/src/main/java/com/wechat/pay/java/core/cipher/RSAVerifier.java b/core/src/main/java/com/wechat/pay/java/core/cipher/RSAVerifier.java index 1e28ab66..561e6691 100644 --- a/core/src/main/java/com/wechat/pay/java/core/cipher/RSAVerifier.java +++ b/core/src/main/java/com/wechat/pay/java/core/cipher/RSAVerifier.java @@ -15,4 +15,8 @@ public RSAVerifier(CertificateProvider provider) { public RSAVerifier(PublicKey publicKey, String publicKeyId) { super(SHA256WITHRSA, publicKey, publicKeyId); } + + public RSAVerifier(PublicKey publicKey, String publicKeyId, CertificateProvider provider) { + super(SHA256WITHRSA, publicKey, publicKeyId, provider); + } } diff --git a/core/src/main/java/com/wechat/pay/java/core/notification/AbstractNotificationConfig.java b/core/src/main/java/com/wechat/pay/java/core/notification/AbstractNotificationConfig.java index edc764f8..cd75994e 100644 --- a/core/src/main/java/com/wechat/pay/java/core/notification/AbstractNotificationConfig.java +++ b/core/src/main/java/com/wechat/pay/java/core/notification/AbstractNotificationConfig.java @@ -4,6 +4,7 @@ import com.wechat.pay.java.core.cipher.AeadCipher; import com.wechat.pay.java.core.cipher.RSAVerifier; import com.wechat.pay.java.core.cipher.Verifier; +import java.security.PublicKey; public abstract class AbstractNotificationConfig implements NotificationConfig { @@ -11,6 +12,8 @@ public abstract class AbstractNotificationConfig implements NotificationConfig { private final String cipherAlgorithm; private final CertificateProvider certificateProvider; private final AeadCipher aeadCipher; + private final PublicKey publicKey; + private final String publicKeyId; protected AbstractNotificationConfig( String signType, @@ -21,6 +24,37 @@ protected AbstractNotificationConfig( this.cipherAlgorithm = cipherAlgorithm; this.certificateProvider = certificateProvider; this.aeadCipher = aeadCipher; + this.publicKey = null; + this.publicKeyId = null; + } + + protected AbstractNotificationConfig( + String signType, + String cipherAlgorithm, + PublicKey publicKey, + String publicKeyId, + AeadCipher aeadCipher) { + this.signType = signType; + this.cipherAlgorithm = cipherAlgorithm; + this.publicKey = publicKey; + this.publicKeyId = publicKeyId; + this.aeadCipher = aeadCipher; + this.certificateProvider = null; + } + + protected AbstractNotificationConfig( + String signType, + String cipherAlgorithm, + CertificateProvider certificateProvider, + PublicKey publicKey, + String publicKeyId, + AeadCipher aeadCipher) { + this.signType = signType; + this.cipherAlgorithm = cipherAlgorithm; + this.publicKey = publicKey; + this.publicKeyId = publicKeyId; + this.aeadCipher = aeadCipher; + this.certificateProvider = certificateProvider; } @Override @@ -35,6 +69,12 @@ public String getCipherType() { @Override public Verifier createVerifier() { + if (publicKey != null && certificateProvider != null) { + return new RSAVerifier(publicKey, publicKeyId, certificateProvider); + } + if (publicKey != null) { + return new RSAVerifier(publicKey, publicKeyId); + } return new RSAVerifier(certificateProvider); } diff --git a/core/src/main/java/com/wechat/pay/java/core/notification/Constant.java b/core/src/main/java/com/wechat/pay/java/core/notification/Constant.java index 17a16baf..ce00750d 100644 --- a/core/src/main/java/com/wechat/pay/java/core/notification/Constant.java +++ b/core/src/main/java/com/wechat/pay/java/core/notification/Constant.java @@ -1,4 +1,5 @@ package com.wechat.pay.java.core.notification; + /** Notification 常量 */ public final class Constant { public static final String RSA_SIGN_TYPE = "WECHATPAY2-SHA256-RSA2048"; diff --git a/core/src/main/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfig.java b/core/src/main/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfig.java new file mode 100644 index 00000000..cc580bc6 --- /dev/null +++ b/core/src/main/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfig.java @@ -0,0 +1,94 @@ +package com.wechat.pay.java.core.notification; + +import static com.wechat.pay.java.core.notification.Constant.AES_CIPHER_ALGORITHM; +import static com.wechat.pay.java.core.notification.Constant.RSA_SIGN_TYPE; +import static java.util.Objects.requireNonNull; + +import com.wechat.pay.java.core.AbstractRSAConfigBuilder; +import com.wechat.pay.java.core.certificate.CertificateProvider; +import com.wechat.pay.java.core.certificate.RSAAutoCertificateProvider; +import com.wechat.pay.java.core.cipher.AeadAesCipher; +import com.wechat.pay.java.core.cipher.AeadCipher; +import com.wechat.pay.java.core.http.HttpClient; +import com.wechat.pay.java.core.util.PemUtil; +import java.nio.charset.StandardCharsets; +import java.security.PublicKey; + +/** 通知回调配置类 该类仅在商户由平台证书切换为平台公钥的灰度阶段使用,灰度完成后请切换为RSAPublicKeyNotificationConfig */ +public final class RSACombinedNotificationConfig extends AbstractNotificationConfig { + + private RSACombinedNotificationConfig( + CertificateProvider certificateProvider, + PublicKey publicKey, + String publicKeyId, + AeadCipher aeadAesCipher) { + super( + RSA_SIGN_TYPE, + AES_CIPHER_ALGORITHM, + certificateProvider, + publicKey, + publicKeyId, + aeadAesCipher); + } + + public static class Builder extends AbstractRSAConfigBuilder { + protected HttpClient httpClient; + protected byte[] apiV3Key; + + private PublicKey publicKey; + private String publicKeyId; + + public Builder apiV3Key(String apiV3Key) { + this.apiV3Key = apiV3Key.getBytes(StandardCharsets.UTF_8); + return this; + } + + public Builder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + public Builder publicKey(String publicKey) { + this.publicKey = PemUtil.loadPublicKeyFromString(publicKey); + return this; + } + + public Builder publicKey(PublicKey publicKey) { + this.publicKey = publicKey; + return this; + } + + public Builder publicKeyFromPath(String publicKeyPath) { + this.publicKey = PemUtil.loadPublicKeyFromPath(publicKeyPath); + return this; + } + + public Builder publicKeyId(String publicKeyId) { + this.publicKeyId = publicKeyId; + return this; + } + + @Override + protected Builder self() { + return this; + } + + public RSACombinedNotificationConfig build() { + + RSAAutoCertificateProvider.Builder builder = + new RSAAutoCertificateProvider.Builder() + .apiV3Key(requireNonNull(apiV3Key)) + .privateKey(requireNonNull(privateKey)) + .merchantId(requireNonNull(merchantId)) + .merchantSerialNumber(requireNonNull(merchantSerialNumber)); + if (httpClient != null) { + builder.httpClient(httpClient); + } + return new RSACombinedNotificationConfig( + builder.build(), + requireNonNull(publicKey), + requireNonNull(publicKeyId), + new AeadAesCipher(requireNonNull(apiV3Key))); + } + } +} diff --git a/core/src/main/java/com/wechat/pay/java/core/notification/RSANotificationConfig.java b/core/src/main/java/com/wechat/pay/java/core/notification/RSANotificationConfig.java index 1627b4d0..7edf9fcb 100644 --- a/core/src/main/java/com/wechat/pay/java/core/notification/RSANotificationConfig.java +++ b/core/src/main/java/com/wechat/pay/java/core/notification/RSANotificationConfig.java @@ -15,7 +15,11 @@ import java.util.Arrays; import java.util.List; -/** 签名类型为RSA的通知配置参数 */ +/** + * 通知回调配置类 + * + * @deprecated 请使用 RSAAutoCertificateConfig,开发者应尽快迁移,我们将在未来某个时间移除这段废弃的代码。 + */ public final class RSANotificationConfig extends AbstractNotificationConfig { private RSANotificationConfig(CertificateProvider certificateProvider, AeadCipher aeadCipher) { diff --git a/core/src/main/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfig.java b/core/src/main/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfig.java new file mode 100644 index 00000000..2277482b --- /dev/null +++ b/core/src/main/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfig.java @@ -0,0 +1,60 @@ +package com.wechat.pay.java.core.notification; + +import static com.wechat.pay.java.core.notification.Constant.AES_CIPHER_ALGORITHM; +import static com.wechat.pay.java.core.notification.Constant.RSA_SIGN_TYPE; +import static java.util.Objects.requireNonNull; + +import com.wechat.pay.java.core.cipher.AeadAesCipher; +import com.wechat.pay.java.core.cipher.AeadCipher; +import com.wechat.pay.java.core.util.PemUtil; +import java.nio.charset.StandardCharsets; +import java.security.PublicKey; + +/** 签名类型为RSA的通知配置参数 */ +public final class RSAPublicKeyNotificationConfig extends AbstractNotificationConfig { + + private RSAPublicKeyNotificationConfig( + PublicKey publicKey, String publicKeyId, AeadCipher aeadCipher) { + super(RSA_SIGN_TYPE, AES_CIPHER_ALGORITHM, publicKey, publicKeyId, aeadCipher); + } + + public static class Builder { + private byte[] apiV3Key; + + private PublicKey publicKey; + private String publicKeyId; + + public Builder publicKey(String publicKey) { + this.publicKey = PemUtil.loadPublicKeyFromString(publicKey); + return this; + } + + public Builder publicKey(PublicKey publicKey) { + this.publicKey = publicKey; + return this; + } + + public Builder publicKeyFromPath(String publicKeyPath) { + this.publicKey = PemUtil.loadPublicKeyFromPath(publicKeyPath); + return this; + } + + public Builder apiV3Key(String apiV3Key) { + this.apiV3Key = apiV3Key.getBytes(StandardCharsets.UTF_8); + return this; + } + + public Builder publicKeyId(String publicKeyId) { + this.publicKeyId = publicKeyId; + return this; + } + + public RSAPublicKeyNotificationConfig build() { + requireNonNull(publicKey); + requireNonNull(publicKeyId); + requireNonNull(apiV3Key); + return new RSAPublicKeyNotificationConfig( + publicKey, requireNonNull(publicKeyId), new AeadAesCipher(requireNonNull(apiV3Key))); + } + } +} diff --git a/core/src/test/java/com/wechat/pay/java/core/cipher/RSAVerifierTest.java b/core/src/test/java/com/wechat/pay/java/core/cipher/RSAVerifierTest.java index c76cb4f8..cdf41d32 100644 --- a/core/src/test/java/com/wechat/pay/java/core/cipher/RSAVerifierTest.java +++ b/core/src/test/java/com/wechat/pay/java/core/cipher/RSAVerifierTest.java @@ -18,6 +18,7 @@ public class RSAVerifierTest { private static Verifier certificateRsaVerifier; private static Verifier publicKeyRsaVerifier; private static final String MESSAGE = "message"; + /** signature为使用RSASigner和测试商户证书私钥对MESSAGE签名得到的结果 */ private static final SignatureResult SIGNATURE_RESULT = new SignatureResult( @@ -32,7 +33,8 @@ public static void init() { List list = new Vector<>(); list.add(MERCHANT_CERTIFICATE); certificateRsaVerifier = new RSAVerifier(new InMemoryCertificateProvider(list)); - publicKeyRsaVerifier = new RSAVerifier(WECHAT_PAY_PUBLIC_KEY, WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER); + publicKeyRsaVerifier = + new RSAVerifier(WECHAT_PAY_PUBLIC_KEY, WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER); } @Test diff --git a/core/src/test/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfigTest.java b/core/src/test/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfigTest.java new file mode 100644 index 00000000..657c07a9 --- /dev/null +++ b/core/src/test/java/com/wechat/pay/java/core/notification/RSACombinedNotificationConfigTest.java @@ -0,0 +1,137 @@ +package com.wechat.pay.java.core.notification; + +import static com.wechat.pay.java.core.model.TestConfig.API_V3_KEY; +import static com.wechat.pay.java.core.model.TestConfig.DOWNLOAD_CERTIFICATE_RESPONSE; +import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_CERTIFICATE_SERIAL_NUMBER; +import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_ID; +import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_PRIVATE_KEY; +import static com.wechat.pay.java.core.model.TestConfig.MERCHANT_PRIVATE_KEY_STRING; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY_PATH; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY_STRING; +import static java.net.HttpURLConnection.HTTP_OK; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import com.wechat.pay.java.core.auth.Validator; +import com.wechat.pay.java.core.auth.WechatPay2Credential; +import com.wechat.pay.java.core.cipher.RSASigner; +import com.wechat.pay.java.core.http.HttpClient; +import com.wechat.pay.java.core.http.HttpHeaders; +import com.wechat.pay.java.core.http.okhttp.OkHttpClientAdapter; +import com.wechat.pay.java.core.notification.RSACombinedNotificationConfig.Builder; +import java.util.stream.Stream; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Protocol; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +class RSACombinedNotificationConfigTest implements NotificationConfigTest { + static HttpClient httpClient; + + @BeforeAll + static void initHttpClient() { + Validator validator = + new Validator() { + @Override + public boolean validate(HttpHeaders responseHeaders, String body) { + return true; + } + }; + OkHttpClient okHttpClient = + new OkHttpClient.Builder() + .addInterceptor( + chain -> + new Response.Builder() + .request(chain.request()) + .code(HTTP_OK) + .header("key", "val") + .message("ok") + .protocol(Protocol.HTTP_1_1) + .body( + ResponseBody.create( + DOWNLOAD_CERTIFICATE_RESPONSE, + MediaType.parse( + com.wechat.pay.java.core.http.MediaType.APPLICATION_JSON + .getValue()))) + .build()) + .build(); + httpClient = + new OkHttpClientAdapter( + new WechatPay2Credential( + MERCHANT_ID, + new RSASigner(MERCHANT_CERTIFICATE_SERIAL_NUMBER, MERCHANT_PRIVATE_KEY)), + validator, + okHttpClient); + } + + @ParameterizedTest + @MethodSource("BuilderProvider") + void testConfigWithBuilderProvider(Builder builder) { + RSACombinedNotificationConfig c = builder.build(); + + assertNotNull(c); + assertNotNull(c.createAeadCipher()); + assertNotNull(c.createVerifier()); + assertNotNull(c.getCipherType()); + assertNotNull(c.getSignType()); + } + + static Stream BuilderProvider() { + return Stream.of( + // from string + new Builder() + .merchantId(MERCHANT_ID) + .privateKey(MERCHANT_PRIVATE_KEY_STRING) + .merchantSerialNumber(MERCHANT_CERTIFICATE_SERIAL_NUMBER) + .publicKey(WECHAT_PAY_PUBLIC_KEY_STRING) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .httpClient(httpClient) + .apiV3Key(API_V3_KEY), + + // from path + new Builder() + .merchantId(MERCHANT_ID) + .privateKey(MERCHANT_PRIVATE_KEY_STRING) + .merchantSerialNumber(MERCHANT_CERTIFICATE_SERIAL_NUMBER) + .publicKeyFromPath(WECHAT_PAY_PUBLIC_KEY_PATH) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .httpClient(httpClient) + .apiV3Key(API_V3_KEY), + + // with publickey + new Builder() + .merchantId(MERCHANT_ID) + .privateKey(MERCHANT_PRIVATE_KEY_STRING) + .merchantSerialNumber(MERCHANT_CERTIFICATE_SERIAL_NUMBER) + .publicKey(WECHAT_PAY_PUBLIC_KEY) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .httpClient(httpClient) + .apiV3Key(API_V3_KEY)); + } + + @Test + void testBuildConfigWithoutEnoughParam() { + Builder builder = new Builder().apiV3Key(API_V3_KEY); + assertThrows(NullPointerException.class, builder::build); + } + + @Override + public NotificationConfig buildNotificationConfig() { + return new Builder() + .merchantId(MERCHANT_ID) + .privateKey(MERCHANT_PRIVATE_KEY_STRING) + .merchantSerialNumber(MERCHANT_CERTIFICATE_SERIAL_NUMBER) + .publicKey(WECHAT_PAY_PUBLIC_KEY) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .apiV3Key(API_V3_KEY) + .httpClient(httpClient) + .build(); + } +} diff --git a/core/src/test/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfigTest.java b/core/src/test/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfigTest.java new file mode 100644 index 00000000..baaf8d5e --- /dev/null +++ b/core/src/test/java/com/wechat/pay/java/core/notification/RSAPublicKeyNotificationConfigTest.java @@ -0,0 +1,66 @@ +package com.wechat.pay.java.core.notification; + +import static com.wechat.pay.java.core.model.TestConfig.API_V3_KEY; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY_PATH; +import static com.wechat.pay.java.core.model.TestConfig.WECHAT_PAY_PUBLIC_KEY_STRING; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import com.wechat.pay.java.core.notification.RSAPublicKeyNotificationConfig.Builder; +import java.util.stream.Stream; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +class RSAPublicKeyNotificationConfigTest implements NotificationConfigTest { + + @ParameterizedTest + @MethodSource("BuilderProvider") + void testConfigWithBuilderProvider(Builder builder) { + RSAPublicKeyNotificationConfig c = builder.build(); + + assertNotNull(c); + assertNotNull(c.createAeadCipher()); + assertNotNull(c.createVerifier()); + assertNotNull(c.getCipherType()); + assertNotNull(c.getSignType()); + } + + static Stream BuilderProvider() { + return Stream.of( + // from string + new Builder() + .publicKey(WECHAT_PAY_PUBLIC_KEY_STRING) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .apiV3Key(API_V3_KEY), + + // from path + new Builder() + .publicKeyFromPath(WECHAT_PAY_PUBLIC_KEY_PATH) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .apiV3Key(API_V3_KEY), + + // with publickey + new Builder() + .publicKey(WECHAT_PAY_PUBLIC_KEY) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .apiV3Key(API_V3_KEY)); + } + + @Test + void testBuildConfigWithoutEnoughParam() { + Builder builder = new Builder().apiV3Key(API_V3_KEY); + assertThrows(NullPointerException.class, builder::build); + } + + @Override + public NotificationConfig buildNotificationConfig() { + return new Builder() + .publicKey(WECHAT_PAY_PUBLIC_KEY) + .publicKeyId(WECHAT_PAY_CERTIFICATE_SERIAL_NUMBER) + .apiV3Key(API_V3_KEY) + .build(); + } +} diff --git a/gradle.properties b/gradle.properties index f42e514b..3902fe8b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,8 +6,8 @@ junitVersion=4.13.2 junit5Version=5.9.1 okhttpVersion=4.10.0 gsonVersion=2.9.1 -mockitoInlineVersion=4.8.1 +mockitoCoreVersion=5.12.0 awaitilityVersion=4.2.0 -spotlessVersion=6.11.0 +spotlessVersion=6.25.0 shadowVersion=7.1.2 -sonarqubeVersion=4.0.0.2929 +sonarqubeVersion=5.0.0.4638 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049..48c0a02c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/service/src/example/java/com/wechat/pay/java/service/QuickStart.java b/service/src/example/java/com/wechat/pay/java/service/QuickStart.java index 5128f481..aa64b578 100644 --- a/service/src/example/java/com/wechat/pay/java/service/QuickStart.java +++ b/service/src/example/java/com/wechat/pay/java/service/QuickStart.java @@ -13,10 +13,13 @@ public class QuickStart { /** 商户号 */ public static String merchantId = ""; + /** 商户API私钥路径 */ public static String privateKeyPath = ""; + /** 商户证书序列号 */ public static String merchantSerialNumber = ""; + /** 商户APIV3密钥 */ public static String apiV3Key = ""; diff --git a/service/src/example/java/com/wechat/pay/java/service/billdownload/BillDownloadServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/billdownload/BillDownloadServiceExample.java index 4b96ee83..788aca14 100644 --- a/service/src/example/java/com/wechat/pay/java/service/billdownload/BillDownloadServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/billdownload/BillDownloadServiceExample.java @@ -14,10 +14,13 @@ public class BillDownloadServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -38,24 +41,28 @@ public static void main(String[] args) { service = new BillDownloadService.Builder().config(config).build(); // ... 调用接口 } + /** 申请资金账单API */ public static QueryBillEntity getFundFlowBill() { GetFundFlowBillRequest request = new GetFundFlowBillRequest(); return service.getFundFlowBill(request); } + /** 申请单个子商户资金账单API */ public static QueryEncryptBillEntity getSingleSubMchFundFlowBill() { GetSingleSubMchFundFlowBillRequest request = new GetSingleSubMchFundFlowBillRequest(); return service.getSingleSubMchFundFlowBill(request); } + /** 申请二级商户资金账单API */ public static QueryEncryptBillEntity getAllSubMchFundFlowBill() { GetAllSubMchFundFlowBillRequest request = new GetAllSubMchFundFlowBillRequest(); return service.getAllSubMchFundFlowBill(request); } + /** 申请交易账单API */ public static QueryBillEntity getTradeBill() { diff --git a/service/src/example/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingServiceExample.java index 8e1cb0b3..9142e3eb 100644 --- a/service/src/example/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingServiceExample.java @@ -26,10 +26,13 @@ public class BrandProfitSharingServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -51,49 +54,58 @@ public static void main(String[] args) { service = new BrandProfitSharingService.Builder().config(config).build(); // ... 调用接口 } + /** 查询最大分账比例 */ public static QueryBrandMerchantRatioResponse queryBrandMerchantRatio() { QueryBrandMerchantRatioRequest request = new QueryBrandMerchantRatioRequest(); return service.queryBrandMerchantRatio(request); } + /** 请求分账 */ public static CreateOrderResponse createOrder() { CreateOrderRequest request = new CreateOrderRequest(); return service.createOrder(request); } + /** 完结分账 */ public static FinishOrderResponse finishOrder() { FinishOrderRequest request = new FinishOrderRequest(); return service.finishOrder(request); } + /** 查询分账结果 */ public static QueryOrderResponse queryOrder() { QueryOrderRequest request = new QueryOrderRequest(); return service.queryOrder(request); } + /** 查询订单剩余待分金额 */ public static QueryOrderAmountResponse queryOrderAmount() { QueryOrderAmountRequest request = new QueryOrderAmountRequest(); return service.queryOrderAmount(request); } + /** 添加分账接收方 */ public static AddReceiverResponse addReceiver() { AddReceiverRequest request = new AddReceiverRequest(); return service.addReceiver(request); } + /** 删除分账接收方 */ public static DeleteReceiverResponse deleteReceiver() { DeleteReceiverRequest request = new DeleteReceiverRequest(); return service.deleteReceiver(request); } + /** 请求分账回退 */ public static CreateReturnOrderResponse createReturnOrder() { CreateReturnOrderRequest request = new CreateReturnOrderRequest(); return service.createReturnOrder(request); } + /** 查询分账回退结果 */ public static QueryReturnOrderResponse queryReturnOrder() { diff --git a/service/src/example/java/com/wechat/pay/java/service/cashcoupons/CashCouponsServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/cashcoupons/CashCouponsServiceExample.java index f7b4c1d6..4c61ed3b 100644 --- a/service/src/example/java/com/wechat/pay/java/service/cashcoupons/CashCouponsServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/cashcoupons/CashCouponsServiceExample.java @@ -40,10 +40,13 @@ public class CashCouponsServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -64,94 +67,110 @@ public static void main(String[] args) { service = new CashCouponsService.Builder().config(config).build(); // ... 调用接口 } + /** 查询代金券消息通知地址 */ public static Callback queryCallback() { QueryCallbackRequest request = new QueryCallbackRequest(); return service.queryCallback(request); } + /** 设置代金券消息通知地址 */ public static SetCallbackResponse setCallback() { SetCallbackRequest request = new SetCallbackRequest(); return service.setCallback(request); } + /** 根据过滤条件查询用户的券 */ public static CouponCollection listCouponsByFilter() { ListCouponsByFilterRequest request = new ListCouponsByFilterRequest(); return service.listCouponsByFilter(request); } + /** 查询代金券详情 */ public static Coupon queryCoupon() { QueryCouponRequest request = new QueryCouponRequest(); return service.queryCoupon(request); } + /** 发放指定批次的代金券 */ public static SendCouponResponse sendCoupon() { SendCouponRequest request = new SendCouponRequest(); return service.sendCoupon(request); } + /** 创建代金券批次 */ public static CreateCouponStockResponse createCouponStock() { CreateCouponStockRequest request = new CreateCouponStockRequest(); return service.createCouponStock(request); } + /** 查询代金券可用商户 */ public static AvailableMerchantCollection listAvailableMerchants() { ListAvailableMerchantsRequest request = new ListAvailableMerchantsRequest(); return service.listAvailableMerchants(request); } + /** 查询可核销商品编码 */ public static AvailableSingleitemCollection listAvailableSingleitems() { ListAvailableSingleitemsRequest request = new ListAvailableSingleitemsRequest(); return service.listAvailableSingleitems(request); } + /** 条件查询批次列表 */ public static StockCollection listStocks() { ListStocksRequest request = new ListStocksRequest(); return service.listStocks(request); } + /** 暂停批次 */ public static PauseStockResponse pauseStock() { PauseStockRequest request = new PauseStockRequest(); return service.pauseStock(request); } + /** 查询批次详情 */ public static Stock queryStock() { QueryStockRequest request = new QueryStockRequest(); return service.queryStock(request); } + /** 下载批次退款明细 */ public static RefundFlowResponse refundFlow() { RefundFlowRequest request = new RefundFlowRequest(); return service.refundFlow(request); } + /** 重启批次 */ public static RestartStockResponse restartStock() { RestartStockRequest request = new RestartStockRequest(); return service.restartStock(request); } + /** 激活开启批次 */ public static StartStockResponse startStock() { StartStockRequest request = new StartStockRequest(); return service.startStock(request); } + /** 终止批次 */ public static StopStockResponse stopStock() { StopStockRequest request = new StopStockRequest(); return service.stopStock(request); } + /** 下载批次核销明细 */ public static UseFlowResponse useFlow() { diff --git a/service/src/example/java/com/wechat/pay/java/service/certificate/CertificateServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/certificate/CertificateServiceExample.java index 284b32d4..99af1415 100644 --- a/service/src/example/java/com/wechat/pay/java/service/certificate/CertificateServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/certificate/CertificateServiceExample.java @@ -11,10 +11,13 @@ public class CertificateServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; diff --git a/service/src/example/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingServiceExample.java index e3b6f3ad..e4c3aa6b 100644 --- a/service/src/example/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingServiceExample.java @@ -28,10 +28,13 @@ public class EcommerceProfitSharingServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -53,54 +56,64 @@ public static void main(String[] args) { service = new EcommerceProfitSharingService.Builder().config(config).build(); // ... 调用接口 } + /** 请求售后服务分账 */ public static CreateAfterSalesOrderResponse createAfterSalesOrder() { CreateAfterSalesOrderRequest request = new CreateAfterSalesOrderRequest(); return service.createAfterSalesOrder(request); } + /** 请求分账 */ public static CreateOrderResponse createOrder() { CreateOrderRequest request = new CreateOrderRequest(); return service.createOrder(request); } + /** 完结分账 */ public static FinishOrderResponse finishOrder() { FinishOrderRequest request = new FinishOrderRequest(); return service.finishOrder(request); } + /** 查询售后服务分账结果 */ public static QueryAfterSalesOrderResponse queryAfterSalesOrder() { QueryAfterSalesOrderRequest request = new QueryAfterSalesOrderRequest(); return service.queryAfterSalesOrder(request); } + /** 查询分账结果 */ public static QueryOrderResponse queryOrder() { QueryOrderRequest request = new QueryOrderRequest(); return service.queryOrder(request); } + /** 查询订单剩余待分金额 */ public static QueryOrderAmountResponse queryOrderAmount() { QueryOrderAmountRequest request = new QueryOrderAmountRequest(); return service.queryOrderAmount(request); } + /** 添加分账接收方 */ public static AddReceiverResponse addReceiver() { AddReceiverRequest request = new AddReceiverRequest(); return service.addReceiver(request); } + /** 删除分账接收方 */ public static DeleteReceiverResponse deleteReceiver() { DeleteReceiverRequest request = new DeleteReceiverRequest(); return service.deleteReceiver(request); } + /** 请求分账回退 */ public static CreateReturnOrderResponse createReturnOrder() { CreateReturnOrderRequest request = new CreateReturnOrderRequest(); return service.createReturnOrder(request); } + /** 查询分账回退结果 */ public static QueryReturnOrderResponse queryReturnOrder() { diff --git a/service/src/example/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundServiceExample.java index 93eb1704..d7644363 100644 --- a/service/src/example/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundServiceExample.java @@ -16,10 +16,13 @@ public class EcommerceRefundServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -40,29 +43,34 @@ public static void main(String[] args) { service = new EcommerceRefundService.Builder().config(config).build(); // ... 调用接口 } + /** 申请退款 */ public static Refund4Create createRefund() { CreateRefundRequest request = new CreateRefundRequest(); return service.createRefund(request); } + /** 垫付退款回补 */ public static ReturnAdvance createReturnAdvance() { CreateReturnAdvanceRequest request = new CreateReturnAdvanceRequest(); return service.createReturnAdvance(request); } + /** 查询单笔退款(按微信支付退款单号) */ public static Refund queryRefund() { QueryRefundRequest request = new QueryRefundRequest(); return service.queryRefund(request); } + /** 查询单笔退款(按商户退款单号) */ public static Refund queryRefundByOutRefundNo() { QueryRefundByOutRefundNoRequest request = new QueryRefundByOutRefundNoRequest(); return service.queryRefundByOutRefundNo(request); } + /** 查询垫付回补结果 */ public static ReturnAdvance queryReturnAdvance() { diff --git a/service/src/example/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyServiceExample.java index 87b4abb1..6d3c03b7 100644 --- a/service/src/example/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyServiceExample.java @@ -14,10 +14,13 @@ public class EcommerceSubsidyServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -38,16 +41,19 @@ public static void main(String[] args) { service = new EcommerceSubsidyService.Builder().config(config).build(); // ... 调用接口 } + /** 取消补差 */ public static SubsidiesCancelEntity cancelSubsidy() { SubsidiesCancelRequest request = new SubsidiesCancelRequest(); return service.cancelSubsidy(request); } + /** 请求补差 */ public static SubsidiesCreateEntity createSubsidy() { SubsidiesCreateRequest request = new SubsidiesCreateRequest(); return service.createSubsidy(request); } + /** 请求补差回退 */ public static SubsidiesReturnEntity returnSubsidy() { SubsidiesReturnRequest request = new SubsidiesReturnRequest(); diff --git a/service/src/example/java/com/wechat/pay/java/service/file/FileUploadServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/file/FileUploadServiceExample.java index 6b648dd1..bb23684e 100644 --- a/service/src/example/java/com/wechat/pay/java/service/file/FileUploadServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/file/FileUploadServiceExample.java @@ -12,10 +12,13 @@ public class FileUploadServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; diff --git a/service/src/example/java/com/wechat/pay/java/service/giftactivity/GiftActivityServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/giftactivity/GiftActivityServiceExample.java index 0c078d96..dcd12627 100644 --- a/service/src/example/java/com/wechat/pay/java/service/giftactivity/GiftActivityServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/giftactivity/GiftActivityServiceExample.java @@ -24,10 +24,13 @@ public class GiftActivityServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -48,47 +51,55 @@ public static void main(String[] args) { service = new GiftActivityService.Builder().config(config).build(); // ... 调用接口 } + /** 新增活动发券商户号 */ public static AddActivityMerchantResponse addActivityMerchant() { AddActivityMerchantRequest request = new AddActivityMerchantRequest(); return service.addActivityMerchant(request); } + /** 创建全场满额送活动 */ public static CreateFullSendActResponse createFullSendAct() { CreateFullSendActRequest request = new CreateFullSendActRequest(); return service.createFullSendAct(request); } + /** 删除活动发券商户号 */ public static DeleteActivityMerchantResponse deleteActivityMerchant() { DeleteActivityMerchantRequest request = new DeleteActivityMerchantRequest(); return service.deleteActivityMerchant(request); } + /** 获取活动详情接口 */ public static GetActDetailResponse getActDetail() { GetActDetailRequest request = new GetActDetailRequest(); return service.getActDetail(request); } + /** 获取支付有礼活动列表 */ public static ListActivitiesResponse listActivities() { ListActivitiesRequest request = new ListActivitiesRequest(); return service.listActivities(request); } + /** 获取活动发券商户号 */ public static ListActMchResponse listActivityMerchant() { ListActivityMerchantRequest request = new ListActivityMerchantRequest(); return service.listActivityMerchant(request); } + /** 获取活动指定商品列表 */ public static ListActSkuResponse listActivitySku() { ListActivitySkuRequest request = new ListActivitySkuRequest(); return service.listActivitySku(request); } + /** 终止活动 */ public static TerminateActResponse terminateActivity() { diff --git a/service/src/example/java/com/wechat/pay/java/service/goldplan/GoldPlanServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/goldplan/GoldPlanServiceExample.java index c1b2bcc5..57c9e1d4 100644 --- a/service/src/example/java/com/wechat/pay/java/service/goldplan/GoldPlanServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/goldplan/GoldPlanServiceExample.java @@ -15,10 +15,13 @@ public class GoldPlanServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -39,26 +42,31 @@ public static void main(String[] args) { service = new GoldPlanService.Builder().config(config).build(); // ... 调用接口 } + /** 关闭广告展示 */ public static void closeAdvertisingShow() { CloseAdvertisingShowRequest request = new CloseAdvertisingShowRequest(); service.closeAdvertisingShow(request); } + /** 开通广告展示 */ public static void openAdvertisingShow() { OpenAdvertisingShowRequest request = new OpenAdvertisingShowRequest(); service.openAdvertisingShow(request); } + /** 同业过滤标签管理 */ public static void setAdvertisingIndustryFilter() { SetAdvertisingIndustryFilterRequest request = new SetAdvertisingIndustryFilterRequest(); service.setAdvertisingIndustryFilter(request); } + /** 商家小票管理 */ public static ChangeCustomPageStatusResponse changeCustomPageStatus() { ChangeCustomPageStatusRequest request = new ChangeCustomPageStatusRequest(); return service.changeCustomPageStatus(request); } + /** 点金计划管理 */ public static ChangeGoldPlanStatusResponse changeGoldPlanStatus() { ChangeGoldPlanStatusRequest request = new ChangeGoldPlanStatusRequest(); diff --git a/service/src/example/java/com/wechat/pay/java/service/lovefeast/LovefeastServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/lovefeast/LovefeastServiceExample.java index a28afa55..a4a2a4e9 100644 --- a/service/src/example/java/com/wechat/pay/java/service/lovefeast/LovefeastServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/lovefeast/LovefeastServiceExample.java @@ -14,10 +14,13 @@ public class LovefeastServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -38,18 +41,21 @@ public static void main(String[] args) { service = new LovefeastService.Builder().config(config).build(); // ... 调用接口 } + /** 查询爱心餐品牌信息 */ public static BrandEntity getBrand() { GetBrandRequest request = new GetBrandRequest(); return service.getBrand(request); } + /** 查询用户捐赠单详情 */ public static OrdersEntity getByUser() { GetByUserRequest request = new GetByUserRequest(); return service.getByUser(request); } + /** 查询用户捐赠单列表 */ public static OrdersListByUserResponse listByUser() { diff --git a/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExample.java index 77bedf35..3bad047d 100644 --- a/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExample.java @@ -10,10 +10,13 @@ public class MarketingBankPackagesServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -34,6 +37,7 @@ public static void main(String[] args) { service = new MarketingBankPackagesService.Builder().config(config).build(); // ... 调用接口 } + /** 查询上传任务列表 */ public static ListTaskResponse listTask() { diff --git a/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExtensionExample.java b/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExtensionExample.java index 53a7898b..ac12f860 100644 --- a/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExtensionExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesServiceExtensionExample.java @@ -11,10 +11,13 @@ public class MarketingBankPackagesServiceExtensionExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; diff --git a/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java index a4cc694e..3c20a1d4 100644 --- a/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponServiceExample.java @@ -53,10 +53,13 @@ public class MerchantExclusiveCouponServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -77,135 +80,159 @@ public static void main(String[] args) { service = new MerchantExclusiveCouponService.Builder().config(config).build(); // ... 调用接口 } + /** 查询预存code详情 */ public static CouponCodeInfoResponse couponCodeInfo() { CouponCodeInfoRequest request = new CouponCodeInfoRequest(); return service.couponCodeInfo(request); } + /** 创建商家券 */ public static CreateBusiFavorStockResponse createBusifavorStock() { CreateBusiFavorStockRequest request = new CreateBusiFavorStockRequest(); return service.createBusifavorStock(request); } + /** 删除预存code */ public static DeleteCouponCodeResponse deleteCouponCode() { DeleteCouponCodeRequest request = new DeleteCouponCodeRequest(); return service.deleteCouponCode(request); } + /** 修改批次预算 */ public static ModifyBudgetResponse modifyBudget() { ModifyBudgetRequest request = new ModifyBudgetRequest(); return service.modifyBudget(request); } + /** 修改商家券基本信息 */ public static void modifyStockInfo() { ModifyStockInfoRequest request = new ModifyStockInfoRequest(); service.modifyStockInfo(request); } + /** 查询预存code列表 */ public static CouponCodeListResponse queryCouponCodeList() { QueryCouponCodeListRequest request = new QueryCouponCodeListRequest(); return service.queryCouponCodeList(request); } + /** 查询商家券批次详情 */ public static StockGetResponse queryStock() { QueryStockRequest request = new QueryStockRequest(); return service.queryStock(request); } + /** 上传预存code */ public static UploadCouponCodeResponse uploadCouponCode() { UploadCouponCodeRequest request = new UploadCouponCodeRequest(); return service.uploadCouponCode(request); } + /** 获取商家券事件通知地址 */ public static GetCouponNotifyResponse getCouponNotify() { GetCouponNotifyRequest request = new GetCouponNotifyRequest(); return service.getCouponNotify(request); } + /** 设置商家券事件通知地址 */ public static SetCouponNotifyResponse setCouponNotify() { SetCouponNotifyRequest request = new SetCouponNotifyRequest(); return service.setCouponNotify(request); } + /** 关联订单信息 */ public static AssociateTradeInfoResponse associateTradeInfo() { AssociateTradeInfoRequest request = new AssociateTradeInfoRequest(); return service.associateTradeInfo(request); } + /** 使券失效 */ public static DeactivateCouponResponse deactivateCoupon() { DeactivateCouponRequest request = new DeactivateCouponRequest(); return service.deactivateCoupon(request); } + /** 取消关联订单信息 */ public static DisassociateTradeInfoResponse disassociateTradeInfo() { DisassociateTradeInfoRequest request = new DisassociateTradeInfoRequest(); return service.disassociateTradeInfo(request); } + /** 根据过滤条件查询用户的券 */ public static CouponListResponse listCouponsByFilter() { ListCouponsByFilterRequest request = new ListCouponsByFilterRequest(); return service.listCouponsByFilter(request); } + /** 查询用户券详情 */ public static CouponEntity queryCoupon() { QueryCouponRequest request = new QueryCouponRequest(); return service.queryCoupon(request); } + /** 申请退券 */ public static ReturnCouponResponse returnCoupon() { ReturnCouponRequest request = new ReturnCouponRequest(); return service.returnCoupon(request); } + /** 向用户发券 */ public static SendCouponResponse sendCoupon() { SendCouponRequest request = new SendCouponRequest(); return service.sendCoupon(request); } + /** 发放政府消费卡 */ public static CouponSendGovCardResponse sendGovCard() { SendGovCardRequest request = new SendGovCardRequest(); return service.sendGovCard(request); } + /** 核销用户的券 */ public static UseCouponResponse useCoupon() { UseCouponRequest request = new UseCouponRequest(); return service.useCoupon(request); } + /** 查询商家券营销补差付款单详情 */ public static SubsidyPayReceipt payReceiptInfo() { PayReceiptInfoRequest request = new PayReceiptInfoRequest(); return service.payReceiptInfo(request); } + /** 查询商家券营销补差付款单列表 */ public static SubsidyPayReceiptListResponse payReceiptList() { PayReceiptListRequest request = new PayReceiptListRequest(); return service.payReceiptList(request); } + /** 查询商家券营销补差回退单详情 */ public static SubsidyReturnReceipt returnReceiptInfo() { ReturnReceiptInfoRequest request = new ReturnReceiptInfoRequest(); return service.returnReceiptInfo(request); } + /** 商家券营销补差付款 */ public static SubsidyPayReceipt subsidyPay() { SubsidyPayRequest request = new SubsidyPayRequest(); return service.subsidyPay(request); } + /** 商家券营销补差回退 */ public static SubsidyReturnReceipt subsidyReturn() { SubsidyReturnRequest request = new SubsidyReturnRequest(); diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExample.java index 16417ee0..5f7ab833 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExample.java @@ -17,10 +17,13 @@ public class AppServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** APP支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtensionExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtensionExample.java index 1338934d..70b5dc75 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtensionExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtensionExample.java @@ -15,10 +15,13 @@ public class AppServiceExtensionExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -48,6 +51,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -56,6 +60,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** APP支付下单,并返回APP调起支付数据 */ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 微信开放平台审核通过的移动应用appid @@ -65,6 +70,7 @@ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 调用接口 return service.prepayWithRequestPayment(request, requestPaymentAppid); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/h5/H5ServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/h5/H5ServiceExample.java index 566ef666..8cb38f47 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/h5/H5ServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/h5/H5ServiceExample.java @@ -17,10 +17,13 @@ public class H5ServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** H5支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExample.java index 6988473d..9c1aa38d 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExample.java @@ -17,10 +17,13 @@ public class JsapiServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** JSAPI支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtensionExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtensionExample.java index 2af81e2a..f0f1a46e 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtensionExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtensionExample.java @@ -16,10 +16,13 @@ public class JsapiServiceExtensionExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -52,6 +55,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -60,6 +64,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** JSAPI支付下单,并返回JSAPI调起支付数据 */ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 商户申请的公众号对应的appid,由微信支付生成,可在公众号后台查看 @@ -70,6 +75,7 @@ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 调用接口 return service.prepayWithRequestPayment(request, requestPaymentAppid); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -78,6 +84,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayServiceExample.java index 0bdea72d..c5ca39c6 100644 --- a/service/src/example/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayServiceExample.java @@ -17,10 +17,13 @@ public class NativePayServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** Native支付预下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExample.java index fc4da34a..a025fb2b 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExample.java @@ -17,10 +17,13 @@ public class AppServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** APP支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExtensionExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExtensionExample.java index c5174149..11f8705f 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExtensionExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/app/AppServiceExtensionExample.java @@ -15,10 +15,13 @@ public class AppServiceExtensionExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -57,6 +60,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** APP支付下单,并返回APP调起支付数据 */ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { PrepayRequest request = new PrepayRequest(); @@ -64,6 +68,7 @@ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 调用接口 return service.prepayWithRequestPayment(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -72,6 +77,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/h5/H5ServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/h5/H5ServiceExample.java index f27b5cd4..6d076b8c 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/h5/H5ServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/h5/H5ServiceExample.java @@ -17,10 +17,13 @@ public class H5ServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** H5支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExample.java index 647609d6..158e2e25 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExample.java @@ -17,10 +17,13 @@ public class JsapiServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** JSAPI支付下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtensionExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtensionExample.java index 8d67ffac..7ef4aee1 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtensionExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtensionExample.java @@ -15,10 +15,13 @@ public class JsapiServiceExtensionExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -52,6 +55,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -60,6 +64,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** JSAPI支付下单,并返回JSAPI调起支付数据 */ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { PrepayRequest request = new PrepayRequest(); @@ -67,6 +72,7 @@ public static PrepayWithRequestPaymentResponse prepayWithRequestPayment() { // 调用接口 return service.prepayWithRequestPayment(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -75,6 +81,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payments/nativepay/NativePayServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/payments/nativepay/NativePayServiceExample.java index 30f2501a..4b77eeec 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payments/nativepay/NativePayServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payments/nativepay/NativePayServiceExample.java @@ -17,10 +17,13 @@ public class NativePayServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -50,6 +53,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 关闭订单 */ public static void closeOrder() { @@ -58,6 +62,7 @@ public static void closeOrder() { // 调用接口 service.closeOrder(request); } + /** Native支付预下单 */ public static PrepayResponse prepay() { PrepayRequest request = new PrepayRequest(); @@ -65,6 +70,7 @@ public static PrepayResponse prepay() { // 调用接口 return service.prepay(request); } + /** 微信支付订单号查询订单 */ public static Transaction queryOrderById() { @@ -73,6 +79,7 @@ public static Transaction queryOrderById() { // 调用接口 return service.queryOrderById(request); } + /** 商户订单号查询订单 */ public static Transaction queryOrderByOutTradeNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/payrollcard/PayrollCardServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/payrollcard/PayrollCardServiceExample.java index 5cb537b1..2f65aa05 100644 --- a/service/src/example/java/com/wechat/pay/java/service/payrollcard/PayrollCardServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/payrollcard/PayrollCardServiceExample.java @@ -22,10 +22,13 @@ public class PayrollCardServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -46,39 +49,46 @@ public static void main(String[] args) { service = new PayrollCardService.Builder().config(config).build(); // ... 调用接口 } + /** 获取核身结果 */ public static AuthenticationEntity getAuthentication() { GetAuthenticationRequest request = new GetAuthenticationRequest(); return service.getAuthentication(request); } + /** 查询核身记录 */ public static ListAuthenticationsResponse listAuthentications() { ListAuthenticationsRequest request = new ListAuthenticationsRequest(); return service.listAuthentications(request); } + /** 微工卡核身预下单 */ public static PreOrderAuthenticationResponse preOrderAuthentication() { PreOrderAuthenticationRequest request = new PreOrderAuthenticationRequest(); return service.preOrderAuthentication(request); } + /** 微工卡核身预下单(流程中完成授权) */ public static PreOrderAuthenticationWithAuthResponse preOrderAuthenticationWithAuth() { PreOrderAuthenticationWithAuthRequest request = new PreOrderAuthenticationWithAuthRequest(); return service.preOrderAuthenticationWithAuth(request); } + /** 查询微工卡授权关系 */ public static RelationEntity getRelation() { GetRelationRequest request = new GetRelationRequest(); return service.getRelation(request); } + /** 生成授权token */ public static TokenEntity createToken() { CreateTokenRequest request = new CreateTokenRequest(); return service.createToken(request); } + /** 发起批量转账 */ public static TransferBatchEntity createTransferBatch() { CreateTransferBatchRequest request = new CreateTransferBatchRequest(); diff --git a/service/src/example/java/com/wechat/pay/java/service/profitsharing/ProfitsharingServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/profitsharing/ProfitsharingServiceExample.java index 3a6db000..3217567c 100644 --- a/service/src/example/java/com/wechat/pay/java/service/profitsharing/ProfitsharingServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/profitsharing/ProfitsharingServiceExample.java @@ -25,10 +25,13 @@ public class ProfitsharingServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -49,55 +52,65 @@ public static void main(String[] args) { service = new ProfitsharingService.Builder().config(config).build(); // ... 调用接口 } + /** 获取分账账单文件下载地址 */ public static SplitBillResponse splitBill() { SplitBillRequest request = new SplitBillRequest(); return service.splitBill(request); } + /** 查询最大分账比例API */ public static QueryMerchantRatioResponse queryMerchantRatio() { QueryMerchantRatioRequest request = new QueryMerchantRatioRequest(); return service.queryMerchantRatio(request); } + /** 请求分账API */ public static OrdersEntity createOrder() { CreateOrderRequest request = new CreateOrderRequest(); return service.createOrder(request); } + /** 查询分账结果API */ public static OrdersEntity queryOrder() { QueryOrderRequest request = new QueryOrderRequest(); return service.queryOrder(request); } + /** 解冻剩余资金API */ public static OrdersEntity unfreezeOrder() { UnfreezeOrderRequest request = new UnfreezeOrderRequest(); return service.unfreezeOrder(request); } + /** 添加分账接收方API */ public static AddReceiverResponse addReceiver() { AddReceiverRequest request = new AddReceiverRequest(); return service.addReceiver(request); } + /** 删除分账接收方API */ public static DeleteReceiverResponse deleteReceiver() { DeleteReceiverRequest request = new DeleteReceiverRequest(); return service.deleteReceiver(request); } + /** 请求分账回退API */ public static ReturnOrdersEntity createReturnOrder() { CreateReturnOrderRequest request = new CreateReturnOrderRequest(); return service.createReturnOrder(request); } + /** 查询分账回退结果API */ public static ReturnOrdersEntity queryReturnOrder() { QueryReturnOrderRequest request = new QueryReturnOrderRequest(); return service.queryReturnOrder(request); } + /** 查询剩余待分金额API */ public static QueryOrderAmountResponse queryOrderAmount() { diff --git a/service/src/example/java/com/wechat/pay/java/service/refund/RefundServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/refund/RefundServiceExample.java index 014d52a0..d075c4e7 100644 --- a/service/src/example/java/com/wechat/pay/java/service/refund/RefundServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/refund/RefundServiceExample.java @@ -14,10 +14,13 @@ public class RefundServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -47,6 +50,7 @@ public static void main(String[] args) { // 调用e.getMessage()获取信息打印日志或上报监控,更多方法见MalformedMessageException定义 } } + /** 退款申请 */ public static Refund create() { CreateRequest request = new CreateRequest(); @@ -54,6 +58,7 @@ public static Refund create() { // 调用接口 return service.create(request); } + /** 查询单笔退款(通过商户退款单号) */ public static Refund queryByOutRefundNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/retailstore/RetailStoreServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/retailstore/RetailStoreServiceExample.java index 76e96a99..32d25ed5 100644 --- a/service/src/example/java/com/wechat/pay/java/service/retailstore/RetailStoreServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/retailstore/RetailStoreServiceExample.java @@ -32,10 +32,13 @@ public class RetailStoreServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -56,70 +59,82 @@ public static void main(String[] args) { service = new RetailStoreService.Builder().config(config).build(); // ... 调用接口 } + /** 门店报名品牌加价购活动 */ public static ApplyActivityResponse applyActivity() { ApplyActivityRequest request = new ApplyActivityRequest(); return service.applyActivity(request); } + /** 按区域查询品牌加价购活动 */ public static ListActsByAreaResponse listActsByArea() { ListActsByAreaRequest request = new ListActsByAreaRequest(); return service.listActsByArea(request); } + /** 锁定品牌加价购活动资格 */ public static LockQualificationResponse lockQualification() { LockQualificationRequest request = new LockQualificationRequest(); return service.lockQualification(request); } + /** 解锁品牌加价购活动资格 */ public static UnlockQualificationResponse unlockQualification() { UnlockQualificationRequest request = new UnlockQualificationRequest(); return service.unlockQualification(request); } + /** 添加零售小店活动业务代理 */ public static AddRepresentativesResponse addRepresentative() { AddRepresentativeRequest request = new AddRepresentativeRequest(); return service.addRepresentative(request); } + /** 添加小店活动门店 */ public static AddStoresResponse addStores() { AddStoresRequest request = new AddStoresRequest(); return service.addStores(request); } + /** 生成小店活动物料码 */ public static Materials createMaterials() { CreateMaterialsRequest request = new CreateMaterialsRequest(); return service.createMaterials(request); } + /** 删除零售小店活动业务代理 */ public static DeleteRepresentativeResponse deleteRepresentative() { DeleteRepresentativeRequest request = new DeleteRepresentativeRequest(); return service.deleteRepresentative(request); } + /** 删除小店活动门店 */ public static DeleteStoresResponse deleteStores() { DeleteStoresRequest request = new DeleteStoresRequest(); return service.deleteStores(request); } + /** 查询小店活动门店详情 */ public static RetailStoreInfo getStore() { GetStoreRequest request = new GetStoreRequest(); return service.getStore(request); } + /** 查询零售小店活动业务代理 */ public static ListRepresentativeResponse listRepresentative() { ListRepresentativeRequest request = new ListRepresentativeRequest(); return service.listRepresentative(request); } + /** 查询小店活动门店列表 */ public static ListStoreResponse listStore() { diff --git a/service/src/example/java/com/wechat/pay/java/service/transferbatch/TransferBatchServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/transferbatch/TransferBatchServiceExample.java index 5bfb3ced..aac3dd36 100644 --- a/service/src/example/java/com/wechat/pay/java/service/transferbatch/TransferBatchServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/transferbatch/TransferBatchServiceExample.java @@ -16,10 +16,13 @@ public class TransferBatchServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -41,29 +44,34 @@ public static void main(String[] args) { service = new TransferBatchService.Builder().config(config).build(); // ... 调用接口 } + /** 通过微信批次单号查询批次单 */ public static TransferBatchEntity getTransferBatchByNo() { GetTransferBatchByNoRequest request = new GetTransferBatchByNoRequest(); return service.getTransferBatchByNo(request); } + /** 通过商家批次单号查询批次单 */ public static TransferBatchEntity getTransferBatchByOutNo() { GetTransferBatchByOutNoRequest request = new GetTransferBatchByOutNoRequest(); return service.getTransferBatchByOutNo(request); } + /** 发起商家转账 */ public static InitiateBatchTransferResponse initiateBatchTransfer() { InitiateBatchTransferRequest request = new InitiateBatchTransferRequest(); return service.initiateBatchTransfer(request); } + /** 通过微信明细单号查询明细单 */ public static TransferDetailEntity getTransferDetailByNo() { GetTransferDetailByNoRequest request = new GetTransferDetailByNoRequest(); return service.getTransferDetailByNo(request); } + /** 通过商家明细单号查询明细单 */ public static TransferDetailEntity getTransferDetailByOutNo() { diff --git a/service/src/example/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideServiceExample.java index 778b9ec5..d0f5f46b 100644 --- a/service/src/example/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideServiceExample.java @@ -13,10 +13,13 @@ public class WeixinPayScanAndRideServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -37,17 +40,20 @@ public static void main(String[] args) { service = new WeixinPayScanAndRideService.Builder().config(config).build(); // ... 调用接口 } + /** 扣费受理 */ public static TransactionsEntity createTransaction() { CreateTransactionRequest request = new CreateTransactionRequest(); return service.createTransaction(request); } + /** 查询订单 */ public static TransactionsEntity queryTransaction() { QueryTransactionRequest request = new QueryTransactionRequest(); return service.queryTransaction(request); } + /** 查询用户服务可用信息 */ public static UserServiceEntity queryUserService() { diff --git a/service/src/example/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingServiceExample.java b/service/src/example/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingServiceExample.java index 1604e9f2..7e98dd64 100644 --- a/service/src/example/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingServiceExample.java +++ b/service/src/example/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingServiceExample.java @@ -15,10 +15,13 @@ public class WexinPayScoreParkingServiceExample { /** 商户号 */ public static String merchantId = "190000****"; + /** 商户API私钥路径 */ public static String privateKeyPath = "/Users/yourname/your/path/apiclient_key.pem"; + /** 商户证书序列号 */ public static String merchantSerialNumber = "5157F09EFDC096DE15EBE81A47057A72********"; + /** 商户APIV3密钥 */ public static String apiV3Key = "..."; @@ -39,22 +42,26 @@ public static void main(String[] args) { service = new WexinPayScoreParkingService.Builder().config(config).build(); // ... 调用接口 } + /** 创建停车入场 */ public static Parking createParking() { CreateParkingRequest request = new CreateParkingRequest(); return service.createParking(request); } + /** 查询车牌服务开通信息 */ public static PlateService queryPlateService() { QueryPlateServiceRequest request = new QueryPlateServiceRequest(); return service.queryPlateService(request); } + /** 扣费受理 */ public static Transaction createTransaction() { CreateTransactionRequest request = new CreateTransactionRequest(); return service.createTransaction(request); } + /** 查询订单 */ public static Transaction queryTransaction() { diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/BillDownloadService.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/BillDownloadService.java index 6d32aaef..78882caf 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/BillDownloadService.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/BillDownloadService.java @@ -54,6 +54,7 @@ private BillDownloadService( this.decryptor = requireNonNull(decryptor); } + /** BillDownloadService构造器 */ public static class Builder { @@ -131,6 +132,7 @@ public QueryBillEntity getFundFlowBill(GetFundFlowBillRequest request) { httpClient.execute(httpRequest, QueryBillEntity.class); return httpResponse.getServiceResponse(); } + /** * 申请单个子商户资金账单API * @@ -180,6 +182,7 @@ public QueryEncryptBillEntity getSingleSubMchFundFlowBill( httpClient.execute(httpRequest, QueryEncryptBillEntity.class); return httpResponse.getServiceResponse().cloneWithCipher(decryptor::decrypt); } + /** * 申请二级商户资金账单API * @@ -225,6 +228,7 @@ public QueryEncryptBillEntity getAllSubMchFundFlowBill(GetAllSubMchFundFlowBillR httpClient.execute(httpRequest, QueryEncryptBillEntity.class); return httpResponse.getServiceResponse().cloneWithCipher(decryptor::decrypt); } + /** * 申请交易账单API * diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/EncryptBillEntity.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/EncryptBillEntity.java index cc4bd1f5..3c80fa06 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/EncryptBillEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/EncryptBillEntity.java @@ -22,19 +22,24 @@ public class EncryptBillEntity { /** 账单文件序号 说明:账单文件序号,商户将多个文件按账单文件序号的顺序合并为完整的资金账单文件,起始值为1 */ @SerializedName("bill_sequence") private Long billSequence; + /** 哈希类型 说明:哈希类型 */ @SerializedName("hash_type") private HashType hashType; + /** 哈希值 说明:原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性。GCM算法加密的账单解密成功表示校验完整性通过。 */ @SerializedName("hash_value") private String hashValue; + /** 下载地址 说明:供下一步请求账单文件的下载地址,该地址5min内有效。 */ @SerializedName("download_url") private String downloadUrl; + /** 加密密钥 说明:加密账单文件使用的加密密钥。密钥用商户证书的公钥进行加密,然后进行Base64编码 */ @Encryption @SerializedName("encrypt_key") private String encryptKey; + /** 随机字符串 说明:加密账单文件使用的随机字符串 */ @SerializedName("nonce") private String nonce; diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetAllSubMchFundFlowBillRequest.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetAllSubMchFundFlowBillRequest.java index 8ec73137..c91617a7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetAllSubMchFundFlowBillRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetAllSubMchFundFlowBillRequest.java @@ -22,14 +22,17 @@ public class GetAllSubMchFundFlowBillRequest { @SerializedName("bill_date") @Expose(serialize = false) private String billDate; + /** 资金账户类型 说明:资金账户类型,本接口只支持填ALL */ @SerializedName("account_type") @Expose(serialize = false) private AccountType accountType; + /** 压缩类型 说明:压缩类型,不填则以不压缩的方式返回数据流 */ @SerializedName("tar_type") @Expose(serialize = false) private TarType tarType; + /** 账单文件加密算法 说明:账单文件加密算法 */ @SerializedName("algorithm") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetFundFlowBillRequest.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetFundFlowBillRequest.java index e5ee7ecf..5f50e322 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetFundFlowBillRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetFundFlowBillRequest.java @@ -22,10 +22,12 @@ public class GetFundFlowBillRequest { @SerializedName("bill_date") @Expose(serialize = false) private String billDate; + /** 资金账户类型 说明:资金账户类型,不填默认是BASIC */ @SerializedName("account_type") @Expose(serialize = false) private AccountType accountType; + /** 压缩格式 说明:压缩格式,不填则以不压缩的方式返回数据流 */ @SerializedName("tar_type") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetSingleSubMchFundFlowBillRequest.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetSingleSubMchFundFlowBillRequest.java index 4c5a1d6c..dcaafebd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetSingleSubMchFundFlowBillRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetSingleSubMchFundFlowBillRequest.java @@ -22,18 +22,22 @@ public class GetSingleSubMchFundFlowBillRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 账单日期 说明:账单日期,格式yyyy-MM-DD,仅支持三个月内的账单下载申请。 */ @SerializedName("bill_date") @Expose(serialize = false) private String billDate; + /** 资金账户类型 说明:资金账户类型 */ @SerializedName("account_type") @Expose(serialize = false) private AccountType accountType; + /** 账单文件加密算法 说明:账单文件加密算法 */ @SerializedName("algorithm") @Expose(serialize = false) private Algorithm algorithm; + /** 压缩格式 说明:压缩格式,不填则以不压缩的方式返回数据流 */ @SerializedName("tar_type") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetTradeBillRequest.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetTradeBillRequest.java index 28f55e96..f1f2d0b5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetTradeBillRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/GetTradeBillRequest.java @@ -22,14 +22,17 @@ public class GetTradeBillRequest { @SerializedName("bill_date") @Expose(serialize = false) private String billDate; + /** 子商户号 说明:若商户是直连商户: * 无需填写该字段 若商户是服务商: * 不填则默认返回服务商下的交易或退款数据 * 如需下载某个子商户下的交易或退款数据,则该字段必填 */ @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 账单类型 说明:账单类型,不填则默认是ALL */ @SerializedName("bill_type") @Expose(serialize = false) private BillType billType; + /** 压缩类型 说明:压缩类型,不填则以不压缩的方式返回数据流 */ @SerializedName("tar_type") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryBillEntity.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryBillEntity.java index 833b6a46..b82da2a9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryBillEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryBillEntity.java @@ -20,9 +20,11 @@ public class QueryBillEntity { /** 哈希类型 说明:哈希类型 */ @SerializedName("hash_type") private HashType hashType; + /** 哈希值 说明:原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性 */ @SerializedName("hash_value") private String hashValue; + /** 下载地址 说明:供下一步请求账单文件的下载地址,该地址5min内有效。 */ @SerializedName("download_url") private String downloadUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryEncryptBillEntity.java b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryEncryptBillEntity.java index 383edf4c..a5a25fb9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryEncryptBillEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/billdownload/model/QueryEncryptBillEntity.java @@ -24,6 +24,7 @@ public class QueryEncryptBillEntity { /** 下载信息总数 说明:下载信息总数 */ @SerializedName("download_bill_count") private Long downloadBillCount; + /** 下载信息明细 说明:下载信息明细 */ @Encryption @SerializedName("download_bill_list") diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingService.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingService.java index 42cad85f..6d91d518 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingService.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/BrandProfitSharingService.java @@ -66,6 +66,7 @@ private BrandProfitSharingService( this.hostName = hostName; this.encryptor = requireNonNull(encryptor); } + /** BrandProfitSharingService构造器 */ public static class Builder { @@ -136,6 +137,7 @@ public QueryBrandMerchantRatioResponse queryBrandMerchantRatio( httpClient.execute(httpRequest, QueryBrandMerchantRatioResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账 * @@ -168,6 +170,7 @@ public CreateOrderResponse createOrder(CreateOrderRequest request) { httpClient.execute(httpRequest, CreateOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 完结分账 * @@ -198,6 +201,7 @@ public FinishOrderResponse finishOrder(FinishOrderRequest request) { httpClient.execute(httpRequest, FinishOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询分账结果 * @@ -240,6 +244,7 @@ public QueryOrderResponse queryOrder(QueryOrderRequest request) { httpClient.execute(httpRequest, QueryOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询订单剩余待分金额 * @@ -276,6 +281,7 @@ public QueryOrderAmountResponse queryOrderAmount(QueryOrderAmountRequest request httpClient.execute(httpRequest, QueryOrderAmountResponse.class); return httpResponse.getServiceResponse(); } + /** * 添加分账接收方 * @@ -306,6 +312,7 @@ public AddReceiverResponse addReceiver(AddReceiverRequest request) { httpClient.execute(httpRequest, AddReceiverResponse.class); return httpResponse.getServiceResponse(); } + /** * 删除分账接收方 * @@ -336,6 +343,7 @@ public DeleteReceiverResponse deleteReceiver(DeleteReceiverRequest request) { httpClient.execute(httpRequest, DeleteReceiverResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账回退 * @@ -366,6 +374,7 @@ public CreateReturnOrderResponse createReturnOrder(CreateReturnOrderRequest requ httpClient.execute(httpRequest, CreateReturnOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询分账回退结果 * diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverRequest.java index 00c16873..d25416cd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverRequest.java @@ -21,18 +21,22 @@ public class AddReceiverRequest { /** 品牌主商户号 说明:品牌主商户号即绑定具体品牌的商户号,填写微信支付分配的商户号 */ @SerializedName("brand_mchid") private String brandMchid; + /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:品牌主的公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填 */ @SerializedName("sub_appid") private String subAppid; + /** * 接收方类型 说明:分账接收方类型,枚举值: 1. MERCHANT_ID:商户号(mch_id或者sub_mch_id) 2. * PERSONAL_OPENID:个人OpenID(由服务商的AppID转换得到) 3. PERSONAL_SUB_OPENID:个人OpenID(由品牌主的AppID转换得到) */ @SerializedName("type") private String type; + /** * 接收方账号 说明:分账接收方账号 1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. @@ -40,6 +44,7 @@ public class AddReceiverRequest { */ @SerializedName("account") private String account; + /** * 接收方名称 说明:分账接收方的名称。 1. 当type为MERCHANT_ID时,接收方名称必传,且为商户全称。 2. * 当type为PERSONAL_OPENID时,接收方名称选传,且为个人姓名。(传入该字段时需要进行校验。) 3. @@ -47,6 +52,7 @@ public class AddReceiverRequest { */ @SerializedName("name") private String name; + /** * 与品牌主的关系类型 说明:枚举值: - SUPPLIER:供应商 - DISTRIBUTOR:分销商 - SERVICE_PROVIDER:服务商 - PLATFORM:平台 - * STAFF:员工 - OTHERS:其他 diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverResponse.java index 0bf670ef..b908b0dd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/AddReceiverResponse.java @@ -21,12 +21,14 @@ public class AddReceiverResponse { /** 品牌主商户号 说明:品牌主商户号,即绑定具体品牌的商户号,填写微信支付分配的商户号。 */ @SerializedName("brand_mchid") private String brandMchid; + /** * 接收方类型 说明:分账接收方类型,枚举值: 1. MERCHANT_ID:商户号(mch_id或者sub_mch_id) 2. * PERSONAL_OPENID:个人OpenID(由服务商的AppID转换得到) 3. PERSONAL_SUB_OPENID:个人OpenID(由品牌主的AppID转换得到) */ @SerializedName("type") private String type; + /** * 接收方账号 说明:分账接收方账号 1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderRequest.java index 2d9b93ae..d1f74df0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderRequest.java @@ -25,28 +25,36 @@ public class CreateOrderRequest { /** 品牌主商户号 说明:品牌主商户号,填写微信支付分配的商户号 */ @SerializedName("brand_mchid") private String brandMchid; + /** 子商户号 说明:订单收款方商户号,可以是品牌主商户号,也可以是门店商户号,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:微信分配的子商户公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填 */ @SerializedName("sub_appid") private String subAppid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账接收方列表 说明:分账接收方列表,可以设置出资商户作为分账接受方,最多可有50个分账接收方 */ @Encryption @SerializedName("receivers") private List receivers = new ArrayList(); + /** 是否分账完成 说明:如果为true,则该笔订单剩余未分账的金额会解冻回分账方商户 如果为false,则该笔订单剩余未分账的金额不会解冻回分账方商户,可以对该笔订单再次进行分账 */ @SerializedName("finish") private Boolean finish; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderResponse.java index 047c1bc8..c38fe3fa 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateOrderResponse.java @@ -22,23 +22,29 @@ public class CreateOrderResponse { /** 品牌主商户号 说明:品牌主商户号,微信支付分配的商户号。 */ @SerializedName("brand_mchid") private String brandMchid; + /** 子商户号 说明:订单收款方商户号,可以是品牌主商户号,也可以是门店商户号,微信支付分配的商户号。 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** * 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次,只能是数字、大小写字母_-|*@。 */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 分账接收方列表 说明:分账接收方列表 */ @SerializedName("receivers") private List receivers; + /** 分账单状态 说明:分账单状态(每个接收方的分账结果请查看receivers中的result字段) */ @SerializedName("status") private SplitOrderStatus status; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderRequest.java index cc5e1804..aabb9bc8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderRequest.java @@ -21,24 +21,30 @@ public class CreateReturnOrderRequest { /** 子商户号 说明:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识。微信分账单号和商户分账单号二选一填写 */ @SerializedName("order_id") private String orderId; + /** * 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。微信分账单号和商户分账单号二选一填写 * 取值范围:[0-9a-zA-Z_*@-] */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 */ @SerializedName("out_return_no") private String outReturnNo; + /** 回退商户号 说明:分账回退的出资商户,只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** 回退描述 说明:分账回退的原因描述 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderResponse.java index cc4a35da..38a43ed0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/CreateReturnOrderResponse.java @@ -21,24 +21,31 @@ public class CreateReturnOrderResponse { /** 子商户号 说明:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号。 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:参考请求参数 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:参考请求参数 */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 只能是数字、大小写字母_-*@ ,同一回退单号多次请求等同一次。 */ @SerializedName("out_return_no") private String outReturnNo; + /** 回退商户号 说明:回退商户号只能填写原分账请求中接收分账的商户号。 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** 微信回退单号 说明:微信分账回退单号,微信系统返回的唯一标识 */ @SerializedName("return_no") private String returnNo; + /** * 回退结果 * 说明:如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果。如果返回为处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险。在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败 @@ -46,12 +53,14 @@ public class CreateReturnOrderResponse { */ @SerializedName("result") private String result; + /** * 失败原因 说明:回退失败的原因,此字段仅回退结果为FAIL时存在,枚举值: - ACCOUNT_ABNORMAL:原分账接收方账户异常 - TIME_OUT_CLOSED:超时关单 - * PAYER_ACCOUNT_ABNORMAL: 原分账分出方账户异常 */ @SerializedName("fail_reason") private String failReason; + /** * 完成时间 说明:分账回退完成时间,遵循RFC3339标准格式,格式为 * yyyy-MM-DDTHH:mm:ss.sss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss.sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverRequest.java index 1c8405eb..c01013be 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverRequest.java @@ -21,18 +21,22 @@ public class DeleteReceiverRequest { /** 品牌主商户号 说明:品牌主商户号,即绑定具体品牌的商户号,填写微信支付分配的商户号 */ @SerializedName("brand_mchid") private String brandMchid; + /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:品牌主的公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填 */ @SerializedName("sub_appid") private String subAppid; + /** * 接收方类型 说明:分账接收方类型,枚举值: 1. MERCHANT_ID:商户号(mch_id或者sub_mch_id) 2. * PERSONAL_OPENID:个人OpenID(由服务商的AppID转换得到) 3. PERSONAL_SUB_OPENID:个人OpenID(由品牌主的AppID转换得到) */ @SerializedName("type") private String type; + /** * 接收方账号 说明:分账接收方账号 1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverResponse.java index bc8c19cb..8c45120d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/DeleteReceiverResponse.java @@ -21,12 +21,14 @@ public class DeleteReceiverResponse { /** 品牌主商户号 说明:品牌主商户号,即绑定具体品牌的商户号,填写微信支付分配的商户号。 */ @SerializedName("brand_mchid") private String brandMchid; + /** * 接收方类型 说明:分账接收方类型,枚举值: 1. MERCHANT_ID:商户ID 2. PERSONAL_OPENID:个人OpenID(由父商户AppID转换得到) 3. * PERSONAL_SUB_OPENID:个人OpenID(由品牌主的AppID转换得到) */ @SerializedName("type") private String type; + /** * 接收方账号 说明:分账接收方账号 1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderRequest.java index 05153ed6..eb35b2b3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderRequest.java @@ -21,15 +21,19 @@ public class FinishOrderRequest { /** 子商户号 说明:订单收款方商户号,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderResponse.java index 3ebbf582..61c5cd6e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/FinishOrderResponse.java @@ -21,14 +21,17 @@ public class FinishOrderResponse { /** 子商户号 说明:订单收款方商户号,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** * 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次,只能是数字、大小写字母_-|*@。 */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryBrandMerchantRatioResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryBrandMerchantRatioResponse.java index fb40c73b..3a39d594 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryBrandMerchantRatioResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryBrandMerchantRatioResponse.java @@ -21,6 +21,7 @@ public class QueryBrandMerchantRatioResponse { /** 品牌商户号 说明:分账出资的品牌商户号,填写微信支付分配的商户号 */ @SerializedName("brand_mchid") private String brandMchid; + /** 最大分账比例 说明:品牌商户允许父商户分账的最大比例,单位万分比,比如2000表示20% */ @SerializedName("max_ratio") private Long maxRatio; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderAmountResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderAmountResponse.java index 215d9e77..a885e8a4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderAmountResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderAmountResponse.java @@ -21,6 +21,7 @@ public class QueryOrderAmountResponse { /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 订单剩余待分金额 说明:订单剩余待分金额,整数,单元为分 */ @SerializedName("unsplit_amount") private Long unsplitAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderRequest.java index a7cef148..9af28c89 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderRequest.java @@ -23,10 +23,12 @@ public class QueryOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次 */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderResponse.java index 82420e6d..192f380d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryOrderResponse.java @@ -23,26 +23,33 @@ public class QueryOrderResponse { /** 子商户号 说明:订单收款方商户号,可以是品牌主商户号,也可以是门店商户号,填写微信支付分配的商户号。 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** * 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次,只能是数字、大小写字母_-|*@。 */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 分账单状态 说明:分账单状态(每个接收方的分账结果请查看receivers中的result字段),枚举值: - PROCESSING:处理中 - FINISHED:分账完成 */ @SerializedName("status") private String status; + /** 分账接收方列表 说明:分账接收方列表 */ @SerializedName("receivers") private List receivers = new ArrayList(); + /** 分账完结金额 说明:分账完结的分账金额,单位为分, 仅当查询分账完结的执行结果时,存在本字段 */ @SerializedName("finish_amount") private Long finishAmount; + /** 分账完结描述 说明:分账完结的原因描述,仅当查询分账完结的执行结果时,存在本字段 */ @SerializedName("finish_description") private String finishDescription; diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderRequest.java index 054cf9b7..a7125989 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderRequest.java @@ -23,14 +23,17 @@ public class QueryReturnOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 商户回退单号 说明:调用回退接口提供的商户系统内部的回退单号 */ @SerializedName("out_return_no") @Expose(serialize = false) private String outReturnNo; + /** 微信分账单号 说明:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 微信分账单号与商户分账单号二选一填写 */ @SerializedName("order_id") @Expose(serialize = false) private String orderId; + /** 商户分账单号 说明:原发起分账请求时使用的商户系统内部的分账单号。微信分账单号与商户分账单号二选一填写 */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderResponse.java index c0ebe505..5783d257 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/QueryReturnOrderResponse.java @@ -21,24 +21,31 @@ public class QueryReturnOrderResponse { /** 子商户号 说明:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:原发起分账请求时使用的商户后台系统内部的分账单号。 */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:调用回退接口提供的商户系统内部的回退单号 */ @SerializedName("out_return_no") private String outReturnNo; + /** 微信回退单号 说明:微信分账回退单号,微信系统返回的唯一标识 */ @SerializedName("return_no") private String returnNo; + /** 回退商户号 说明:只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数 */ @SerializedName("amount") private Long amount; + /** * 回退结果 * 说明:如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果。如果查询到回退结果在处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险。在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败。 @@ -46,12 +53,14 @@ public class QueryReturnOrderResponse { */ @SerializedName("result") private String result; + /** * 失败原因 说明:失败原因。包含以下枚举值: 1. ACCOUNT_ABNORMAL : 原分账接收方账户异常 2. TIME_OUT_CLOSED : 超时关单 3. * PAYER_ACCOUNT_ABNORMAL : 原分账分出方账户异常 4. INVALID_REQUEST : 描述参数设置失败 */ @SerializedName("fail_reason") private String failReason; + /** * 完成时间 说明:分账回退完成时间,遵循RFC3339标准格式,格式为 * yyyy-MM-DDTHH:mm:ss.sss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss.sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverEntity.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverEntity.java index d2f16be5..56420b6c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverEntity.java @@ -26,6 +26,7 @@ public class ReceiverEntity { */ @SerializedName("type") private String type; + /** * 分账接收方账号 说明:分账接收方账号 1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. @@ -33,12 +34,15 @@ public class ReceiverEntity { */ @SerializedName("account") private String account; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** * 分账个人接收方姓名 说明:可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID时,是个人姓名的密文(选传,传则校验) 此字段的加密的方式为: 2、使用微信支付平台证书中的公钥 3、使用RSAES-OAEP算法进行加密 diff --git a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverResultEntity.java b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverResultEntity.java index 8a3d1b5e..1f77808a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverResultEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/brandprofitsharing/model/ReceiverResultEntity.java @@ -24,6 +24,7 @@ public class ReceiverResultEntity { */ @SerializedName("type") private String type; + /** * 接收方账号 说明:1. 分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号(mch_id或者sub_mch_id) 2. * 分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人OpenID(由服务商的AppID转换得到) 3. @@ -31,15 +32,19 @@ public class ReceiverResultEntity { */ @SerializedName("account") private String account; + /** 分账金额 说明:分账金额,单位为分,只能为整数 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 分账结果 说明:枚举值: - PENDING:待分账 - SUCCESS:分账成功 - CLOSED:已关闭 */ @SerializedName("result") private String result; + /** * 分账完成时间 说明:分账完成时间,遵循RFC3339标准格式,格式为 * yyyy-MM-DDTHH:mm:ss.sss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss.sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -47,6 +52,7 @@ public class ReceiverResultEntity { */ @SerializedName("finish_time") private String finishTime; + /** * 分账失败原因 说明:分账失败原因。包含以下枚举值: 1. ACCOUNT_ABNORMAL : 分账接收账户异常 2. NO_RELATION : 分账关系已解除 3. * RECEIVER_HIGH_RISK : 高风险接收方 4. RECEIVER_REAL_NAME_NOT_VERIFIED : 接收方未实名 5. NO_AUTH : 分账权限已解除 6. @@ -55,6 +61,7 @@ public class ReceiverResultEntity { */ @SerializedName("fail_reason") private String failReason; + /** 分账明细单号 说明:微信分账明细单号,每笔分账业务执行的明细单号,可与资金账单对账使用 */ @SerializedName("detail_id") private String detailId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/CashCouponsService.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/CashCouponsService.java index 6cacd9fe..9daf2cdc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/CashCouponsService.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/CashCouponsService.java @@ -75,6 +75,7 @@ private CashCouponsService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** CashCouponsService构造器 */ public static class Builder { @@ -137,6 +138,7 @@ public Callback queryCallback(QueryCallbackRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Callback.class); return httpResponse.getServiceResponse(); } + /** * 设置代金券消息通知地址 * @@ -167,6 +169,7 @@ public SetCallbackResponse setCallback(SetCallbackRequest request) { httpClient.execute(httpRequest, SetCallbackResponse.class); return httpResponse.getServiceResponse(); } + /** * 根据过滤条件查询用户的券 * @@ -227,6 +230,7 @@ public CouponCollection listCouponsByFilter(ListCouponsByFilterRequest request) httpClient.execute(httpRequest, CouponCollection.class); return httpResponse.getServiceResponse(); } + /** * 查询代金券详情 * @@ -269,6 +273,7 @@ public Coupon queryCoupon(QueryCouponRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Coupon.class); return httpResponse.getServiceResponse(); } + /** * 发放指定批次的代金券 * @@ -303,6 +308,7 @@ public SendCouponResponse sendCoupon(SendCouponRequest request) { httpClient.execute(httpRequest, SendCouponResponse.class); return httpResponse.getServiceResponse(); } + /** * 创建代金券批次 * @@ -333,6 +339,7 @@ public CreateCouponStockResponse createCouponStock(CreateCouponStockRequest requ httpClient.execute(httpRequest, CreateCouponStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询代金券可用商户 * @@ -379,6 +386,7 @@ public AvailableMerchantCollection listAvailableMerchants(ListAvailableMerchants httpClient.execute(httpRequest, AvailableMerchantCollection.class); return httpResponse.getServiceResponse(); } + /** * 查询可核销商品编码 * @@ -425,6 +433,7 @@ public AvailableSingleitemCollection listAvailableSingleitems( httpClient.execute(httpRequest, AvailableSingleitemCollection.class); return httpResponse.getServiceResponse(); } + /** * 条件查询批次列表 * @@ -476,6 +485,7 @@ public StockCollection listStocks(ListStocksRequest request) { httpClient.execute(httpRequest, StockCollection.class); return httpResponse.getServiceResponse(); } + /** * 暂停批次 * @@ -510,6 +520,7 @@ public PauseStockResponse pauseStock(PauseStockRequest request) { httpClient.execute(httpRequest, PauseStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询批次详情 * @@ -548,6 +559,7 @@ public Stock queryStock(QueryStockRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Stock.class); return httpResponse.getServiceResponse(); } + /** * 下载批次退款明细 * @@ -582,6 +594,7 @@ public RefundFlowResponse refundFlow(RefundFlowRequest request) { httpClient.execute(httpRequest, RefundFlowResponse.class); return httpResponse.getServiceResponse(); } + /** * 重启批次 * @@ -617,6 +630,7 @@ public RestartStockResponse restartStock(RestartStockRequest request) { httpClient.execute(httpRequest, RestartStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 激活开启批次 * @@ -651,6 +665,7 @@ public StartStockResponse startStock(StartStockRequest request) { httpClient.execute(httpRequest, StartStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 终止批次 * @@ -685,6 +700,7 @@ public StopStockResponse stopStock(StopStockRequest request) { httpClient.execute(httpRequest, StopStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 下载批次核销明细 * diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableMerchantCollection.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableMerchantCollection.java index c4354352..f78de619 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableMerchantCollection.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableMerchantCollection.java @@ -21,15 +21,19 @@ public class AvailableMerchantCollection { /** 可用商户总数量 说明:可用商户总数量 */ @SerializedName("total_count") private Integer totalCount; + /** 可用商户列表 说明:可用商户列表 */ @SerializedName("data") private List data; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Integer offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Integer limit; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableSingleitemCollection.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableSingleitemCollection.java index 3d39c1fa..a12d237e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableSingleitemCollection.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/AvailableSingleitemCollection.java @@ -21,15 +21,19 @@ public class AvailableSingleitemCollection { /** 可用单品编码总数 说明:可用单品编码总数 */ @SerializedName("total_count") private Integer totalCount; + /** 可用单品编码 说明:可用单品编码 */ @SerializedName("data") private List data; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Integer offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Integer limit; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Callback.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Callback.java index beb42c30..0b3bf9c4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Callback.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Callback.java @@ -20,6 +20,7 @@ public class Callback { /** 通知地址 说明:通知地址 */ @SerializedName("notify_url") private String notifyUrl; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CardLimitation.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CardLimitation.java index 6cbb181f..b6284ac2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CardLimitation.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CardLimitation.java @@ -22,6 +22,7 @@ public class CardLimitation { /** 指定银行卡名字 说明:当批次指定支付方式为银行卡且配置了指定银行卡信息,该字段必填,最多4个中文字符。并将在微信支付收银台中展示给用户。 */ @SerializedName("name") private String name; + /** 指定银行卡BIN 说明:当批次指定支付方式为银行卡且配置了指定银行卡信息,该字段必填,按json格式。特殊规则:单个卡BIN的字符长度为[6,9],条目个数限制为[1,10] */ @SerializedName("bin") private List bin = new ArrayList(); diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Coupon.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Coupon.java index af4dd85f..be940029 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Coupon.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Coupon.java @@ -20,39 +20,51 @@ public class Coupon { /** 创建批次的商户号 说明:微信为创建方商户分配的商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次号 说明:批次id */ @SerializedName("stock_id") private String stockId; + /** 单品优惠特定信息 说明:单品优惠特定信息 */ @SerializedName("cut_to_message") private CutTypeMsg cutToMessage; + /** 代金券名称 说明:代金券名称 */ @SerializedName("coupon_name") private String couponName; + /** 代金券状态 说明:代金券状态:SENDED-可用,USED-已实扣,EXPIRED-已过期 */ @SerializedName("status") private String status; + /** 使用说明 说明:代金券描述说明字段 */ @SerializedName("description") private String description; + /** 领券时间 说明:领券时间 */ @SerializedName("create_time") private String createTime; + /** 券类型 说明:NORMAL-满减券;CUT_TO-减至券 */ @SerializedName("coupon_type") private String couponType; + /** 是否无资金流 说明:true-是;false-否 */ @SerializedName("no_cash") private Boolean noCash; + /** 可用开始时间 说明:可用开始时间 */ @SerializedName("available_begin_time") private String availableBeginTime; + /** 可用结束时间 说明:可用结束时间 */ @SerializedName("available_end_time") private String availableEndTime; + /** 是否单品优惠 说明:TRUE-是;FALSE-否 */ @SerializedName("singleitem") private Boolean singleitem; + /** 满减券信息 说明:普通满减券面额、门槛信息 */ @SerializedName("normal_coupon_information") private FixedValueStockMsg normalCouponInformation; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponCollection.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponCollection.java index a95f30e0..a286400d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponCollection.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponCollection.java @@ -21,12 +21,15 @@ public class CouponCollection { /** 结果集 说明:结果集 */ @SerializedName("data") private List data; + /** 查询结果总数 说明:查询结果总数 */ @SerializedName("total_count") private Integer totalCount; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Integer limit; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Integer offset; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponRule.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponRule.java index 44b7fdf1..3b3aabc5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CouponRule.java @@ -21,30 +21,39 @@ public class CouponRule { /** 券生效时间 说明:需要指定领取后延时生效可选填 */ @SerializedName("coupon_available_time") private FavorAvailableTime couponAvailableTime; + /** 固定面额满减券使用规则 说明:stock_type为NORMAL时必填 */ @SerializedName("fixed_normal_coupon") private FixedValueStockMsg fixedNormalCoupon; + /** 订单优惠标记 说明:订单优惠标记 */ @SerializedName("goods_tag") private List goodsTag; + /** 指定支付模式 说明:支付方式 */ @SerializedName("trade_type") private List tradeType; + /** 是否可叠加其他优惠 说明:true-是;false-否 */ @SerializedName("combine_use") private Boolean combineUse; + /** 可核销商品编码 说明:可核销商品编码 */ @SerializedName("available_items") private List availableItems; + /** 不参与优惠商品编码 说明:不参与优惠商品编码 */ @SerializedName("unavailable_items") private List unavailableItems; + /** 可核销商户号 说明:可核销商户号 */ @SerializedName("available_merchants") private List availableMerchants; + /** 指定卡信息 说明:当批次指定支付方式为某张银行卡时才生效,可选的 */ @SerializedName("limit_card") private CardLimitation limitCard; + /** * 指定支付方式 说明:限定该批次的指定支付方式,如零钱、指定银行卡等,需填入支付方式编码, 条目个数限制为[1,1] 。当前支持的支付方式,及其编码枚举值,请参考该文档: * https://docs.qq.com/sheet/DWGpMbWx3b1JCbldy?c=E3A0A0 diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockRequest.java index 61857e3f..a620e252 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockRequest.java @@ -20,36 +20,47 @@ public class CreateCouponStockRequest { /** 批次名称 说明:批次名称 */ @SerializedName("stock_name") private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息 */ @SerializedName("comment") private String comment; + /** 归属商户号 说明:批次归属商户号 */ @SerializedName("belong_merchant") private String belongMerchant; + /** 开始时间 说明:批次开始时间 */ @SerializedName("available_begin_time") private String availableBeginTime; + /** 结束时间 说明:批次结束时间 */ @SerializedName("available_end_time") private String availableEndTime; + /** 发放规则 说明:批次使用规则 */ @SerializedName("stock_use_rule") private StockRule stockUseRule; + /** 样式设置 说明:代金券详情页 */ @SerializedName("pattern_info") private PatternInfo patternInfo; + /** 核销规则 说明: */ @SerializedName("coupon_use_rule") private CouponRule couponUseRule; + /** 是否无资金流 说明:是否无资金流,true-是;false-否 */ @SerializedName("no_cash") private Boolean noCash; + /** 批次类型 说明:批次类型,NORMAL-固定面额满减券批次;DISCOUNT-折扣券批次;EXCHAHGE-换购券批次;RANDOM-千人千面券批次 */ @SerializedName("stock_type") private String stockType; + /** 商户单据号 说明:商户创建批次凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** 扩展属性 说明:扩展属性字段,按json格式,暂时无需填写 */ @SerializedName("ext_info") private String extInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockResponse.java index 02503895..c22b65f8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CreateCouponStockResponse.java @@ -20,6 +20,7 @@ public class CreateCouponStockResponse { /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; + /** 创建时间 说明:创建时间 */ @SerializedName("create_time") private String createTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CutTypeMsg.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CutTypeMsg.java index 68e644dd..ac35ec75 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CutTypeMsg.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/CutTypeMsg.java @@ -20,6 +20,7 @@ public class CutTypeMsg { /** 可用优惠的商品最高单价 说明:可用优惠的商品最高单价,单位分 */ @SerializedName("single_price_max") private Long singlePriceMax; + /** 减至后的优惠单价 说明:减至后的优惠单价 */ @SerializedName("cut_to_price") private Long cutToPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FavorAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FavorAvailableTime.java index c75303ae..67467781 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FavorAvailableTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FavorAvailableTime.java @@ -20,9 +20,11 @@ public class FavorAvailableTime { /** 固定时间段可用 说明:固定时间段可用 */ @SerializedName("fix_available_time") private FixedAvailableTime fixAvailableTime; + /** 领取第二天生效 说明:true-是;false-否 */ @SerializedName("second_day_available") private Boolean secondDayAvailable; + /** 领取后有效时间 说明:领取后有效时间,单位分钟 */ @SerializedName("available_time_after_receive") private Integer availableTimeAfterReceive; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedAvailableTime.java index 901509fb..8f80666c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedAvailableTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedAvailableTime.java @@ -21,9 +21,11 @@ public class FixedAvailableTime { /** 可用星期数 说明:0-周日;1-周一;以此类推 */ @SerializedName("available_week_day") private List availableWeekDay; + /** 当天开始时间 说明:当天开始时间,单位秒 */ @SerializedName("begin_time") private Integer beginTime; + /** 当天结束时间 说明:当天结束时间,单位秒,默认为23点59分59秒 */ @SerializedName("end_time") private Integer endTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedValueStockMsg.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedValueStockMsg.java index 34e97bc8..88326517 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedValueStockMsg.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FixedValueStockMsg.java @@ -20,6 +20,7 @@ public class FixedValueStockMsg { /** 面额 说明:面额,单位分 */ @SerializedName("coupon_amount") private Long couponAmount; + /** 门槛 说明:使用券金额门槛,单位分 */ @SerializedName("transaction_minimum") private Long transactionMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FormFile.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FormFile.java index a27515f7..7d6c6643 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FormFile.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/FormFile.java @@ -20,9 +20,11 @@ public class FormFile { /** filename */ @SerializedName("filename") private String filename; + /** contentType */ @SerializedName("content_type") private String contentType; + /** content */ @SerializedName("content") private String content; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ImageMeta.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ImageMeta.java index e6384fef..66fcd3b5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ImageMeta.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ImageMeta.java @@ -20,6 +20,7 @@ public class ImageMeta { /** 文件名称 说明:商户上传的媒体图片的名称,商户自定义,必须以JPG、BMP、PNG为后缀。 */ @SerializedName("filename") private String filename; + /** 文件摘要 说明:图片文件的文件摘要,即对图片文件的二进制内容进行sha256计算得到的值。 */ @SerializedName("sha256") private String sha256; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableMerchantsRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableMerchantsRequest.java index ba8c9c30..9bde5eb2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableMerchantsRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableMerchantsRequest.java @@ -22,14 +22,17 @@ public class ListAvailableMerchantsRequest { @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 分页大小 说明:分页大小,最大50 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") @Expose(serialize = false) private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableSingleitemsRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableSingleitemsRequest.java index 4c93477d..7e0b62ed 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableSingleitemsRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListAvailableSingleitemsRequest.java @@ -22,14 +22,17 @@ public class ListAvailableSingleitemsRequest { @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 分页大小 说明:分页大小,最大100 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") @Expose(serialize = false) private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListCouponsByFilterRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListCouponsByFilterRequest.java index 9e6f3256..aa8ca421 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListCouponsByFilterRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListCouponsByFilterRequest.java @@ -22,6 +22,7 @@ public class ListCouponsByFilterRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** * 公众账号ID * 说明:微信为发券方商户分配的公众账号ID,接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)。 @@ -29,30 +30,37 @@ public class ListCouponsByFilterRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 批次号 说明:批次号,是否指定批次号查询,填写available_mchid,该字段不生效 */ @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 券状态 说明:代金券状态:SENDED-可用,USED-已实扣,填写available_mchid,该字段不生效 */ @SerializedName("status") @Expose(serialize = false) private String status; + /** 创建批次的商户号 说明:批次创建方商户号。创建批次的商户号,批次发放商户号,可用商户号三个参数,任意选填一个。 */ @SerializedName("creator_mchid") @Expose(serialize = false) private String creatorMchid; + /** 批次发放商户号 说明:批次发放商户号。创建批次的商户号,批次发放商户号,可用商户号三个参数,任意选填一个。 */ @SerializedName("sender_mchid") @Expose(serialize = false) private String senderMchid; + /** 可用商户号 说明:可用商户号。 创建批次的商户号,批次发放商户号,可用商户号三个参数,任意选填一个。 */ @SerializedName("available_mchid") @Expose(serialize = false) private String availableMchid; + /** 分页页码 说明:分页页码,默认0,填写available_mchid,该字段不生效 */ @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 分页大小 说明:分页大小,默认20,填写available_mchid,该字段不生效 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListStocksRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListStocksRequest.java index c37e849c..ae2a659f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListStocksRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ListStocksRequest.java @@ -22,22 +22,27 @@ public class ListStocksRequest { @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 分页大小 说明:分页大小,最大10 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") @Expose(serialize = false) private String stockCreatorMchid; + /** 起始时间 说明:起始创建时间 */ @SerializedName("create_start_time") @Expose(serialize = false) private String createStartTime; + /** 终止时间 说明:终止创建时间 */ @SerializedName("create_end_time") @Expose(serialize = false) private String createEndTime; + /** 批次状态 说明:批次状态: unactivated-未激活;audit-审核中;running-运行中;stoped-已停止;paused-暂停发放 */ @SerializedName("status") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/MediaImageRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/MediaImageRequest.java index 87988a5d..cab1e5d0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/MediaImageRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/MediaImageRequest.java @@ -20,6 +20,7 @@ public class MediaImageRequest { /** 图片文件 说明:将媒体图片进行二进制转换,得到的媒体图片二进制内容,在请求body中上传此二进制内容。媒体图片只支持JPG、BMP、PNG格式,文件大小不能超过2M。 */ @SerializedName("file") private FormFile file; + /** 媒体文件元信息 说明: */ @SerializedName("meta") private ImageMeta meta; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantRequest.java index 858babf9..55d11b00 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantRequest.java @@ -21,9 +21,11 @@ public class ModifyAvailableMerchantRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 增加可用商户列表 说明:增加可用商户列表 */ @SerializedName("add_mchid_list") private List addMchidList; + /** 删除可用商户列表 说明:删除可用商户列表 */ @SerializedName("delete_mchid_list") private List deleteMchidList; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantResponse.java index 9e73825c..66b149e6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableMerchantResponse.java @@ -20,6 +20,7 @@ public class ModifyAvailableMerchantResponse { /** 生效时间 说明:生效时间 */ @SerializedName("effect_time") private String effectTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemRequest.java index 708916aa..18d782fd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemRequest.java @@ -21,9 +21,11 @@ public class ModifyAvailableSingleitemRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 增加商品编码列表 说明:增加单品编码列表 */ @SerializedName("add_goods_id_list") private List addGoodsIdList; + /** 删除商品编码列表 说明:删除单品编码列表 */ @SerializedName("delete_goods_id_list") private List deleteGoodsIdList; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemResponse.java index 43c1f4f2..659f8b15 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyAvailableSingleitemResponse.java @@ -20,6 +20,7 @@ public class ModifyAvailableSingleitemResponse { /** 生效时间 说明:生效时间 */ @SerializedName("effect_time") private String effectTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetRequest.java index 872d82f7..131d9300 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetRequest.java @@ -20,9 +20,11 @@ public class ModifyStockBudgetRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 目标预算金额 说明:预算修改目标额度,单位分 */ @SerializedName("target_max_amount") private Long targetMaxAmount; + /** 当前预算金额 说明:当前预算额度,单位分 */ @SerializedName("current_max_amount") private Long currentMaxAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetResponse.java index e1b89d3f..1de353d4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/ModifyStockBudgetResponse.java @@ -20,6 +20,7 @@ public class ModifyStockBudgetResponse { /** 总预算 说明:批次预算额度,单位分 */ @SerializedName("max_amount") private Long maxAmount; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PatternInfo.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PatternInfo.java index ac56db00..393b1e81 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PatternInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PatternInfo.java @@ -20,18 +20,23 @@ public class PatternInfo { /** 使用说明 说明:用于说明详细的活动规则,会展示在代金券详情页 */ @SerializedName("description") private String description; + /** 商户logo 说明:商户logo */ @SerializedName("merchant_logo") private String merchantLogo; + /** 商户名称 说明:商户名称 */ @SerializedName("merchant_name") private String merchantName; + /** 背景颜色 说明:背景颜色 */ @SerializedName("background_color") private BackgroundColor backgroundColor; + /** 券详情图片 说明:券详情图片 */ @SerializedName("coupon_image") private String couponImage; + /** * 卡包跳转目标 说明:枚举值:PAYMENT_CODE:跳转至微信支付付款码,点击“立即使用”跳转至微信支付付款码 * MINI_PROGRAM:跳转至小程序,点击“立即使用”跳转至配置的商家小程序(需要指定小程序appid和path) DEFAULT_PAGE:跳转至默认页, 点击“立即使用”跳转至默认页面 @@ -39,9 +44,11 @@ public class PatternInfo { */ @SerializedName("jump_target") private JumpTarget jumpTarget; + /** 小程序appid 说明:跳转的小程序appid,跳转至小程序时必填。跳转的小程序appid需至少和一个可核销商户有绑定关系。 */ @SerializedName("mini_program_appid") private String miniProgramAppid; + /** 小程序path 说明:跳转的小程序path,跳转至小程序时必填。 */ @SerializedName("mini_program_path") private String miniProgramPath; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockRequest.java index a17c359a..cd095363 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockRequest.java @@ -21,6 +21,7 @@ public class PauseStockRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockResponse.java index e63f3084..48b08ff1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/PauseStockResponse.java @@ -23,6 +23,7 @@ public class PauseStockResponse { */ @SerializedName("pause_time") private String pauseTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryCouponRequest.java index 4c4071da..721a8cd3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryCouponRequest.java @@ -22,6 +22,7 @@ public class QueryCouponRequest { @SerializedName("coupon_id") @Expose(serialize = false) private String couponId; + /** * 公众账号ID * 说明:微信为发券方商户分配的公众账号ID,接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)。 @@ -29,6 +30,7 @@ public class QueryCouponRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 用户openid 说明:Openid信息,用户在appid下的唯一标识 */ @SerializedName("openid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryStockRequest.java index c4394afb..815bf151 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/QueryStockRequest.java @@ -22,6 +22,7 @@ public class QueryStockRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 创建批次的商户号 说明:批次创建时的商户号 */ @SerializedName("stock_creator_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RefundFlowResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RefundFlowResponse.java index fb2ca524..be2fe467 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RefundFlowResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RefundFlowResponse.java @@ -20,9 +20,11 @@ public class RefundFlowResponse { /** 下载链接 说明:流水文件下载链接,30s内有效 */ @SerializedName("url") private String url; + /** 安全校验码 说明:文件内容的哈希值,防止篡改 */ @SerializedName("hash_value") private String hashValue; + /** 哈希算法类型 说明:哈希算法类型,目前支持sha1 */ @SerializedName("hash_type") private String hashType; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockRequest.java index c61d070c..cafa2473 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockRequest.java @@ -21,6 +21,7 @@ public class RestartStockRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockResponse.java index 5d404ffd..539b90a7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/RestartStockResponse.java @@ -20,6 +20,7 @@ public class RestartStockResponse { /** 生效时间 说明:生效时间 */ @SerializedName("restart_time") private String restartTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponBody.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponBody.java index c4b97faa..818374f4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponBody.java @@ -20,21 +20,26 @@ public class SendCouponBody { /** 批次id 说明:微信为每个批次分配的唯一id */ @SerializedName("stock_id") private String stockId; + /** 商户单据号 说明:商户此次发放凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 公众账号ID * 说明:微信为发券方商户分配的公众账号ID,接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)。 */ @SerializedName("appid") private String appid; + /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 指定面额发券,面额 说明:指定面额发券场景,券面额,其他场景不需要填,单位分 */ @SerializedName("coupon_value") private Long couponValue; + /** 指定面额发券,券门槛 说明:指定面额发券批次门槛,其他场景不需要,单位分 */ @SerializedName("coupon_minimum") private Long couponMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponRequest.java index a7f15d64..f86f58a9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SendCouponRequest.java @@ -21,25 +21,31 @@ public class SendCouponRequest { /** 批次id 说明:微信为每个批次分配的唯一id */ @SerializedName("stock_id") private String stockId; + /** 用户openid 说明:Openid信息,用户在appid下的唯一标识 */ @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 商户单据号 说明:商户此次发放凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 公众账号ID * 说明:微信为发券方商户分配的公众账号ID,接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)。 */ @SerializedName("appid") private String appid; + /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 指定面额发券,面额 说明:指定面额发券场景,券面额,其他场景不需要填,单位分 */ @SerializedName("coupon_value") private Long couponValue; + /** 指定面额发券,券门槛 说明:指定面额发券批次门槛,其他场景不需要,单位分 */ @SerializedName("coupon_minimum") private Long couponMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackRequest.java index f327c19e..32f573ce 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackRequest.java @@ -20,9 +20,11 @@ public class SetCallbackRequest { /** 商户号 说明:微信支付商户号 */ @SerializedName("mchid") private String mchid; + /** 通知url地址 说明:支付通知商户url地址 */ @SerializedName("notify_url") private String notifyUrl; + /** 回调开关 说明:true-开启推送;false-停止推送 */ @SerializedName("switch") private Boolean _switch; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackResponse.java index b053ee76..70719b17 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/SetCallbackResponse.java @@ -20,6 +20,7 @@ public class SetCallbackResponse { /** 修改时间 说明:修改时间 */ @SerializedName("update_time") private String updateTime; + /** 通知地址 说明:通知地址 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockRequest.java index 36159e45..99d4a389 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockRequest.java @@ -21,6 +21,7 @@ public class StartStockRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockResponse.java index 6cd5f22c..7aede86a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StartStockResponse.java @@ -23,6 +23,7 @@ public class StartStockResponse { */ @SerializedName("start_time") private String startTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Stock.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Stock.java index 045d749e..91b6a961 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Stock.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/Stock.java @@ -20,51 +20,67 @@ public class Stock { /** 批次号 说明:批次id */ @SerializedName("stock_id") private String stockId; + /** 批次创建方商户号 说明:微信为创建方商户分配的商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次名称 说明:批次名称 */ @SerializedName("stock_name") private String stockName; + /** 批次状态 说明:批次状态: unactivated-未激活;audit-审核中;running-运行中;stoped-已停止;paused-暂停发放 */ @SerializedName("status") private String status; + /** 创建时间 说明:批次创建时间 */ @SerializedName("create_time") private String createTime; + /** 使用说明 说明:批次描述信息 */ @SerializedName("description") private String description; + /** 满减券批次使用规则 说明:普通发券批次特定信息 */ @SerializedName("stock_use_rule") private StockUseRule stockUseRule; + /** 可用开始时间 说明:可用开始时间 */ @SerializedName("available_begin_time") private String availableBeginTime; + /** 可用结束时间 说明:可用结束时间 */ @SerializedName("available_end_time") private String availableEndTime; + /** 已发券数量 说明:已发券数量 */ @SerializedName("distributed_coupons") private Integer distributedCoupons; + /** 是否无资金流 说明:是否无资金流,ture-是;false-否 */ @SerializedName("no_cash") private Boolean noCash; + /** 激活批次的时间 说明:批次激活开启时间 */ @SerializedName("start_time") private String startTime; + /** 终止批次的时间 说明:批次永久停止时间 */ @SerializedName("stop_time") private String stopTime; + /** 减至批次特定信息 说明:单品优惠特定信息 */ @SerializedName("cut_to_message") private CutTypeMsg cutToMessage; + /** 是否单品优惠 说明:true-是;false-否 */ @SerializedName("singleitem") private Boolean singleitem; + /** 批次类型 说明:NORMAL-代金券批次;DISCOUNT_CUT-立减与折扣;OTHER-其他 */ @SerializedName("stock_type") private String stockType; + /** 卡包ID 说明:微信卡包ID */ @SerializedName("card_id") private String cardId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockCollection.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockCollection.java index ed9a49d4..00f896e2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockCollection.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockCollection.java @@ -21,12 +21,15 @@ public class StockCollection { /** 批次总数 说明:命中查询条件总数量 */ @SerializedName("total_count") private Long totalCount; + /** 批次详情 说明:批次详情 */ @SerializedName("data") private List data; + /** 分页大小 说明:分页大小,最大10 */ @SerializedName("limit") private Integer limit; + /** 分页页码 说明:页码从0开始,默认第0页 */ @SerializedName("offset") private Integer offset; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockRule.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockRule.java index 47ac1cd1..c28475f0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockRule.java @@ -20,18 +20,23 @@ public class StockRule { /** 发放总上限 说明:最大发券数 */ @SerializedName("max_coupons") private Long maxCoupons; + /** 总预算 说明:总消耗金额,单位分 */ @SerializedName("max_amount") private Long maxAmount; + /** 单天发放上限金额 说明:单天最高消耗金额,单位分 */ @SerializedName("max_amount_by_day") private Long maxAmountByDay; + /** 单个用户可领个数 说明:单个用户可领个数 */ @SerializedName("max_coupons_per_user") private Integer maxCouponsPerUser; + /** 是否开启自然人限制 说明:true-是;false-否,默认否 */ @SerializedName("natural_person_limit") private Boolean naturalPersonLimit; + /** api发券防刷 说明:true-是;false-否,默认否 */ @SerializedName("prevent_api_abuse") private Boolean preventApiAbuse; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockUseRule.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockUseRule.java index 68a56197..2ebd4521 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockUseRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StockUseRule.java @@ -21,27 +21,35 @@ public class StockUseRule { /** 发放总上限 说明:最大发券数 */ @SerializedName("max_coupons") private Long maxCoupons; + /** 总预算 说明:总消耗金额,单位分 */ @SerializedName("max_amount") private Long maxAmount; + /** 单天发放上限金额 说明:单天最高消耗金额,单位分 */ @SerializedName("max_amount_by_day") private Long maxAmountByDay; + /** 固定面额批次特定信息 说明:固定面额发券批次特定信息 */ @SerializedName("fixed_normal_coupon") private FixedValueStockMsg fixedNormalCoupon; + /** 单个用户可领个数 说明:单个用户可领个数 */ @SerializedName("max_coupons_per_user") private Integer maxCouponsPerUser; + /** 券类型 说明:NORMAL-满减券;CUT_TO-减至券 */ @SerializedName("coupon_type") private String couponType; + /** 订单优惠标记 说明:订单优惠标记 */ @SerializedName("goods_tag") private List goodsTag; + /** 支付方式 说明:默认不限制,可设置以下各种组合方式 1、付款码支付 2、小程序支付 3、其他支付 4、付款码支付&小程序支付 5、付款码支付&其他支付 */ @SerializedName("trade_type") private List tradeType; + /** 是否可叠加其他优惠 说明:true-是;false-否 */ @SerializedName("combine_use") private Boolean combineUse; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockRequest.java index 800e678f..47df2811 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockRequest.java @@ -21,6 +21,7 @@ public class StopStockRequest { /** 创建批次的商户号 说明:批次创建方商户号 */ @SerializedName("stock_creator_mchid") private String stockCreatorMchid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockResponse.java index f6fe2ac4..77ed0fc0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/StopStockResponse.java @@ -20,6 +20,7 @@ public class StopStockResponse { /** 暂停时间 说明:暂停时间 */ @SerializedName("stop_time") private String stopTime; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; diff --git a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/UseFlowResponse.java b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/UseFlowResponse.java index f597ceab..4efe7fe9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/UseFlowResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/cashcoupons/model/UseFlowResponse.java @@ -20,9 +20,11 @@ public class UseFlowResponse { /** 下载链接 说明:流水文件下载链接,30s内有效 */ @SerializedName("url") private String url; + /** 安全校验码 说明:文件内容的哈希值,防止篡改 */ @SerializedName("hash_value") private String hashValue; + /** 哈希算法类型 说明:哈希算法类型,目前只支持sha1 */ @SerializedName("hash_type") private String hashType; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingService.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingService.java index 41cc02f4..b3d33042 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingService.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/EcommerceProfitSharingService.java @@ -67,6 +67,7 @@ private EcommerceProfitSharingService( this.hostName = hostName; this.encryptor = requireNonNull(encryptor); } + /** EcommerceProfitSharingService构造器 */ public static class Builder { @@ -132,6 +133,7 @@ public CreateAfterSalesOrderResponse createAfterSalesOrder(CreateAfterSalesOrder httpClient.execute(httpRequest, CreateAfterSalesOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账 * @@ -164,6 +166,7 @@ public CreateOrderResponse createOrder(CreateOrderRequest request) { httpClient.execute(httpRequest, CreateOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 完结分账 * @@ -194,6 +197,7 @@ public FinishOrderResponse finishOrder(FinishOrderRequest request) { httpClient.execute(httpRequest, FinishOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询售后服务分账结果 * @@ -234,6 +238,7 @@ public QueryAfterSalesOrderResponse queryAfterSalesOrder(QueryAfterSalesOrderReq httpClient.execute(httpRequest, QueryAfterSalesOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询分账结果 * @@ -276,6 +281,7 @@ public QueryOrderResponse queryOrder(QueryOrderRequest request) { httpClient.execute(httpRequest, QueryOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询订单剩余待分金额 * @@ -312,6 +318,7 @@ public QueryOrderAmountResponse queryOrderAmount(QueryOrderAmountRequest request httpClient.execute(httpRequest, QueryOrderAmountResponse.class); return httpResponse.getServiceResponse(); } + /** * 添加分账接收方 * @@ -342,6 +349,7 @@ public AddReceiverResponse addReceiver(AddReceiverRequest request) { httpClient.execute(httpRequest, AddReceiverResponse.class); return httpResponse.getServiceResponse(); } + /** * 删除分账接收方 * @@ -373,6 +381,7 @@ public DeleteReceiverResponse deleteReceiver(DeleteReceiverRequest request) { httpClient.execute(httpRequest, DeleteReceiverResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账回退 * @@ -403,6 +412,7 @@ public CreateReturnOrderResponse createReturnOrder(CreateReturnOrderRequest requ httpClient.execute(httpRequest, CreateReturnOrderResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询分账回退结果 * diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverRequest.java index 4ffff5be..10dd3fd3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverRequest.java @@ -20,15 +20,19 @@ public class AddReceiverRequest { /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 接收方类型 说明:接收方类型 枚举值: MERCHANT\\_ID:商户 PERSONAL\\_OPENID:个人 */ @SerializedName("type") private String type; + /** 接收方账号 说明:类型是MERCHANT_ID时,是商户号 类型是PERSONAL_OPENID时,是个人openid */ @SerializedName("account") private String account; + /** 接收方名称 说明:商户全称。仅接收方类型是MERCHANT_ID时,才需要填写此字段。 */ @SerializedName("name") private String name; + /** * 与分账方的关系类型 说明:子商户与接收方的关系。 本字段值为枚举: SUPPLIER:供应商 DISTRIBUTOR:分销商 SERVICE_PROVIDER:服务商 PLATFORM:平台 * OTHERS:其他 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverResponse.java index 5672bb74..86c63609 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/AddReceiverResponse.java @@ -20,6 +20,7 @@ public class AddReceiverResponse { /** 接收方类型 说明:参考请求参数 */ @SerializedName("type") private String type; + /** 接收方账号 说明:参考请求参数 */ @SerializedName("account") private String account; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderRequest.java index ad7bb718..53249366 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderRequest.java @@ -20,18 +20,23 @@ public class CreateAfterSalesOrderRequest { /** 子商户号 说明:分账出资的商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 类型 说明:枚举值:1、SERVICE_FEE_INCOME:服务费收入分账 */ @SerializedName("type") private String type; + /** 场景 说明:枚举值: 1、REFUND_TICKET:退票 2、CHANGE_TICKET:改签 3、RETURN_GOODS:退货 */ @SerializedName("scene") private String scene; + /** 微信退款单号 说明:该笔微信订单对应的微信退款单号。退票收入分账、改签退款收入分账、退货收入分账时必填。 */ @SerializedName("refund_id") private String refundId; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderResponse.java index edfa0c9b..4c2daed3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateAfterSalesOrderResponse.java @@ -20,9 +20,11 @@ public class CreateAfterSalesOrderResponse { /** 子商户号 说明:分账出资的商户 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderReceiver.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderReceiver.java index c228aaff..c7ed5435 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderReceiver.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderReceiver.java @@ -22,18 +22,23 @@ public class CreateOrderReceiver { /** 分账接收方类型 说明:分账接收方类型 枚举值: MERCHANT\\_ID:商户 PERSONAL\\_OPENID:个人 */ @SerializedName("type") private String type; + /** 分账接收方账号 说明:分账接收方账号: 类型是MERCHANT\\_ID时,是商户ID 类型是PERSONAL\\_OPENID时,是个人OpenID */ @SerializedName("receiver_account") private String receiverAccount; + /** 分账接收商户号 说明:接收方类型为MERCHANT_ID时,填入微信支付分配的商户号。 如果填写了字段receiver_account,则无需填写本字段 */ @SerializedName("receiver_mchid") private String receiverMchid; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** * 分账个人接收方姓名 说明:可选项,在接收方类型为个人的时可选填,若有值,会检查与 receiver\\_name 是否实名匹配,不匹配会拒绝分账请求 1. * 分账接收方类型是PERSONAL\\_OPENID时,是个人姓名的密文(选传,传则校验)此字段的加密的方式详见:[敏感信息加解密](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/wechatpay/wechatpay4_3.shtml) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderRequest.java index 3c304665..f70d5144 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderRequest.java @@ -24,25 +24,31 @@ public class CreateOrderRequest { /** 微信分配的公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 电商平台二级商户号 说明:分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账接收方列表 说明:分账接收方列表,可以设置出资商户作为分账接受方 */ @Encryption @SerializedName("receivers") private List receivers = new ArrayList(); + /** * 是否分账完成 说明:如果为true,则分账接收商户只支持电商平台商户,且该笔订单剩余未分账的金额会解冻回电商平台二级商户; * 如果为false,则分账接收商户可以为电商平台商户或者电商平台二级商户,且该笔订单剩余未分账的金额不会解冻回电商平台二级商户,可以对该笔订单再次进行分账; */ @SerializedName("finish") private Boolean finish; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderResponse.java index e93143fb..f6ba26b9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateOrderResponse.java @@ -21,18 +21,23 @@ public class CreateOrderResponse { /** 电商平台二级商户号 说明:分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 分账接收方列表 说明:分账接收方列表 */ @SerializedName("receivers") private List receivers; + /** 分账单状态 说明:分账单状态(每个接收方的分账结果请查看receivers中的result字段) */ @SerializedName("status") private Status status; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderRequest.java index 32f024dc..399190a1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderRequest.java @@ -20,24 +20,30 @@ public class CreateReturnOrderRequest { /** 电商平台二级商户号 说明:分账回退的接收商户,对应原分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识。微信分账单号和商户分账单号二选一填写 */ @SerializedName("order_id") private String orderId; + /** * 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * 。微信分账单号和商户分账单号二选一填写 */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 只能是数字、大小写字母_-|*@ ,同一回退单号多次请求等同一次。 */ @SerializedName("out_return_no") private String outReturnNo; + /** 回退商户号 说明:只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** 回退描述 说明:分账回退的原因描述 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderResponse.java index 986f4386..4e75cfad 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/CreateReturnOrderResponse.java @@ -20,36 +20,45 @@ public class CreateReturnOrderResponse { /** 电商平台二级商户号 说明:分账回退的接收商户,对应原分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 微信分账单号与商户分账单号二选一填写 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:原发起分账请求时使用的商户后台系统的分账单号。 微信分账单号与商户分账单号二选一填写 */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 只能是数字、大小写字母_-|*@ ,同一回退单号多次请求等同一次。 */ @SerializedName("out_return_no") private String outReturnNo; + /** 回退商户号 说明:只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** 微信回退单号 说明:微信分账回退单号,微信系统返回的唯一标识 */ @SerializedName("return_no") private String returnNo; + /** * 回退结果 说明:如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果 枚举值: PROCESSING:处理中 SUCCESS:已成功 FAILED:已失败 * 注意:如果返回为处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险 在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败 */ @SerializedName("result") private String result; + /** * 失败原因 说明:失败原因。包含以下枚举值: 1. ACCOUNT_ABNORMAL : 原分账接收方账户异常 2. TIME_OUT_CLOSED : 超时关单 3. * PAYER_ACCOUNT_ABNORMAL : 原分账分出方账户异常 */ @SerializedName("fail_reason") private String failReason; + /** 完成时间 说明:分账回退完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverRequest.java index 14697555..bb5a28a7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverRequest.java @@ -20,9 +20,11 @@ public class DeleteReceiverRequest { /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 接收方类型 说明:接收方类型 枚举值: MERCHANT\\_ID:商户 PERSONAL\\_OPENID:个人 */ @SerializedName("type") private String type; + /** 接收方账号 说明:类型是MERCHANT_ID时,是商户号 类型是PERSONAL_OPENID时,是个人openid */ @SerializedName("account") private String account; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverResponse.java index 23d2f58e..b4b22a55 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/DeleteReceiverResponse.java @@ -20,6 +20,7 @@ public class DeleteReceiverResponse { /** 接收方类型 说明:参考请求参数 */ @SerializedName("type") private String type; + /** 接收方账号 说明:参考请求参数 */ @SerializedName("account") private String account; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderRequest.java index 6512a8a7..2c2e4c4a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderRequest.java @@ -20,15 +20,19 @@ public class FinishOrderRequest { /** 电商平台二级商户号 说明:分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderResponse.java index 0a684c85..6725e238 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/FinishOrderResponse.java @@ -20,12 +20,15 @@ public class FinishOrderResponse { /** 电商平台二级商户号 说明:分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/OrderReceiverDetail.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/OrderReceiverDetail.java index ae29b82b..06f9dae5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/OrderReceiverDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/OrderReceiverDetail.java @@ -20,18 +20,23 @@ public class OrderReceiverDetail { /** 分账接收商户号 说明:仅分账接收方类型为MERCHANT_ID时,填写微信支付分配的商户号 */ @SerializedName("receiver_mchid") private String receiverMchid; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 分账结果 说明:枚举值: 1. PENDING:待分账 2. SUCCESS:分账成功 3. CLOSED:已关闭 */ @SerializedName("result") private String result; + /** 分账完成时间 说明:分账完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; + /** * 分账失败原因 说明:分账失败原因。包含以下枚举值: 1. ACCOUNT\\_ABNORMAL : 分账接收账户异常 2. NO\\_RELATION : 分账关系已解除 3. * RECEIVER\\_HIGH\\_RISK : 高风险接收方 4. RECEIVER\\_REAL\\_NAME\\_NOT\\_VERIFIED : 接收方未实名 5. @@ -40,18 +45,21 @@ public class OrderReceiverDetail { */ @SerializedName("fail_reason") private String failReason; + /** * 接收方类型 说明:接收方类型 枚举值: MERCHANT\\_ID:商户号(mch\\_id或者sub\\_mch\\_id) * PERSONAL\\_OPENID:个人OpenID(由服务商的APPID转换得到) PERSONAL\\_SUB\\_OPENID:个人SubOpenID(由品牌主的APPID转换得到) */ @SerializedName("type") private String type; + /** * 接收方账号 说明:接收方账号。 枚举值: 类型是MERCHANT\\_ID时,是商户号(mch\\_id或者sub\\_mch\\_id) * 类型是PERSONAL\\_OPENID时,是个人openid,[openid获取方法](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/open/pay/chapter3_3_1.shtml#part-13) */ @SerializedName("receiver_account") private String receiverAccount; + /** 分账明细单号 说明:微信分账明细单号,每笔分账业务执行的明细单号,可与资金账单对账使用 */ @SerializedName("detail_id") private String detailId; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderRequest.java index 38912040..eaeca5d0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderRequest.java @@ -22,6 +22,7 @@ public class QueryAfterSalesOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderResponse.java index 0a8e2ff1..3609ebe6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryAfterSalesOrderResponse.java @@ -20,21 +20,26 @@ public class QueryAfterSalesOrderResponse { /** 子商户号 说明:分账出资的商户 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** * 分账结果 说明:枚举值: 1、PROCESSING:分账中(请稍后查询确认结果) 2、SUCCESS:分账成功(最终状态) 3、FAILED: * 分账失败(最终状态,资金未变动或资金已转回分账出资方,请商户自行处理,具体失败原因请关注\"分账失败原因\"字段) */ @SerializedName("result") private String result; + /** 分账完成时间 说明:分账完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; + /** * 分账失败原因 说明:分账失败原因。包含以下枚举值: 1. ACCOUNT_ABNORMAL : 分账接收账户异常 2. NO_RELATION : 分账关系已解除 3. * RECEIVER_HIGH_RISK : 高风险接收方 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderAmountResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderAmountResponse.java index fc0e372c..f798260e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderAmountResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderAmountResponse.java @@ -20,6 +20,7 @@ public class QueryOrderAmountResponse { /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 订单剩余待分金额 说明:订单剩余待分金额,整数,单位为分 */ @SerializedName("unsplit_amount") private Long unsplitAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderRequest.java index df5991bf..2a8dd38c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderRequest.java @@ -22,10 +22,12 @@ public class QueryOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderResponse.java index 49c8de79..5c8cf12b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryOrderResponse.java @@ -21,24 +21,31 @@ public class QueryOrderResponse { /** 电商平台二级商户号 说明:分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 分账单状态 说明:分账单状态(每个接收方的分账结果请查看receivers中的result字段) */ @SerializedName("status") private String status; + /** 分账接收方列表 说明:分账接收方列表 */ @SerializedName("receivers") private List receivers; + /** 分账完结金额 说明:分账完结的分账金额,单位为分, 仅当查询分账完结的执行结果时,存在本字段 */ @SerializedName("finish_amount") private Long finishAmount; + /** 分账完结描述 说明:分账完结的原因描述,仅当查询分账完结的执行结果时,存在本字段 */ @SerializedName("finish_description") private String finishDescription; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderRequest.java index f0c41fde..b347bdd4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderRequest.java @@ -22,14 +22,17 @@ public class QueryReturnOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 商户回退单号 说明:调用回退接口提供的商户系统内部的回退单号 */ @SerializedName("out_return_no") @Expose(serialize = false) private String outReturnNo; + /** 微信分账单号 说明:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 微信分账单号与商户分账单号二选一填写 */ @SerializedName("order_id") @Expose(serialize = false) private String orderId; + /** 商户分账单号 说明:原发起分账请求时使用的商户系统内部的分账单号。微信分账单号与商户分账单号二选一填写 */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderResponse.java b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderResponse.java index 5df90a42..0e75265a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommerceprofitsharing/model/QueryReturnOrderResponse.java @@ -20,36 +20,45 @@ public class QueryReturnOrderResponse { /** 电商平台二级商户号 说明:分账回退的接收商户,对应原分账出资的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 只能是数字、大小写字母_-|*@ ,同一回退单号多次请求等同一次。 */ @SerializedName("out_return_no") private String outReturnNo; + /** 微信回退单号 说明:微信分账回退单号,微信系统返回的唯一标识 */ @SerializedName("return_no") private String returnNo; + /** 回退商户号 说明:只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** * 回退结果 说明:如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果 枚举值: PROCESSING:处理中 SUCCESS:已成功 FAILED:已失败 * 注意:如果返回为处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险 在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败 */ @SerializedName("result") private String result; + /** * 失败原因 说明:失败原因。包含以下枚举值: 1. ACCOUNT_ABNORMAL : 原分账接收方账户异常 2. TIME_OUT_CLOSED : 超时关单 3. * PAYER_ACCOUNT_ABNORMAL : 原分账分出方账户异常 4. INVALID_REQUEST : 描述参数设置失败 */ @SerializedName("fail_reason") private String failReason; + /** 完成时间 说明:分账回退完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundService.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundService.java index 6bfbb9ee..6e3c4e41 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundService.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/EcommerceRefundService.java @@ -51,6 +51,7 @@ private EcommerceRefundService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** EcommerceRefundService构造器 */ public static class Builder { @@ -107,6 +108,7 @@ public Refund4Create createRefund(CreateRefundRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Refund4Create.class); return httpResponse.getServiceResponse(); } + /** * 垫付退款回补 * @@ -142,6 +144,7 @@ public ReturnAdvance createReturnAdvance(CreateReturnAdvanceRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, ReturnAdvance.class); return httpResponse.getServiceResponse(); } + /** * 查询单笔退款(按微信支付退款单号) * @@ -181,6 +184,7 @@ public Refund queryRefund(QueryRefundRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Refund.class); return httpResponse.getServiceResponse(); } + /** * 查询单笔退款(按商户退款单号) * @@ -221,6 +225,7 @@ public Refund queryRefundByOutRefundNo(QueryRefundByOutRefundNoRequest request) HttpResponse httpResponse = httpClient.execute(httpRequest, Refund.class); return httpResponse.getServiceResponse(); } + /** * 查询垫付回补结果 * diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateAbnormalRefundRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateAbnormalRefundRequest.java index 60ae4f16..7036156e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateAbnormalRefundRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateAbnormalRefundRequest.java @@ -22,12 +22,15 @@ public class CreateAbnormalRefundRequest { /** 二级商户号 说明:微信支付分配二级商户的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 异常退款处理方式 说明:可选:退款至用户、退款至交易商户银行账户 */ @SerializedName("type") private Type type; + /** * 开户银行 * 说明:银行类型,采用字符串类型的银行标识,值列表详见[银行类型](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=4_2)。仅支持招行、交通银行、农行、建行、工商、中行、平安、浦发、中信、光大、民生、兴业、广发、邮储、宁波银行的借记卡。 @@ -35,6 +38,7 @@ public class CreateAbnormalRefundRequest { */ @SerializedName("bank_type") private String bankType; + /** * 收款银行卡号 * 说明:用户的银行卡账号,该字段需进行加密处理,加密方法详见[敏感信息加密说明](https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/min-gan-xin-xi-jia-mi)。 @@ -43,6 +47,7 @@ public class CreateAbnormalRefundRequest { @Encryption @SerializedName("bank_account") private String bankAccount; + /** * 收款用户姓名 * 说明:收款用户姓名,该字段需进行加密处理,加密方法详见[敏感信息加密说明](https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/min-gan-xin-xi-jia-mi)。 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateRefundRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateRefundRequest.java index 7e1ebb3a..24c0b568 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateRefundRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateRefundRequest.java @@ -20,39 +20,49 @@ public class CreateRefundRequest { /** 二级商户号 说明:微信支付分配二级商户的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 电商平台APPID 说明:电商平台在微信公众平台申请服务号对应的APPID,申请商户功能的时候微信支付会配置绑定关系 */ @SerializedName("sp_appid") private String spAppid; + /** 二级商户APPID 说明:二级商户在微信申请公众号成功后分配的帐号ID,需要电商平台侧有配置绑定关系才能传 */ @SerializedName("sub_appid") private String subAppid; + /** 微信订单号 说明:原支付交易对应的微信订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户订单号 说明:原支付交易对应的商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 退款原因 说明:若商户传入,会在下发给用户的退款消息中体现退款原因 */ @SerializedName("reason") private String reason; + /** 订单金额 说明:订单金额信息 */ @SerializedName("amount") private RefundReqAmount amount; + /** * 退款结果回调url 说明:异步接收微信支付退款结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。 * 如果参数中传了notify_url,则商户平台上配置的回调地址将不会生效,优先回调当前传的这个地址。 */ @SerializedName("notify_url") private String notifyUrl; + /** * 退款出资商户 说明:REFUND_SOURCE_PARTNER_ADVANCE : 电商平台垫付,需要向微信支付申请开通 REFUND_SOURCE_SUB_MERCHANT : * 二级商户,默认值 注意:若传入REFUND_SOURCE_PARTNER_ADVANCE,仅代表可以使用垫付退款,实际出款账户需以退款申请受理结果或查单结果为准。 */ @SerializedName("refund_account") private String refundAccount; + /** * 资金账户 * 说明:若订单处于待分账状态,可以传入此参数,指定退款资金来源账户。当该字段不存在时,默认使用订单交易资金所在账户出款,即待分账时使用不可用余额的资金进行退款,已分账或无分账时使用可用余额的资金进行退款。 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateReturnAdvanceRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateReturnAdvanceRequest.java index 8d39aad6..3be9e5fc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateReturnAdvanceRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/CreateReturnAdvanceRequest.java @@ -22,6 +22,7 @@ public class CreateReturnAdvanceRequest { @SerializedName("refund_id") @Expose(serialize = false) private String refundId; + /** 二级商户号 说明:微信支付分配给二级商户的商户号 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/FundsFromItem.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/FundsFromItem.java index ebeeff5c..2f8aaf64 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/FundsFromItem.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/FundsFromItem.java @@ -20,6 +20,7 @@ public class FundsFromItem { /** 出资账户类型 说明:下面枚举值多选一。 枚举值: AVAILABLE : 可用余额 UNAVAILABLE : 不可用余额 */ @SerializedName("account") private String account; + /** 出资金额 说明:对应账户出资金额 */ @SerializedName("amount") private Long amount; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/PromotionDetail.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/PromotionDetail.java index 8dbbe370..a99040e1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/PromotionDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/PromotionDetail.java @@ -20,15 +20,19 @@ public class PromotionDetail { /** 券ID 说明:券或者立减优惠id */ @SerializedName("promotion_id") private String promotionId; + /** 优惠范围 说明:GLOBAL- 全场代金券 SINGLE- 单品优惠 */ @SerializedName("scope") private String scope; + /** 优惠类型 说明:COUPON- 代金券,需要走结算资金的充值型代金券 DISCOUNT- 优惠券,不走结算资金的免充值型优惠券 */ @SerializedName("type") private String type; + /** 优惠券面额 说明:用户享受优惠的金额(优惠券面额=微信出资金额+商家出资金额+其他出资方金额 ) */ @SerializedName("amount") private Long amount; + /** 优惠退款金额 说明:代金券退款金额<=退款金额,退款金额-代金券或立减优惠退款金额为现金,说明详见代金券或立减优惠 */ @SerializedName("refund_amount") private Long refundAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundByOutRefundNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundByOutRefundNoRequest.java index 085c3beb..ac6d2985 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundByOutRefundNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundByOutRefundNoRequest.java @@ -22,6 +22,7 @@ public class QueryRefundByOutRefundNoRequest { @SerializedName("out_refund_no") @Expose(serialize = false) private String outRefundNo; + /** 二级商户号 说明:微信支付分配给二级商户的商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundRequest.java index 4fb3043c..cabd6d94 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryRefundRequest.java @@ -22,6 +22,7 @@ public class QueryRefundRequest { @SerializedName("refund_id") @Expose(serialize = false) private String refundId; + /** 二级商户号 说明:微信支付分配给二级商户的商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryReturnAdvanceRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryReturnAdvanceRequest.java index 9f54c99f..38cc7252 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryReturnAdvanceRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/QueryReturnAdvanceRequest.java @@ -22,6 +22,7 @@ public class QueryReturnAdvanceRequest { @SerializedName("refund_id") @Expose(serialize = false) private String refundId; + /** 二级商户号 说明:微信支付分配给二级商户的商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund.java index 2794be58..1a39cc14 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund.java @@ -21,26 +21,32 @@ public class Refund { /** 微信支付退款订单号 说明:微信支付退款订单订单号 */ @SerializedName("refund_id") private String refundId; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 微信支付交易订单号 说明:微信支付交易订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户原交易订单号 说明:返回的原交易订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** * 退款渠道 说明:ORIGINAL—原路退款 BALANCE—退回到余额 OTHER_BALANCE—原账户异常退到其他余额账户 OTHER_BANKCARD—原银行卡异常退到其他银行卡 */ @SerializedName("channel") private String channel; + /** * 退款入账账户 说明:取当前退款单的退款入账方 1)退回银行卡: {银行名称}{卡类型}{卡尾号} 2)退回支付用户零钱: 支付用户零钱 3)退还商户: 商户基本账户 商户结算银行账户 * 4)退回支付用户零钱通: 支付用户零钱通 */ @SerializedName("user_received_account") private String userReceivedAccount; + /** * 退款成功时间 * 说明:退款成功时间,退款状态status为SUCCESS(退款成功)时,返回该字段。遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -48,6 +54,7 @@ public class Refund { */ @SerializedName("success_time") private String successTime; + /** * 退款创建时间 * 说明:退款受理时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -55,24 +62,29 @@ public class Refund { */ @SerializedName("create_time") private String createTime; + /** * 退款状态 说明:退款状态: SUCCESS—退款成功 CLOSED—退款关闭。 PROCESSING—退款处理中 * ABNORMAL—退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台(pay.weixin.qq.com)-交易中心,手动处理此笔退款。 */ @SerializedName("status") private String status; + /** 退款金额 说明:退款金额信息 */ @SerializedName("amount") private RefundAmount amount; + /** 营销详情 说明:优惠退款信息 */ @SerializedName("promotion_detail") private List promotionDetail; + /** * 退款出资商户 说明:REFUND_SOURCE_PARTNER_ADVANCE : 电商平台垫付 REFUND_SOURCE_SUB_MERCHANT : 二级商户,默认值 * 注意:申请退款时可能会出现暂未扣除退款资金的情况,此时不返回本字段,需继续查单确认。 */ @SerializedName("refund_account") private String refundAccount; + /** * 资金账户 说明:UNSETTLED : 未结算资金 AVAILABLE : 可用余额 UNAVAILABLE : 不可用余额 OPERATION : 运营户 BASIC : * 基本账户(含可用余额和不可用余额) ECNY_BASIC : 数字人民币基本账户 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund4Create.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund4Create.java index 502e7ba6..35eb33c1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund4Create.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/Refund4Create.java @@ -21,9 +21,11 @@ public class Refund4Create { /** 微信支付退款订单号 说明:微信支付退款订单号 */ @SerializedName("refund_id") private String refundId; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** * 退款创建时间 * 说明:退款受理时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -31,12 +33,15 @@ public class Refund4Create { */ @SerializedName("create_time") private String createTime; + /** 退款金额 说明:订单退款金额信息 */ @SerializedName("amount") private RefundAmount amount; + /** 优惠退款详情 说明:优惠退款功能信息 */ @SerializedName("promotion_detail") private List promotionDetail; + /** * 退款出资商户 说明:REFUND_SOURCE_PARTNER_ADVANCE : 电商平台垫付 REFUND_SOURCE_SUB_MERCHANT : 二级商户,默认值 * 注意:申请退款时可能会出现暂未扣除退款资金的情况,此时不返回本字段,需查单确认。 diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundAmount.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundAmount.java index 83b0121c..6381b493 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundAmount.java @@ -21,18 +21,23 @@ public class RefundAmount { /** 退款金额 说明:退款金额,单位为分,只能为整数,不能超 过原订单支付金额 */ @SerializedName("refund") private Long refund; + /** 退款出资账户及金额 说明:退款出资的账户类型及金额信息 */ @SerializedName("from") private List from; + /** 用户退款金额 说明:退款给用户的金额,不包含所有优惠券金额 */ @SerializedName("payer_refund") private Long payerRefund; + /** 优惠退款金额 说明:优惠券的退款金额,原支付单的优惠按比例退款 */ @SerializedName("discount_refund") private Long discountRefund; + /** 货币类型 说明:符合ISO4217标准的三位字母代码,目前只支持人民币:CNY */ @SerializedName("currency") private String currency; + /** 垫付金额 说明:电商平台垫付的金额 */ @SerializedName("advance") private Long advance; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundReqAmount.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundReqAmount.java index e2bd26fa..6b76d92f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundReqAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/RefundReqAmount.java @@ -21,6 +21,7 @@ public class RefundReqAmount { /** 退款金额 说明:退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额。 */ @SerializedName("refund") private Long refund; + /** * 退款出资账户及金额 说明:退款需要从指定账户出资时,传递此参数指定出资金额(币种的最小单位,只能为整数)。 * 该功能优先级高于通过资金账户(funds_account)参数来指定可用余额出资退款功能,且二者不可同时使用。 @@ -29,9 +30,11 @@ public class RefundReqAmount { */ @SerializedName("from") private List from; + /** 原订单金额 说明:原支付交易的订单总金额,币种的最小单位,只能为整数 */ @SerializedName("total") private Long total; + /** 退款币种 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/ReturnAdvance.java b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/ReturnAdvance.java index 4563ae1c..985ae013 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/ReturnAdvance.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercerefund/model/ReturnAdvance.java @@ -20,27 +20,35 @@ public class ReturnAdvance { /** 微信退款单号 说明:必须是垫付退款的微信退款单 */ @SerializedName("refund_id") private String refundId; + /** 微信回补单号 说明:微信支付生成的垫付回补操作单号 */ @SerializedName("advance_return_id") private String advanceReturnId; + /** 垫付回补金额 说明:退款单对应的垫付退款的金额 */ @SerializedName("return_amount") private Long returnAmount; + /** 出款方商户号 说明:微信支付分配给出款方的商户号 */ @SerializedName("payer_mchid") private String payerMchid; + /** 出款方账户 说明:BASIC 基本账户 OPERATION 运营账户 */ @SerializedName("payer_account") private String payerAccount; + /** 入账方商户号 说明:微信支付分配给入账方的商户号 */ @SerializedName("payee_mchid") private String payeeMchid; + /** 入账方账户 说明:BASIC 基本账户 OPERATION 运营账户 */ @SerializedName("payee_account") private String payeeAccount; + /** 垫付回补结果 说明:SUCCESS 回补成功 FAILED 回补失败,出款方账户余额不足时发生 PROCESSING 处理中 */ @SerializedName("result") private String result; + /** * 垫付回补完成时间 * 说明:垫付回补完成的时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyService.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyService.java index 9590ecc6..50b0684d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyService.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/EcommerceSubsidyService.java @@ -47,6 +47,7 @@ private EcommerceSubsidyService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** EcommerceSubsidyService构造器 */ public static class Builder { @@ -104,6 +105,7 @@ public SubsidiesCancelEntity cancelSubsidy(SubsidiesCancelRequest request) { httpClient.execute(httpRequest, SubsidiesCancelEntity.class); return httpResponse.getServiceResponse(); } + /** * 请求补差 * @@ -134,6 +136,7 @@ public SubsidiesCreateEntity createSubsidy(SubsidiesCreateRequest request) { httpClient.execute(httpRequest, SubsidiesCreateEntity.class); return httpResponse.getServiceResponse(); } + /** * 请求补差回退 * diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/ReturnFrom.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/ReturnFrom.java index e92e845f..edb59078 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/ReturnFrom.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/ReturnFrom.java @@ -20,6 +20,7 @@ public class ReturnFrom { /** 出资账户类型 说明:下面枚举值多选一。 枚举值: AVAILABLE : 可用余额 UNAVAILABLE : 不可用余额 */ @SerializedName("account") private ReturnAccount account; + /** 出资金额 说明:对应账户出资金额 */ @SerializedName("amount") private Long amount; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelEntity.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelEntity.java index a1814bcc..12c92f23 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelEntity.java @@ -20,12 +20,15 @@ public class SubsidiesCancelEntity { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 取消补差结果 说明:取消补差结果 */ @SerializedName("result") private CancelStatus result; + /** 取消补差描述 说明:取消补差描述 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelRequest.java index d301a514..97ee61b2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCancelRequest.java @@ -20,9 +20,11 @@ public class SubsidiesCancelRequest { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 取消补差描述 说明:取消补差描述,查询的时候原样带回来 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateEntity.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateEntity.java index 406ec75b..ec418709 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateEntity.java @@ -20,24 +20,31 @@ public class SubsidiesCreateEntity { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 微信补差单号 说明:微信补差单号,微信系统返回的唯一标识 */ @SerializedName("subsidy_id") private String subsidyId; + /** 补差描述 说明:补差描述 */ @SerializedName("description") private String description; + /** 补差金额 说明:补差金额 */ @SerializedName("amount") private Long amount; + /** 补差单结果 说明:补差单结果 */ @SerializedName("result") private CreateStatus result; + /** 补差完成时间 说明:补差完成时间,遵循RFC3339标准格式 */ @SerializedName("success_time") private String successTime; + /** 商户补差单号 说明:商户系统内部的补差单号,在商户系统内部唯一,同一补差单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_subsidy_no") private String outSubsidyNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateRequest.java index 8ebb67f3..6856f63a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesCreateRequest.java @@ -20,15 +20,19 @@ public class SubsidiesCreateRequest { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 补差金额 说明:补差金额,单位为分,只能为整数,不能超过下单时候的最大补差金额 */ @SerializedName("amount") private Long amount; + /** 补差描述 说明:补差备注描述,查询的时候原样带回来 */ @SerializedName("description") private String description; + /** 商户补差单号 说明:商户系统内部的补差单号,在商户系统内部唯一,同一补差单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_subsidy_no") private String outSubsidyNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnEntity.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnEntity.java index abb50b53..7476425e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnEntity.java @@ -21,33 +21,43 @@ public class SubsidiesReturnEntity { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 微信补差回退单号 说明:微信补差回退单号,微信补差回退系统返回的唯一标识 */ @SerializedName("subsidy_refund_id") private String subsidyRefundId; + /** 微信退款单号 说明:微信退款单号,微信系统退款返回的唯一标识。因用户账户异常而无法退款时可不传,其他情况必传 */ @SerializedName("refund_id") private String refundId; + /** 商户补差回退单号 说明:商户系统内部的补差回退单号,在商户系统内部唯一,同一补差回退单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 补差回退金额 说明:补差回退金额 */ @SerializedName("amount") private Long amount; + /** 补差回退描述 说明:补差回退描述 */ @SerializedName("description") private String description; + /** 补差回退结果 说明:补差回退结果 */ @SerializedName("result") private ReturnStatus result; + /** 补差回退完成时间 说明:补差回退完成时间,遵循RFC3339标准格式 */ @SerializedName("success_time") private String successTime; + /** 微信补差单号 说明:微信补差单号,微信系统返回的唯一标识 */ @SerializedName("subsidy_id") private String subsidyId; + /** 回退出资账户及金额 说明:回退出资账户及金额 */ @SerializedName("from") private List from; diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnRequest.java b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnRequest.java index fde5a50e..d91a8366 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercesubsidy/model/SubsidiesReturnRequest.java @@ -21,24 +21,31 @@ public class SubsidiesReturnRequest { /** 电商平台二级商户号 说明:补差的电商平台二级商户,填写微信支付分配的商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 商户补差回退单号 说明:商户系统内部的补差回退单号,在商户系统内部唯一,同一补差回退单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 微信退款单号 说明:微信退款单号,微信系统退款返回的唯一标识。因用户账户异常而无法退款时可不传,其他情况必传 */ @SerializedName("refund_id") private String refundId; + /** 补差回退金额 说明:补差回退金额,单位为分,只能为整数,不能超过补差单的补差金额。如果指定了出资账户及金额,则必须为所有出资账户的金额之和 */ @SerializedName("amount") private Long amount; + /** 补差回退描述 说明:补差回退描述,查询的时候原样带回来 */ @SerializedName("description") private String description; + /** 微信补差单号 说明:微信补差单号,微信系统返回的唯一标识 */ @SerializedName("subsidy_id") private String subsidyId; + /** * 回退出资账户及金额 说明:回退需要从指定账户出资时,传递此参数指定出资金额(币种的最小单位,只能为整数)。 * 当前仅支持从一个账户出资。使用场景需要满足以下条件:1、本次回退金额和已回退金额之和不超过该补差单的补差金额;2、本次回退的金额不超过指定的账户的实际可用资金 diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/GiftActivityService.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/GiftActivityService.java index 6f54fc49..0bf2e23f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/GiftActivityService.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/GiftActivityService.java @@ -60,6 +60,7 @@ private GiftActivityService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** GiftActivityService构造器 */ public static class Builder { @@ -123,6 +124,7 @@ public AddActivityMerchantResponse addActivityMerchant(AddActivityMerchantReques httpClient.execute(httpRequest, AddActivityMerchantResponse.class); return httpResponse.getServiceResponse(); } + /** * 创建全场满额送活动 * @@ -154,6 +156,7 @@ public CreateFullSendActResponse createFullSendAct(CreateFullSendActRequest requ httpClient.execute(httpRequest, CreateFullSendActResponse.class); return httpResponse.getServiceResponse(); } + /** * 删除活动发券商户号 * @@ -191,6 +194,7 @@ public DeleteActivityMerchantResponse deleteActivityMerchant( httpClient.execute(httpRequest, DeleteActivityMerchantResponse.class); return httpResponse.getServiceResponse(); } + /** * 获取活动详情接口 * @@ -226,6 +230,7 @@ public GetActDetailResponse getActDetail(GetActDetailRequest request) { httpClient.execute(httpRequest, GetActDetailResponse.class); return httpResponse.getServiceResponse(); } + /** * 获取支付有礼活动列表 * @@ -274,6 +279,7 @@ public ListActivitiesResponse listActivities(ListActivitiesRequest request) { httpClient.execute(httpRequest, ListActivitiesResponse.class); return httpResponse.getServiceResponse(); } + /** * 获取活动发券商户号 * @@ -318,6 +324,7 @@ public ListActMchResponse listActivityMerchant(ListActivityMerchantRequest reque httpClient.execute(httpRequest, ListActMchResponse.class); return httpResponse.getServiceResponse(); } + /** * 获取活动指定商品列表 * @@ -362,6 +369,7 @@ public ListActSkuResponse listActivitySku(ListActivitySkuRequest request) { httpClient.execute(httpRequest, ListActSkuResponse.class); return httpResponse.getServiceResponse(); } + /** * 终止活动 * diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActAdvancedSetting.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActAdvancedSetting.java index d9ca18ed..8c660763 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActAdvancedSetting.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActAdvancedSetting.java @@ -22,15 +22,19 @@ public class ActAdvancedSetting { /** 投放用户类别 说明:DELIVERY_ALL_PERSON:所有用户;DELIVERY_MEMBER_PERSON:会员用户 */ @SerializedName("delivery_user_category") private DeliveryUserCategory deliveryUserCategory; + /** 商家会员appid 说明:当投放用户类别为会员用户时必填 */ @SerializedName("merchant_member_appid") private String merchantMemberAppid; + /** 支付模式 说明:主要用于指定可用的支付场景,不限制支付模式不填,限制选填(商家券暂不开放) */ @SerializedName("payment_mode") private PaymentMode paymentMode; + /** 支付方式信息 说明:支付方式信息,不填为不限制(商家券暂不开放) */ @SerializedName("payment_method_information") private PaymentMethodInfo paymentMethodInformation; + /** 订单优惠标记 说明:商户下单时需要传入相同的标记(goods_tag),用户同时符合其他规则才能享受优惠 */ @SerializedName("goods_tags") private List goodsTags; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActBaseInfo.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActBaseInfo.java index 8c73e2fb..4a68a72d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActBaseInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActBaseInfo.java @@ -21,36 +21,46 @@ public class ActBaseInfo { /** 活动名称 说明:活动名称 */ @SerializedName("activity_name") private String activityName; + /** 活动副标题 说明:活动副标题 */ @SerializedName("activity_second_title") private String activitySecondTitle; + /** 商户logo 说明:商户logo,送出优惠券时展示 */ @SerializedName("merchant_logo_url") private String merchantLogoUrl; + /** * 背景颜色 说明:代金券的背景颜色,可设置10种颜色,颜色取值可参考[开发指引](../../../products/gift-activity/development.html) 3.2.1 * background_color取值,默认为微信支付绿色, 颜色取值为颜色图中的颜色名称。 */ @SerializedName("background_color") private String backgroundColor; + /** 活动开始时间 说明:活动开始时间,最长可以配置1年内的活动,活动有效期最长90天 */ @SerializedName("begin_time") private String beginTime; + /** 活动结束时间 说明:活动结束时间,最长可以配置1年内的活动,活动有效期最长90天 */ @SerializedName("end_time") private String endTime; + /** 可用时间段 说明:可自定义活动有效时间内可用的多个时间段以及天内时间点 */ @SerializedName("available_periods") private AvailablePeriod availablePeriods; + /** 商户请求单号 说明:商户创建批次凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ @SerializedName("out_request_no") private String outRequestNo; + /** 投放目的 说明:OFF_LINE_PAY:拉用户回店消费;JUMP_MINI_APP:引导用户前往小程序消费 */ @SerializedName("delivery_purpose") private DeliveryPurposeCategory deliveryPurpose; + /** 商家小程序appid 说明:投放目的为跳转小程序时必填 */ @SerializedName("mini_programs_appid") private String miniProgramsAppid; + /** 商家小程序path 说明:投放目的为跳转小程序必填 */ @SerializedName("mini_programs_path") private String miniProgramsPath; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActParticipateMchInfo.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActParticipateMchInfo.java index 269ab436..fabf05a9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActParticipateMchInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActParticipateMchInfo.java @@ -21,12 +21,15 @@ public class ActParticipateMchInfo { /** 商户Id 说明:商户Id */ @SerializedName("mchid") private String mchid; + /** 商户名称 说明:商户名称 */ @SerializedName("merchant_name") private String merchantName; + /** 创建时间 说明:创建时间 */ @SerializedName("create_time") private String createTime; + /** 更新时间 说明:更新时间 */ @SerializedName("update_time") private String updateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActivityInformation.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActivityInformation.java index 254128e3..e3e19efa 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActivityInformation.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ActivityInformation.java @@ -21,30 +21,39 @@ public class ActivityInformation { /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; + /** 活动类型 说明:活动类型 */ @SerializedName("activity_type") private ActType activityType; + /** 活动基本信息 说明:创建活动时录入的基本信息 */ @SerializedName("activity_base_info") private ActBaseInfo activityBaseInfo; + /** 活动奖品发放规则 说明:奖品派送规则,分别对应满送、阶梯送、满A送B中的一种 */ @SerializedName("award_send_rule") private AwardSendRule awardSendRule; + /** 活动高级设置 说明:创建时传入的高级设置信息 */ @SerializedName("advanced_setting") private ActAdvancedSetting advancedSetting; + /** 活动状态 说明:活动当前状态枚举值 */ @SerializedName("activity_status") private ActStatus activityStatus; + /** 创建商户号 说明:创建商户号 */ @SerializedName("creator_merchant_id") private String creatorMerchantId; + /** 所属商户号 说明:所属商户号 */ @SerializedName("belong_merchant_id") private String belongMerchantId; + /** 活动创建时间 说明:活动创建时间 */ @SerializedName("create_time") private String createTime; + /** 活动更新时间 说明:活动更新时间 */ @SerializedName("update_time") private String updateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantBody.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantBody.java index 80721eb2..6dc2dee1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantBody.java @@ -23,6 +23,7 @@ public class AddActivityMerchantBody { /** 添加的发券商户号 说明:新增到活动中的发券商户号列表 */ @SerializedName("merchant_id_list") private List merchantIdList = new ArrayList(); + /** 请求业务单据号 说明:商户添加发券商户号的凭据号,商户侧需保持唯一性 */ @SerializedName("add_request_no") private String addRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantRequest.java index 3c662439..a75e17c1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantRequest.java @@ -25,9 +25,11 @@ public class AddActivityMerchantRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 添加的发券商户号 说明:新增到活动中的发券商户号列表 */ @SerializedName("merchant_id_list") private List merchantIdList = new ArrayList(); + /** 请求业务单据号 说明:商户添加发券商户号的凭据号,商户侧需保持唯一性 */ @SerializedName("add_request_no") private String addRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantResponse.java index 9dd643dc..c604fec9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AddActivityMerchantResponse.java @@ -22,9 +22,11 @@ public class AddActivityMerchantResponse { /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; + /** 校验失败的发券商户号 说明:未通过规则校验的发券商户号列表 */ @SerializedName("invalid_merchant_id_list") private List invalidMerchantIdList; + /** 添加时间 说明:成功添加发券商户号的时间 */ @SerializedName("add_time") private String addTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableDayTime.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableDayTime.java index 08d1c4e0..e32e58b8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableDayTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableDayTime.java @@ -21,6 +21,7 @@ public class AvailableDayTime { /** 每日可用开始时间 说明:每日可用开始时间(格式:110000,表示11:00:00) */ @SerializedName("begin_day_time") private String beginDayTime; + /** 每日可用结束时间 说明:每日可用结束时间 (格式:135959,表示13:59:59) */ @SerializedName("end_day_time") private String endDayTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailablePeriod.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailablePeriod.java index 49978c8b..5370f352 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailablePeriod.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailablePeriod.java @@ -22,6 +22,7 @@ public class AvailablePeriod { /** 可用时间 说明:可用时间 */ @SerializedName("available_time") private List availableTime; + /** 每日可用时间 说明:每日可用时间 */ @SerializedName("available_day_time") private List availableDayTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableTime.java index 9aa3471f..1100d8f4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AvailableTime.java @@ -21,6 +21,7 @@ public class AvailableTime { /** 可用开始时间 说明:可用开始时间 */ @SerializedName("begin_time") private String beginTime; + /** 可用结束时间 说明:可用结束时间 */ @SerializedName("end_time") private String endTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AwardBaseInfo.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AwardBaseInfo.java index bd7e783e..ed435d0b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AwardBaseInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/AwardBaseInfo.java @@ -21,9 +21,11 @@ public class AwardBaseInfo { /** 代金券批次Id 说明:代金券批次Id */ @SerializedName("stock_id") private String stockId; + /** 奖品原始图(大图) 说明:奖品大图,必填 */ @SerializedName("original_image_url") private String originalImageUrl; + /** 奖品缩略图(小图) 说明:奖品小图,当选多张券时必填 */ @SerializedName("thumbnail_url") private String thumbnailUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActRequest.java index 7dbb5aea..59261809 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActRequest.java @@ -21,9 +21,11 @@ public class CreateFullSendActRequest { /** 活动基本信息 说明:用于创建活动的基本信息 */ @SerializedName("activity_base_info") private ActBaseInfo activityBaseInfo; + /** 活动奖品发放规则 说明:满送活动规则 */ @SerializedName("award_send_rule") private FullSendRule awardSendRule; + /** 活动高级设置 说明:其他高级配置项 */ @SerializedName("advanced_setting") private ActAdvancedSetting advancedSetting; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActResponse.java index 6f9ce8e1..8dc0fc1e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/CreateFullSendActResponse.java @@ -21,6 +21,7 @@ public class CreateFullSendActResponse { /** 活动id 说明:活动id */ @SerializedName("activity_id") private String activityId; + /** 创建时间 说明:创建时间 */ @SerializedName("create_time") private String createTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantBody.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantBody.java index db9aeeb2..f077a51f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantBody.java @@ -23,6 +23,7 @@ public class DeleteActivityMerchantBody { /** 删除的发券商户号 说明:从活动已有的发券商户号中移除的商户号列表 */ @SerializedName("merchant_id_list") private List merchantIdList = new ArrayList(); + /** 请求业务单据号 说明:商户添加发券商户号的凭据号,商户侧需保持唯一性 */ @SerializedName("delete_request_no") private String deleteRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantRequest.java index b4052678..d68f1516 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantRequest.java @@ -25,9 +25,11 @@ public class DeleteActivityMerchantRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 删除的发券商户号 说明:从活动已有的发券商户号中移除的商户号列表 */ @SerializedName("merchant_id_list") private List merchantIdList = new ArrayList(); + /** 请求业务单据号 说明:商户添加发券商户号的凭据号,商户侧需保持唯一性 */ @SerializedName("delete_request_no") private String deleteRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantResponse.java index e7a5dd34..5f1328dd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/DeleteActivityMerchantResponse.java @@ -21,6 +21,7 @@ public class DeleteActivityMerchantResponse { /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; + /** 删除时间 说明:成功删除发券商户号的时间 */ @SerializedName("delete_time") private String deleteTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/FullSendRule.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/FullSendRule.java index 07a1660f..a32abf8c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/FullSendRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/FullSendRule.java @@ -23,18 +23,23 @@ public class FullSendRule { /** 消费金额门槛 说明:消费金额门槛 单位分 */ @SerializedName("transaction_amount_minimum") private Long transactionAmountMinimum; + /** 发放内容 说明:发放内容,可选单张券或礼包,选礼包时奖品限定3-5个 */ @SerializedName("send_content") private SendContentCategory sendContent; + /** 奖品类型 说明:奖品类型,暂时只支持商家券 */ @SerializedName("award_type") private AwardType awardType; + /** 奖品基本信息列表 说明:奖品基本信息列表 */ @SerializedName("award_list") private List awardList = new ArrayList(); + /** 发券商户号选项 说明:发券商户号选取规则,支持选择在用券商户或手动输入商户号两种,选择手动时,发券商户号必填(商家券只支持手动输入) */ @SerializedName("merchant_option") private SendMerchantOption merchantOption; + /** 发券商户号 说明:发券商户号,列表 */ @SerializedName("merchant_id_list") private List merchantIdList; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/GetActDetailResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/GetActDetailResponse.java index 45bcd504..ed9923b9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/GetActDetailResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/GetActDetailResponse.java @@ -21,36 +21,47 @@ public class GetActDetailResponse { /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; + /** 活动类型 说明:活动类型 */ @SerializedName("activity_type") private ActType activityType; + /** 活动基本信息 说明:创建活动时录入的基本信息 */ @SerializedName("activity_base_info") private ActBaseInfo activityBaseInfo; + /** 活动奖品发放规则 说明:奖品派送规则,分别对应满送、阶梯送、满A送B中的一种 */ @SerializedName("award_send_rule") private AwardSendRule awardSendRule; + /** 活动高级设置 说明:创建时传入的高级设置信息 */ @SerializedName("advanced_setting") private ActAdvancedSetting advancedSetting; + /** 活动状态 说明:活动当前状态枚举值 */ @SerializedName("activity_status") private ActStatus activityStatus; + /** 创建商户号 说明:创建商户号 */ @SerializedName("creator_merchant_id") private String creatorMerchantId; + /** 所属商户号 说明:所属商户号 */ @SerializedName("belong_merchant_id") private String belongMerchantId; + /** 活动暂停时间 说明:活动暂停时间 */ @SerializedName("pause_time") private String pauseTime; + /** 活动恢复时间 说明:活动恢复时间 */ @SerializedName("recovery_time") private String recoveryTime; + /** 活动创建时间 说明:活动创建时间 */ @SerializedName("create_time") private String createTime; + /** 活动更新时间 说明:活动更新时间 */ @SerializedName("update_time") private String updateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/InvalidParticipateMerchant.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/InvalidParticipateMerchant.java index 666acf90..79d3e3c6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/InvalidParticipateMerchant.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/InvalidParticipateMerchant.java @@ -21,6 +21,7 @@ public class InvalidParticipateMerchant { /** 商户Id 说明:商户Id */ @SerializedName("mchid") private String mchid; + /** 无效原因 说明:活动参与商户校验失败的原因 */ @SerializedName("invalid_reason") private String invalidReason; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActMchResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActMchResponse.java index 5de634b9..fc88191b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActMchResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActMchResponse.java @@ -22,15 +22,19 @@ public class ListActMchResponse { /** 结果集 说明:商户信息列表 */ @SerializedName("data") private List data; + /** 总数 说明:商户数量 */ @SerializedName("total_count") private Long totalCount; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; + /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActSkuResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActSkuResponse.java index 1562885c..28de2db0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActSkuResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActSkuResponse.java @@ -22,15 +22,19 @@ public class ListActSkuResponse { /** 结果集 说明:商品信息列表(sku信息列表) */ @SerializedName("data") private List data; + /** 总数量 */ @SerializedName("total_count") private Long totalCount; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; + /** 活动ID 说明:活动ID */ @SerializedName("activity_id") private String activityId; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesRequest.java index ed24f446..489363e7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesRequest.java @@ -23,18 +23,22 @@ public class ListActivitiesRequest { @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") @Expose(serialize = false) private Long limit; + /** 活动名称 说明:活动名称,支持模糊搜索 */ @SerializedName("activity_name") @Expose(serialize = false) private String activityName; + /** 活动状态 说明:活动状态 */ @SerializedName("activity_status") @Expose(serialize = false) private ActStatus activityStatus; + /** 奖品类型 说明:奖品类型,暂时只支持商家券 */ @SerializedName("award_type") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesResponse.java index de2b5128..1760bd6e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitiesResponse.java @@ -22,12 +22,15 @@ public class ListActivitiesResponse { /** 结果集 说明:支付有礼活动列表 */ @SerializedName("data") private List data; + /** 总数 说明:总数 */ @SerializedName("total_count") private Long totalCount; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivityMerchantRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivityMerchantRequest.java index bedfdf4a..1580d3a8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivityMerchantRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivityMerchantRequest.java @@ -23,10 +23,12 @@ public class ListActivityMerchantRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:限制分页最大数据条目 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitySkuRequest.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitySkuRequest.java index 28a1c0ab..1192aefa 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitySkuRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/ListActivitySkuRequest.java @@ -23,10 +23,12 @@ public class ListActivitySkuRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/PaymentMethodInfo.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/PaymentMethodInfo.java index 0da8f0fa..edcc1a53 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/PaymentMethodInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/PaymentMethodInfo.java @@ -21,6 +21,7 @@ public class PaymentMethodInfo { /** 支付方式 说明:支付方式,可以指定银行卡或零钱 */ @SerializedName("payment_method") private PaymentMethodCategory paymentMethod; + /** 银行简称 说明:银行简称,指定支付方式为银行卡必填,详询附录 */ @SerializedName("bank_abbreviation") private String bankAbbreviation; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/SkuInfo.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/SkuInfo.java index 6d5312fa..201091bf 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/SkuInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/SkuInfo.java @@ -21,9 +21,11 @@ public class SkuInfo { /** 指定商品 说明:指定商品(商品sku) */ @SerializedName("goods_id") private String goodsId; + /** 创建时间 说明:创建时间 */ @SerializedName("create_time") private String createTime; + /** 更新时间 说明:更新时间 */ @SerializedName("update_time") private String updateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/TerminateActResponse.java b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/TerminateActResponse.java index 5d1b258f..8ca36647 100644 --- a/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/TerminateActResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/giftactivity/model/TerminateActResponse.java @@ -21,6 +21,7 @@ public class TerminateActResponse { /** 生效时间 说明:生效时间 */ @SerializedName("terminate_time") private String terminateTime; + /** 活动Id 说明:活动Id */ @SerializedName("activity_id") private String activityId; diff --git a/service/src/main/java/com/wechat/pay/java/service/goldplan/GoldPlanService.java b/service/src/main/java/com/wechat/pay/java/service/goldplan/GoldPlanService.java index 4d6a1778..b5a148d4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/goldplan/GoldPlanService.java +++ b/service/src/main/java/com/wechat/pay/java/service/goldplan/GoldPlanService.java @@ -48,6 +48,7 @@ private GoldPlanService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** GoldPlanService构造器 */ public static class Builder { @@ -103,6 +104,7 @@ public void closeAdvertisingShow(CloseAdvertisingShowRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * 开通广告展示 * @@ -131,6 +133,7 @@ public void openAdvertisingShow(OpenAdvertisingShowRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * 同业过滤标签管理 * @@ -159,6 +162,7 @@ public void setAdvertisingIndustryFilter(SetAdvertisingIndustryFilterRequest req .build(); httpClient.execute(httpRequest, null); } + /** * 商家小票管理 * @@ -191,6 +195,7 @@ public ChangeCustomPageStatusResponse changeCustomPageStatus( httpClient.execute(httpRequest, ChangeCustomPageStatusResponse.class); return httpResponse.getServiceResponse(); } + /** * 点金计划管理 * diff --git a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeCustomPageStatusRequest.java b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeCustomPageStatusRequest.java index 92449604..de0c3701 100644 --- a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeCustomPageStatusRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeCustomPageStatusRequest.java @@ -20,6 +20,7 @@ public class ChangeCustomPageStatusRequest { /** 特约商户号 说明:开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。 */ @SerializedName("sub_mchid") private String subMchid; + /** 操作类型 说明:开通或关闭“商家自定义小票”的动作,枚举值: OPEN:表示开通 CLOSE:表示关闭 */ @SerializedName("operation_type") private OperationType operationType; diff --git a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeGoldPlanStatusRequest.java b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeGoldPlanStatusRequest.java index 0a840242..5a348393 100644 --- a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeGoldPlanStatusRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/ChangeGoldPlanStatusRequest.java @@ -20,9 +20,11 @@ public class ChangeGoldPlanStatusRequest { /** 特约商户号 说明:开通或关闭点金计划的特约商户商户号,由微信支付生成并下发。 */ @SerializedName("sub_mchid") private String subMchid; + /** 操作类型 说明:开通或关闭点金计划的动作,枚举值: OPEN:表示开通点金计划 CLOSE:表示关闭点金计划 */ @SerializedName("operation_type") private OperationType operationType; + /** 支付场景 说明:支付场景,指定开通点金计划的支付场景。如果未指定,则默认全部打开 */ @SerializedName("operation_pay_scene") private OperationPayScene operationPayScene; diff --git a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/OpenAdvertisingShowRequest.java b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/OpenAdvertisingShowRequest.java index c754f7e0..1c092c42 100644 --- a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/OpenAdvertisingShowRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/OpenAdvertisingShowRequest.java @@ -21,6 +21,7 @@ public class OpenAdvertisingShowRequest { /** 特约商户号 说明:需要开通广告展示的特约商户号,由微信支付生成并下发。 */ @SerializedName("sub_mchid") private String subMchid; + /** 同业过滤标签值 说明:特约商户同业过滤的同业过滤标签值。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置 */ @SerializedName("advertising_industry_filters") private List advertisingIndustryFilters; diff --git a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/SetAdvertisingIndustryFilterRequest.java b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/SetAdvertisingIndustryFilterRequest.java index 890af7be..547a7ea2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/goldplan/model/SetAdvertisingIndustryFilterRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/goldplan/model/SetAdvertisingIndustryFilterRequest.java @@ -22,6 +22,7 @@ public class SetAdvertisingIndustryFilterRequest { /** 特约商户号 说明:需要设置“同业过滤标签”的特约商户号,由微信支付生成并下发。 */ @SerializedName("sub_mchid") private String subMchid; + /** * 同业过滤标签值 说明:特约商户同业过滤的同业过滤标签值,同业过滤标签最少传一个,最多三个。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置。 * 注:若配置完成后需清空标签的,可登陆商户平台手动清空(路径:商户平台->服务商功能->点金计划->特约商户管理->同业过滤标签) diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/LovefeastService.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/LovefeastService.java index 9de9cfd2..24000332 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/LovefeastService.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/LovefeastService.java @@ -49,6 +49,7 @@ private LovefeastService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** LovefeastService构造器 */ public static class Builder { @@ -108,6 +109,7 @@ public BrandEntity getBrand(GetBrandRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, BrandEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询用户捐赠单详情 * @@ -144,6 +146,7 @@ public OrdersEntity getByUser(GetByUserRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, OrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询用户捐赠单列表 * diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Amount.java index 23bd8892..bf19ab05 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Amount.java @@ -20,12 +20,15 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分。 */ @SerializedName("total") private Integer total; + /** 用户支付金额 说明:用户支付金额,单位为分。 */ @SerializedName("payer_total") private Integer payerTotal; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; + /** 用户支付币种 说明:用户支付币种 */ @SerializedName("payer_currency") private String payerCurrency; diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/BrandEntity.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/BrandEntity.java index 09ae74d9..ccc111ab 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/BrandEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/BrandEntity.java @@ -20,6 +20,7 @@ public class BrandEntity { /** 捐赠数量 说明:用户在该品牌下捐赠的总次数 */ @SerializedName("donate_count") private Long donateCount; + /** 供餐数量 说明:仅供参品牌返回,该品牌为环卫工人供餐总量 */ @SerializedName("consume_count") private Long consumeCount; diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/GetByUserRequest.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/GetByUserRequest.java index 095cb5a4..84e5dc3b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/GetByUserRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/GetByUserRequest.java @@ -22,6 +22,7 @@ public class GetByUserRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 */ @SerializedName("out_trade_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/ListByUserRequest.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/ListByUserRequest.java index b37b7121..5869b4de 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/ListByUserRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/ListByUserRequest.java @@ -22,14 +22,17 @@ public class ListByUserRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 品牌ID 说明:品牌的品牌ID,商家进驻微信支付品牌商家后获得的品牌ID */ @SerializedName("brand_id") @Expose(serialize = false) private Long brandId; + /** 最大记录条数 说明:返回的最大记录条数,默认值为10 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** 起始位置 说明:查询起始位置,默认值为0 */ @SerializedName("offset") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/MerchantOrder.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/MerchantOrder.java index 01692c82..ee982b07 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/MerchantOrder.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/MerchantOrder.java @@ -20,12 +20,15 @@ public class MerchantOrder { /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 特殊规则:最小字符长度为6 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 服务商户号 说明:直连商户的商户号或服务商的商户号,由微信支付生成并下发。 */ @SerializedName("mchid") private String mchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发。 */ @SerializedName("sub_mchid") private String subMchid; + /** 门店编号 说明:一块捐用户所在门店的商家编号。 */ @SerializedName("store_id") private String storeId; diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersEntity.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersEntity.java index 91e30acd..eb3adf50 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersEntity.java @@ -20,30 +20,39 @@ public class OrdersEntity { /** 捐赠订单号 说明:捐赠订单号 */ @SerializedName("welfare_trade_id") private String welfareTradeId; + /** 应用ID 说明:直连商户或服务商申请的公众号或移动应用AppID */ @SerializedName("appid") private String appid; + /** 子商户应用ID 说明:子商户申请的公众号或移动应用AppID */ @SerializedName("sub_appid") private String subAppid; + /** 品牌ID 说明:品牌的品牌ID,商家进驻微信支付品牌商家后获得的品牌ID */ @SerializedName("brand_id") private Long brandId; + /** 捐赠来源 说明:捐赠来源 枚举值 MINIPROGRAM_PAY:一起捐小程序 ENTRUST_PAY:一块捐插件 */ @SerializedName("donate_source") private String donateSource; + /** 商户订单 说明:商户订单,仅在一块捐来源回调中出现 */ @SerializedName("merchant_order") private MerchantOrder merchantOrder; + /** 捐赠机构名称 说明:捐赠公益机构名称。 */ @SerializedName("institution_name") private String institutionName; + /** 捐赠项目编号 说明:本次捐赠项目编号。 */ @SerializedName("business_id") private String businessId; + /** 捐赠活动名称 说明:本次捐赠活动名称。 */ @SerializedName("business_name") private String businessName; + /** * 支付完成时间 * 说明:支付完成时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -51,12 +60,15 @@ public class OrdersEntity { */ @SerializedName("success_time") private String successTime; + /** 支付者 说明:支付者信息 */ @SerializedName("payer") private Payer payer; + /** 订单金额 说明:订单金额信息 */ @SerializedName("amount") private Amount amount; + /** 设备编号 说明:设备编号,通过物料码进入爱心餐一起捐小程序捐赠时携带的设备编号参数 */ @SerializedName("device_id") private String deviceId; diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersListByUserResponse.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersListByUserResponse.java index 791ed4f4..f5b6f749 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersListByUserResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/OrdersListByUserResponse.java @@ -22,15 +22,19 @@ public class OrdersListByUserResponse { /** 捐赠单详情 说明:捐赠单详情 */ @SerializedName("data") private List data = new ArrayList(); + /** 该次请求返回的记录条数 说明:该次请求返回的记录条数 */ @SerializedName("count") private Integer count; + /** 最大记录条数 说明:返回的最大记录条数,默认值为10 */ @SerializedName("limit") private Integer limit; + /** 起始位置 说明:查询起始位置。 */ @SerializedName("offset") private Integer offset; + /** 全部记录数量 说明:全部记录数量 */ @SerializedName("total_count") private Long totalCount; diff --git a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Payer.java b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Payer.java index 958d8cf7..93c0e813 100644 --- a/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Payer.java +++ b/service/src/main/java/com/wechat/pay/java/service/lovefeast/model/Payer.java @@ -20,12 +20,15 @@ public class Payer { /** 用户标识 说明:用户在AppID下的唯一标识。在【一块捐】场景下按照商家下单时AppID生成;在【一起捐】场景下按照商户登记AppID生成。 */ @SerializedName("openid") private String openid; + /** 用户子标识 说明:用户在子AppID下的唯一标识。在【一块捐】场景下按照商家下单时子AppID生成;在【一起捐】场景下按照商户登记子AppID生成。 */ @SerializedName("sub_openid") private String subOpenid; + /** 用户头像 说明:用户在爱心餐小程序授权头像的URL */ @SerializedName("avatar") private String avatar; + /** 用户昵称 说明:用户在爱心餐小程序授权昵称 */ @SerializedName("nickname") private String nickname; diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesService.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesService.java index 803bda57..494bb2e3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesService.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/MarketingBankPackagesService.java @@ -46,6 +46,7 @@ private MarketingBankPackagesService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** MarketingBankPackagesService构造器 */ public static class Builder { diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/CreateTaskRequest.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/CreateTaskRequest.java index f61aec37..c27627a0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/CreateTaskRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/CreateTaskRequest.java @@ -24,6 +24,7 @@ public class CreateTaskRequest { */ @SerializedName("file") private FormFile file; + /** 文件元信息 说明:快捷协议号包的文件元信息 */ @SerializedName("meta") private FileMeta meta; diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FileMeta.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FileMeta.java index 7cac17d4..300c2e96 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FileMeta.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FileMeta.java @@ -21,9 +21,11 @@ public class FileMeta { /** 文件名 说明:快捷协议号包文件名。可包含英文字母,数字,_,.,-等内容,不允许出现其他不合法符号。同一个号码包的多个上传任务的文件名不可重复,要保证唯一 */ @SerializedName("filename") private String filename; + /** 文件摘要 说明:快捷交易协议号文件的文件摘要,即快捷交易协议号文件的二进制内容进行sha256计算得到的值 */ @SerializedName("sha256") private String sha256; + /** * 银行类型 * 说明:银行类型,用于标识协议号所属的银行以及卡类型(信用卡或借记卡)。采用字符串类型的银行标识,值列表详见[银行类型](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/terms_definition/chapter1_1_3.shtml#part-7) diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FormFile.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FormFile.java index 09888722..692af54d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FormFile.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/FormFile.java @@ -21,9 +21,11 @@ public class FormFile { /** 文件名 说明:由表单上传的文件部分的文件名 */ @SerializedName("filename") private String filename; + /** 文件类型 说明:表示上传文件的 Content-Type */ @SerializedName("content_type") private String contentType; + /** 文件内容 说明:一个二进制串表示上传文件的整体内容 */ @SerializedName("content") private String content; diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskRequest.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskRequest.java index 5bdf267b..90484a5e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskRequest.java @@ -23,18 +23,22 @@ public class ListTaskRequest { @SerializedName("package_id") @Expose(serialize = false) private String packageId; + /** 文件名 说明:任务上传的文件名 */ @SerializedName("filename") @Expose(serialize = false) private String filename; + /** 分页页码 说明:分页页码,页码从0开始 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:分页大小,单次最多查询20条记录 */ @SerializedName("limit") @Expose(serialize = false) private Long limit; + /** 任务状态 说明:上传任务的状态:PROCESSING - 处理中,FINISHED - 已完成 */ @SerializedName("status") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskResponse.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskResponse.java index d78d181d..01742d92 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/ListTaskResponse.java @@ -22,12 +22,15 @@ public class ListTaskResponse { /** 上传任务列表 说明:符合条件的上传任务列表 */ @SerializedName("data") private List data; + /** 总数量 说明:总数量 */ @SerializedName("total_count") private Long totalCount; + /** 分页页码 说明:分页页码,页码从0开始 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/Task.java b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/Task.java index 34205d5c..5684a50b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/Task.java +++ b/service/src/main/java/com/wechat/pay/java/service/marketingbankpackages/model/Task.java @@ -21,12 +21,15 @@ public class Task { /** 上传任务 说明:上传任务的主键,唯一定义此资源的标识 */ @SerializedName("task_id") private String taskId; + /** 号码包id 说明:号码包唯一标识符。可在微信支付商户平台创建号码包后获得。 */ @SerializedName("package_id") private String packageId; + /** 文件名 说明:任务上传的文件名 */ @SerializedName("filename") private String filename; + /** * 创建上传任务的时间 * 说明:时间格式采用遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -34,6 +37,7 @@ public class Task { */ @SerializedName("create_time") private String createTime; + /** * 上传任务最近一次更新的时间 * 说明:时间格式采用遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -41,24 +45,29 @@ public class Task { */ @SerializedName("update_time") private String updateTime; + /** 成功数 说明:匹配成功的协议号数。仅当任务状态是FINISHED时,该数据才有效 */ @SerializedName("success_count") private Long successCount; + /** 失败数 说明:匹配失败的协议号数。仅当任务状态是FINISHED时,该数据才有效 */ @SerializedName("fail_count") private Long failCount; + /** * 匹配成功的微信用户数 * 说明:匹配成功的微信用户数,不小于匹配成功的协议号数。当一张银行卡被用户绑定到不同微信号时,才可能出现一个协议号对应多个微信账户的情况。仅当任务状态是FINISHED时,该数据才有效 */ @SerializedName("success_user_count") private Long successUserCount; + /** * 银行类型 * 说明:银行类型,用于标识协议号所属的银行以及卡类型(信用卡或借记卡)。采用字符串类型的银行标识,值列表详见[银行类型](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/terms_definition/chapter1_1_3.shtml#part-7) */ @SerializedName("bank_type") private String bankType; + /** 任务状态 说明:上传任务的状态:PROCESSING - 处理中,FINISHED - 已完成 */ @SerializedName("status") private TaskStatus status; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java index 4701a50a..3975b800 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/MerchantExclusiveCouponService.java @@ -89,6 +89,7 @@ private MerchantExclusiveCouponService(HttpClient httpClient, HostName hostName) this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** MerchantExclusiveCouponService构造器 */ public static class Builder { @@ -159,6 +160,7 @@ public CouponCodeInfoResponse couponCodeInfo(CouponCodeInfoRequest request) { httpClient.execute(httpRequest, CouponCodeInfoResponse.class); return httpResponse.getServiceResponse(); } + /** * 创建商家券 * @@ -189,6 +191,7 @@ public CreateBusiFavorStockResponse createBusifavorStock(CreateBusiFavorStockReq httpClient.execute(httpRequest, CreateBusiFavorStockResponse.class); return httpResponse.getServiceResponse(); } + /** * 删除预存code * @@ -232,6 +235,7 @@ public DeleteCouponCodeResponse deleteCouponCode(DeleteCouponCodeRequest request httpClient.execute(httpRequest, DeleteCouponCodeResponse.class); return httpResponse.getServiceResponse(); } + /** * 修改批次预算 * @@ -267,6 +271,7 @@ public ModifyBudgetResponse modifyBudget(ModifyBudgetRequest request) { httpClient.execute(httpRequest, ModifyBudgetResponse.class); return httpResponse.getServiceResponse(); } + /** * 修改商家券基本信息 * @@ -298,6 +303,7 @@ public void modifyStockInfo(ModifyStockInfoRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * 查询预存code列表 * @@ -347,6 +353,7 @@ public CouponCodeListResponse queryCouponCodeList(QueryCouponCodeListRequest req httpClient.execute(httpRequest, CouponCodeListResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询商家券批次详情 * @@ -380,6 +387,7 @@ public StockGetResponse queryStock(QueryStockRequest request) { httpClient.execute(httpRequest, StockGetResponse.class); return httpResponse.getServiceResponse(); } + /** * 上传预存code * @@ -415,6 +423,7 @@ public UploadCouponCodeResponse uploadCouponCode(UploadCouponCodeRequest request httpClient.execute(httpRequest, UploadCouponCodeResponse.class); return httpResponse.getServiceResponse(); } + /** * 获取商家券事件通知地址 * @@ -451,6 +460,7 @@ public GetCouponNotifyResponse getCouponNotify(GetCouponNotifyRequest request) { httpClient.execute(httpRequest, GetCouponNotifyResponse.class); return httpResponse.getServiceResponse(); } + /** * 设置商家券事件通知地址 * @@ -481,6 +491,7 @@ public SetCouponNotifyResponse setCouponNotify(SetCouponNotifyRequest request) { httpClient.execute(httpRequest, SetCouponNotifyResponse.class); return httpResponse.getServiceResponse(); } + /** * 关联订单信息 * @@ -511,6 +522,7 @@ public AssociateTradeInfoResponse associateTradeInfo(AssociateTradeInfoRequest r httpClient.execute(httpRequest, AssociateTradeInfoResponse.class); return httpResponse.getServiceResponse(); } + /** * 使券失效 * @@ -541,6 +553,7 @@ public DeactivateCouponResponse deactivateCoupon(DeactivateCouponRequest request httpClient.execute(httpRequest, DeactivateCouponResponse.class); return httpResponse.getServiceResponse(); } + /** * 取消关联订单信息 * @@ -572,6 +585,7 @@ public DisassociateTradeInfoResponse disassociateTradeInfo(DisassociateTradeInfo httpClient.execute(httpRequest, DisassociateTradeInfoResponse.class); return httpResponse.getServiceResponse(); } + /** * 根据过滤条件查询用户的券 * @@ -633,6 +647,7 @@ public CouponListResponse listCouponsByFilter(ListCouponsByFilterRequest request httpClient.execute(httpRequest, CouponListResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询用户券详情 * @@ -671,6 +686,7 @@ public CouponEntity queryCoupon(QueryCouponRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, CouponEntity.class); return httpResponse.getServiceResponse(); } + /** * 申请退券 * @@ -701,6 +717,7 @@ public ReturnCouponResponse returnCoupon(ReturnCouponRequest request) { httpClient.execute(httpRequest, ReturnCouponResponse.class); return httpResponse.getServiceResponse(); } + /** * 向用户发券 * @@ -731,6 +748,7 @@ public SendCouponResponse sendCoupon(SendCouponRequest request) { httpClient.execute(httpRequest, SendCouponResponse.class); return httpResponse.getServiceResponse(); } + /** * 发放政府消费卡 * @@ -766,6 +784,7 @@ public CouponSendGovCardResponse sendGovCard(SendGovCardRequest request) { httpClient.execute(httpRequest, CouponSendGovCardResponse.class); return httpResponse.getServiceResponse(); } + /** * 核销用户的券 * @@ -796,6 +815,7 @@ public UseCouponResponse useCoupon(UseCouponRequest request) { httpClient.execute(httpRequest, UseCouponResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询商家券营销补差付款单详情 * @@ -832,6 +852,7 @@ public SubsidyPayReceipt payReceiptInfo(PayReceiptInfoRequest request) { httpClient.execute(httpRequest, SubsidyPayReceipt.class); return httpResponse.getServiceResponse(); } + /** * 查询商家券营销补差付款单列表 * @@ -875,6 +896,7 @@ public SubsidyPayReceiptListResponse payReceiptList(PayReceiptListRequest reques httpClient.execute(httpRequest, SubsidyPayReceiptListResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询商家券营销补差回退单详情 * @@ -912,6 +934,7 @@ public SubsidyReturnReceipt returnReceiptInfo(ReturnReceiptInfoRequest request) httpClient.execute(httpRequest, SubsidyReturnReceipt.class); return httpResponse.getServiceResponse(); } + /** * 商家券营销补差付款 * @@ -943,6 +966,7 @@ public SubsidyPayReceipt subsidyPay(SubsidyPayRequest request) { httpClient.execute(httpRequest, SubsidyPayReceipt.class); return httpResponse.getServiceResponse(); } + /** * 商家券营销补差回退 * diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java index da52c20c..2c9c11bd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AssociateTradeInfoRequest.java @@ -21,12 +21,15 @@ public class AssociateTradeInfoRequest { /** 批次号 说明:微信为每个商家券批次分配的唯一ID,对于商户自定义code的批次,关联请求必须填写批次号 */ @SerializedName("stock_id") private String stockId; + /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 关联的商户订单号 说明:微信支付下单时的商户订单号,欲与该商家券关联的微信支付 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 请求业务单据号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,\\_,\\*,-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java index 17ff41d0..d69473b8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableCurrentDayTime.java @@ -21,6 +21,7 @@ public class AvailableCurrentDayTime { /** 当天可用开始时间 说明:当天可用开始时间 单位秒 1代表当天0点0分1秒 */ @SerializedName("begin_time") private Long beginTime; + /** 当天可用结束时间 说明:当天可用结束时间 单位秒 86399代表当天23点59分59秒 */ @SerializedName("end_time") private Long endTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java index 7a4a7e4b..632095d6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/AvailableWeek.java @@ -22,6 +22,7 @@ public class AvailableWeek { /** 可用星期数 说明:0代表周日,1代表周一,以此类推 当填写available_day_time时,week_day必填 */ @SerializedName("week_day") private List weekDay; + /** 当天可用时间段 说明:可以填写多个时间段,最多不超过2个 */ @SerializedName("available_day_time") private List availableDayTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java index 8f7023bf..063947bf 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeCount.java @@ -21,6 +21,7 @@ public class CouponCodeCount { /** 该批次总共已上传的code总数 说明:该批次总共已上传的code总数 */ @SerializedName("total_count") private Long totalCount; + /** 该批次当前可用的code数 说明:该批次当前可用的code数 */ @SerializedName("available_count") private Long availableCount; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java index 0a3e0ebc..dd6af353 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeEntity.java @@ -21,24 +21,30 @@ public class CouponCodeEntity { /** 商户上传code 说明:商户上传code */ @SerializedName("code") private String code; + /** 商户上传code分配状态 说明:商户上传code分配状态 */ @SerializedName("code_status") private CouponCodeStatus codeStatus; + /** 上传时间 说明:code上传成功的时间 */ @SerializedName("upload_time") private String uploadTime; + /** 被分配时间 说明:当code状态为被分配时,code被分配的时间 */ @SerializedName("dispatched_time") private String dispatchedTime; + /** 领券用户的OpenID 说明:领券用户的OpenID */ @SerializedName("openid") private String openid; + /** * 领券用户的UnionID * 说明:领券用户的UnionID,具体参见https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/union-id.html */ @SerializedName("unionid") private String unionid; + /** 用户券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java index 47133e0f..b11c2cdb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoRequest.java @@ -23,10 +23,12 @@ public class CouponCodeInfoRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 商户上传code 说明:商户上传code */ @SerializedName("coupon_code") @Expose(serialize = false) private String couponCode; + /** 公众账号ID 说明:公众账号ID */ @SerializedName("appid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java index 6a44ca5c..96685c8c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeInfoResponse.java @@ -21,6 +21,7 @@ public class CouponCodeInfoResponse { /** 商户上传code信息 说明:商户上传code信息,含状态,上传时间等 */ @SerializedName("code_information") private CouponCodeEntity codeInformation; + /** 用户券信息 说明:用户券信息,仅当商户上传code的状态为DISPATCHED时返回券详情 */ @SerializedName("coupon_information") private CouponEntity couponInformation; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java index 1c9884df..8ee28172 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponCodeListResponse.java @@ -22,15 +22,19 @@ public class CouponCodeListResponse { /** 批次号 说明:商家券批次号 */ @SerializedName("stock_id") private String stockId; + /** 总数 说明:该批次已上传code总个数 */ @SerializedName("total_count") private Long totalCount; + /** 查询code结果列表 说明:查询code的结果列表 */ @SerializedName("data") private List data; + /** 分页起始位置 说明:分页起始位置,与请求相同 */ @SerializedName("offset") private Long offset; + /** 返回数据的个数 说明:返回数据的实际个数 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java index 37ad8430..8eb83ec6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponEntity.java @@ -21,77 +21,101 @@ public class CouponEntity { /** 批次归属商户号 说明:代金券的所属商户号 */ @SerializedName("belong_merchant") private String belongMerchant; + /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("stock_name") private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("comment") private String comment; + /** 适用商品范围 说明:适用商品范围,字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("goods_name") private String goodsName; + /** 批次类型 说明:批次类型 */ @SerializedName("stock_type") private BusiFavorStockType stockType; + /** 是否允许转赠 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ @SerializedName("transferable") private Boolean transferable; + /** 是否允许分享领券链接 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ @SerializedName("shareable") private Boolean shareable; + /** 券状态 说明:商家券状态 */ @SerializedName("coupon_state") private CouponStatus couponState; + /** 样式信息 说明: */ @SerializedName("display_pattern_info") private DisplayPatternInfo displayPatternInfo; + /** 券核销规则 说明: */ @SerializedName("coupon_use_rule") private CouponUseRule couponUseRule; + /** 自定义入口 说明: */ @SerializedName("custom_entrance") private CustomEntrance customEntrance; + /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; + /** * 券可使用开始时间 说明:用户领取到的这张券实际可使用的开始时间:如批次设置的领取后可用,则开始时间即为券的领取时间; 如批次设置的领取后第X天可用,则为领取时间后第X天00:00:00 */ @SerializedName("available_start_time") private String availableStartTime; + /** 券过期时间 说明:用户领取到这张券的过期时间 */ @SerializedName("expire_time") private String expireTime; + /** 券领取时间 说明:用户领取到这张券的时间 */ @SerializedName("receive_time") private String receiveTime; + /** 发券请求单号 说明:发券时传入的唯一凭证 */ @SerializedName("send_request_no") private String sendRequestNo; + /** 核销请求单号 说明:核销时传入的唯一凭证(如券已被核销,将返回此字段) */ @SerializedName("use_request_no") private String useRequestNo; + /** 券核销时间 说明:券被核销的时间(如券已被核销,将返回此字段) */ @SerializedName("use_time") private String useTime; + /** 关联的商户订单号 说明:若商家券操作过关联商户订单信息,则该字段返回商家券已关联的商户订单号。 */ @SerializedName("associate_out_trade_no") private String associateOutTradeNo; + /** 回退请求单号 说明:回退时传入的唯一凭证(如券发生了退回,将返回此字段) */ @SerializedName("return_request_no") private String returnRequestNo; + /** 券回退时间 说明:券被回退的时间(如券发生了退回,将返回此字段) */ @SerializedName("return_time") private String returnTime; + /** 失效请求单号 说明:失效时传入的唯一凭证(如果一张券已失效,将返回此字段) */ @SerializedName("deactivate_request_no") private String deactivateRequestNo; + /** 券失效时间 说明:券被失效的时间(如果一张券已失效,将返回此字段) */ @SerializedName("deactivate_time") private String deactivateTime; + /** 失效原因 说明:失效一张券的原因(如果一张券已失效,可能返回此字段) */ @SerializedName("deactivate_reason") private String deactivateReason; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java index 90266707..0af4998e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponListResponse.java @@ -22,12 +22,15 @@ public class CouponListResponse { /** 结果集 */ @SerializedName("data") private List data; + /** 总数量 说明:总数量 */ @SerializedName("total_count") private Integer totalCount; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Integer limit; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") private Integer offset; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java index b3e5bd5c..419190dc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponSendGovCardRequest.java @@ -21,12 +21,15 @@ public class CouponSendGovCardRequest { /** 消费卡card_id创建方AppID 说明:消费卡cardi\\_d创建方的AppID,需与API调用方商户号有绑定关系,入参中的用户OpenID也需用此AppID生成 */ @SerializedName("appid") private String appid; + /** 用户OpenID 说明:待发券用户的OpenID,需为消费卡创建方AppID生成的OpenID */ @SerializedName("openid") private String openid; + /** 商户单据号 说明:商户此次发放凭据号。推荐使用大小写字母和数字,不同添加请求发放凭据号不同,商户侧需保证同一发券请求的out_request_no+send_time唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 请求发卡时间 * 说明:单次请求发卡时间,消费卡在商户系统的实际发放时间,为东八区标准时间(UTC+8)。商户需保证同一次请求的out_request_no+send_time唯一。由于系统限制,暂不支持传入早于当前时间24小时以上的时间进行发券请求。 diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java index 0b3bf3f0..5fa42a7f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CouponUseRule.java @@ -21,21 +21,27 @@ public class CouponUseRule { /** 券可核销时间 说明:日期区间内可以使用优惠 */ @SerializedName("coupon_available_time") private FavorAvailableTime couponAvailableTime; + /** 固定面额满减券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为NORMAL时必填。 */ @SerializedName("fixed_normal_coupon") private FixedValueStockMsg fixedNormalCoupon; + /** 折扣券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为DISCOUNT时必填。 */ @SerializedName("discount_coupon") private DiscountMsg discountCoupon; + /** 换购券使用规则 说明:固定面额满减,折扣券,换购券使用规则三选一,stock_type为EXCHANGE时必填。 */ @SerializedName("exchange_coupon") private ExchangeMsg exchangeCoupon; + /** 核销方式 说明:核销方式 */ @SerializedName("use_method") private CouponUseMethod useMethod; + /** 小程序AppID 说明:核销方式为线上小程序核销才有效 */ @SerializedName("mini_programs_appid") private String miniProgramsAppid; + /** 小程序path 说明:核销方式为线上小程序核销才有效 */ @SerializedName("mini_programs_path") private String miniProgramsPath; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java index 0b3e247c..4a1fe347 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockRequest.java @@ -21,33 +21,43 @@ public class CreateBusiFavorStockRequest { /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("stock_name") private String stockName; + /** 批次归属商户号 说明:批次归属于哪个商户。 注: 普通直连模式,该参数为直连商户号; 服务商模式,该参数为子商户号; 间连模式,该参数为子商户号。 */ @SerializedName("belong_merchant") private String belongMerchant; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("comment") private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("goods_name") private String goodsName; + /** 批次类型 说明:批次类型 */ @SerializedName("stock_type") private BusiFavorStockType stockType; + /** 核销规则 说明:券核销相关规则 */ @SerializedName("coupon_use_rule") private CouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ @SerializedName("stock_send_rule") private StockSendRule stockSendRule; + /** 商户请求单号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ @SerializedName("custom_entrance") private CustomEntrance customEntrance; + /** 样式信息 说明:创建批次时的样式信息。 */ @SerializedName("display_pattern_info") private DisplayPatternInfo displayPatternInfo; + /** * 券code模式 说明:特殊规则: 1、券code模式为WECHATPAY\\_MODE时,是微信自动分配券code,商户不需要预存code;适用于多种场景 * 2、券code模式为MERCHANT\\_API时,无需调用上传预存code接口,调用发券接口时需指定券code;更多用在商家自有流量场景(例如:商家自有小程序、H5网页等) @@ -55,9 +65,11 @@ public class CreateBusiFavorStockRequest { */ @SerializedName("coupon_code_mode") private CouponCodeMode couponCodeMode; + /** 事件通知配置 说明:事件回调通知商户的配置 */ @SerializedName("notify_config") private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差,默认为false 注:该字段暂未开放 */ @SerializedName("subsidy") private Boolean subsidy; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java index bef46084..f632875e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CreateBusiFavorStockResponse.java @@ -21,6 +21,7 @@ public class CreateBusiFavorStockResponse { /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; + /** * 创建时间 * 说明:创建时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java index 15aa20cd..5f52cdcb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/CustomEntrance.java @@ -25,21 +25,25 @@ public class CustomEntrance { */ @SerializedName("mini_programs_info") private MiniAppInfo miniProgramsInfo; + /** * 商户公众号AppID 说明:可配置商户公众号,从券详情可跳转至公众号,用户自定义字段。 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID 或 * 传入的AppID得是归属商户号有绑定关系的AppID */ @SerializedName("appid") private String appid; + /** * 更多优惠入口;营销馆创建地址:https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list * 说明:填写微信支付营销馆的馆ID,用户自定义字段。[营销馆](https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list)需在商户平台创建。 */ @SerializedName("hall_id") private String hallId; + /** 可用门店ID 说明:填写代金券可用门店ID */ @SerializedName("store_id") private String storeId; + /** code展示模式 说明:code展示模式 */ @SerializedName("code_display_mode") private CodeDisplayMode codeDisplayMode; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java index 4118696b..1240898d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeactivateCouponRequest.java @@ -21,12 +21,15 @@ public class DeactivateCouponRequest { /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 批次号 说明:券的所属批次号 */ @SerializedName("stock_id") private String stockId; + /** 失效请求单据号 说明:每次失效请求的唯一标识,商户需保证唯一 */ @SerializedName("deactivate_request_no") private String deactivateRequestNo; + /** 失效原因 说明:商户失效券的原因 */ @SerializedName("deactivate_reason") private String deactivateReason; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java index dedc40a8..013abeab 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeRequest.java @@ -23,10 +23,12 @@ public class DeleteCouponCodeRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 券code 说明:上传的自定义code */ @SerializedName("coupon_code") @Expose(serialize = false) private String couponCode; + /** 请求业务单据号 说明:商户删除code的凭据号,商户侧需保持唯一性 */ @SerializedName("delete_request_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java index 2239b3c0..135dd7ed 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DeleteCouponCodeResponse.java @@ -21,6 +21,7 @@ public class DeleteCouponCodeResponse { /** 批次号 说明:商家券批次号 */ @SerializedName("stock_id") private String stockId; + /** 删除时间 说明:商家券code实际被删除的时间 */ @SerializedName("delete_time") private String deleteTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java index 341d0b9f..d597639f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisassociateTradeInfoRequest.java @@ -21,12 +21,15 @@ public class DisassociateTradeInfoRequest { /** 批次号 说明:微信为每个商家券批次分配的唯一ID, 对于商户自定义code的批次,关联请求必须填写批次号 */ @SerializedName("stock_id") private String stockId; + /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 取消关联的商户订单号 说明:欲取消与商家券关联的微信支付下单的商户订单号,该单号需要已操作过与券关联,否则无法取消关联 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 请求业务单据号 说明:商户创建批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java index 64003db7..30d4f72d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DiscountMsg.java @@ -21,6 +21,7 @@ public class DiscountMsg { /** 折扣比例 说明:折扣百分比,88为88折 */ @SerializedName("discount_percent") private Integer discountPercent; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ @SerializedName("transaction_minimum") private Long transactionMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java index 6fa6f4d6..84562cfc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/DisplayPatternInfo.java @@ -21,6 +21,7 @@ public class DisplayPatternInfo { /** 使用须知 说明:用于说明详细的活动规则,会展示在代金券详情页。 */ @SerializedName("description") private String description; + /** * 商户logo * 说明:若券归属商户号有认证品牌,则系统将自动拉取对应品牌logo;若券归属商户号不在认证品牌下,需自定义上传logo,未上传时将展示兜底灰色logo样式,影响券详情页用户体验,请及时上传。 @@ -29,24 +30,28 @@ public class DisplayPatternInfo { */ @SerializedName("merchant_logo_url") private String merchantLogoUrl; + /** * 商户名称 说明:不支持商户自定义。若券归属商户号有认证品牌,系统将自动拉取认证品牌号下的品牌名称;若券归属商户号不在认证品牌下,则拉取本商户号的商户简称。展示上限12个字符。 * 注:该字段暂不支持修改 */ @SerializedName("merchant_name") private String merchantName; + /** * 背景颜色 * 说明:券的背景颜色,可设置10种颜色,色值请参考[卡券背景颜色图](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_2_1.shtml#part-01)。颜色取值为颜色图中的颜色名称。 */ @SerializedName("background_color") private String backgroundColor; + /** * 券详情图片 * 说明:券详情图片,1074像素(宽)\\*603像素(高),图片大小不超过2M,支持JPG/PNG格式。仅支持通过《[图片上传API](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_0_1.shtml)》接口获取的图片URL地址。 */ @SerializedName("coupon_image_url") private String couponImageUrl; + /** 视频号相关信息 说明:视频号相关信息 */ @SerializedName("finder_info") private FinderInfo finderInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java index 418eb9f7..08745264 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ExchangeMsg.java @@ -21,6 +21,7 @@ public class ExchangeMsg { /** 单品换购价 说明:单品换购价,单位:分。 特殊规则:取值范围 0 ≤ value ≤ 10000000 */ @SerializedName("exchange_price") private Long exchangePrice; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ @SerializedName("transaction_minimum") private Long transactionMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java index f4bdbdb6..b05a7529 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FavorAvailableTime.java @@ -26,6 +26,7 @@ public class FavorAvailableTime { */ @SerializedName("available_begin_time") private String availableBeginTime; + /** * 结束时间 * 说明:批次结束时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -33,18 +34,22 @@ public class FavorAvailableTime { */ @SerializedName("available_end_time") private String availableEndTime; + /** * 生效后N天内有效 * 说明:日期区间内,券生效后x天内有效。例如生效当天内有效填1,生效后2天内有效填2,以此类推……注意,用户在有效期开始前领取商家券,则从有效期第1天开始计算天数,用户在有效期内领取商家券,则从领取当天开始计算天数,无论用户何时领取商家券,商家券在活动有效期结束后均不可用。可配合wait_days_after_receive一同填写,也可单独填写。单独填写时,有效期内领券后立即生效,生效后x天内有效。 */ @SerializedName("available_day_after_receive") private Integer availableDayAfterReceive; + /** 固定周期有效时间段 说明:可以设置多个星期下的多个可用时间段,比如每周二10点到18点 */ @SerializedName("available_week") private AvailableWeek availableWeek; + /** 无规律的有效时间段 说明:无规律的有效时间,多个无规律时间段 */ @SerializedName("irregulary_avaliable_time") private List irregularyAvaliableTime; + /** * 领取后N天开始生效 * 说明:日期区间内,用户领券后需等待x天开始生效。例如领券后当天开始生效则无需填写,领券后第2天开始生效填1,以此类推……用户在有效期开始前领取商家券,则从有效期第1天开始计算天数,用户在有效期内领取商家券,则从领取当天开始计算天数。无论用户何时领取商家券,商家券在活动有效期结束后均不可用。需配合available_day_after_receive一同填写,不可单独填写。注:最大不能超过30天 diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java index b437dc36..9d5e6ca7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FinderInfo.java @@ -24,12 +24,14 @@ public class FinderInfo { */ @SerializedName("finder_id") private String finderId; + /** * 视频号视频ID * 说明:券详情视频内容,支持配置关联视频号下的具体视频内容,入参参数请配置视频id,请前往[视频号助手](https://channels.weixin.qq.com)管理后台复制具体视频ID */ @SerializedName("finder_video_id") private String finderVideoId; + /** * 视频号封面图 说明:截取的视频号图片将在券到期提醒消息、券详情中展示。 1.图片尺寸:716像素(宽)\\*402像素(高);图片大小不超过2M,支持JPG/PNG格式。 * 2.仅支持通过《[图片上传API](https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter9_0_1.shtml)》接口获取的图片URL地址。 diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java index dbebd6dd..b1dbeab4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/FixedValueStockMsg.java @@ -21,6 +21,7 @@ public class FixedValueStockMsg { /** 优惠金额 说明:优惠金额 单位分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ @SerializedName("discount_amount") private Long discountAmount; + /** 消费门槛 说明:消费门槛,单位:分。 特殊规则:取值范围 1 ≤ value ≤ 10000000 */ @SerializedName("transaction_minimum") private Long transactionMinimum; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java index a25ce7c5..7ea08876 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/GetCouponNotifyResponse.java @@ -21,6 +21,7 @@ public class GetCouponNotifyResponse { /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java index 65cd6aa3..18c789b2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/IrregularAvailableTime.java @@ -25,6 +25,7 @@ public class IrregularAvailableTime { */ @SerializedName("begin_time") private String beginTime; + /** * 结束时间 * 说明:结束时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java index ffb90898..e03aa8ed 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ListCouponsByFilterRequest.java @@ -26,6 +26,7 @@ public class ListCouponsByFilterRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。 * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID 或 传入的AppID得是归属商户号有绑定关系的AppID @@ -33,30 +34,37 @@ public class ListCouponsByFilterRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 批次号 说明:批次号,是否指定批次号查询 */ @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 创建批次的商户号 说明:批次创建方商户号 校验规则:当调用方商户号(即请求头中的商户号)为创建批次方商户号时,该参数必传 */ @SerializedName("creator_merchant") @Expose(serialize = false) private String creatorMerchant; + /** 批次归属商户号 说明:批次归属商户号 校验规则:当调用方商户号(即请求头中的商户号)为批次归属商户号时,该参数必传 */ @SerializedName("belong_merchant") @Expose(serialize = false) private String belongMerchant; + /** 批次发放商户号 说明:批次发放商户号 校验规则:当调用方商户号(即请求头中的商户号)为批次发放商户号时,该参数必传;委托营销关系下,请填写委托发券的商户号 */ @SerializedName("sender_merchant") @Expose(serialize = false) private String senderMerchant; + /** 分页页码 说明:分页页码 */ @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** 券状态 说明:商家券状态 */ @SerializedName("coupon_state") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java index a13c0f12..b783470e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/MiniAppInfo.java @@ -24,12 +24,15 @@ public class MiniAppInfo { */ @SerializedName("mini_programs_appid") private String miniProgramsAppid; + /** 商家小程序path 说明:商家小程序path */ @SerializedName("mini_programs_path") private String miniProgramsPath; + /** 入口文案 说明:入口文案,字数上限为5个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("entrance_words") private String entranceWords; + /** 引导文案 说明:小程序入口引导文案,用户自定义字段。字数上限为6个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("guiding_words") private String guidingWords; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java index 98708583..40a72616 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetBody.java @@ -24,23 +24,27 @@ public class ModifyBudgetBody { */ @SerializedName("target_max_coupons") private Long targetMaxCoupons; + /** * 当前批次最大发放个数 说明:当前批次最大发放个数,当传入target\\_max\\_coupons大于0时,current\\_max\\_coupons必传 注:当前批次即未修改的批次 */ @SerializedName("current_max_coupons") private Long currentMaxCoupons; + /** * 目标单天发放上限个数 说明:单天发放上限个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 * 注:目标批次即修改后的批次 */ @SerializedName("target_max_coupons_by_day") private Long targetMaxCouponsByDay; + /** * 当前单天发放上限个数 说明:当前单天发放上限个数 * ,当传入target\\_max\\_coupons\\_by\\_day大于0时,current\\_max\\_coupons\\_by\\_day必填 注:当前批次即未修改的批次 */ @SerializedName("current_max_coupons_by_day") private Long currentMaxCouponsByDay; + /** 修改预算请求单据号 说明:修改预算请求单据号 */ @SerializedName("modify_budget_request_no") private String modifyBudgetRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java index d0632f86..69379db0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetRequest.java @@ -23,29 +23,34 @@ public class ModifyBudgetRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** * 目标批次最大发放个数 说明:批次最大发放个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 * 注:目标批次即修改后的批次 */ @SerializedName("target_max_coupons") private Long targetMaxCoupons; + /** * 当前批次最大发放个数 说明:当前批次最大发放个数,当传入target\\_max\\_coupons大于0时,current\\_max\\_coupons必传 注:当前批次即未修改的批次 */ @SerializedName("current_max_coupons") private Long currentMaxCoupons; + /** * 目标单天发放上限个数 说明:单天发放上限个数,target\\_max\\_coupons与target\\_max\\_coupons\\_by\\_day只能修改一个 * 注:目标批次即修改后的批次 */ @SerializedName("target_max_coupons_by_day") private Long targetMaxCouponsByDay; + /** * 当前单天发放上限个数 说明:当前单天发放上限个数 * ,当传入target\\_max\\_coupons\\_by\\_day大于0时,current\\_max\\_coupons\\_by\\_day必填 注:当前批次即未修改的批次 */ @SerializedName("current_max_coupons_by_day") private Long currentMaxCouponsByDay; + /** 修改预算请求单据号 说明:修改预算请求单据号 */ @SerializedName("modify_budget_request_no") private String modifyBudgetRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java index 15817863..852c3e66 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyBudgetResponse.java @@ -21,6 +21,7 @@ public class ModifyBudgetResponse { /** 批次当前最大发放个数 说明:批次最大发放个数 */ @SerializedName("max_coupons") private Long maxCoupons; + /** 当前单天发放上限个数 说明:当前单天发放上限个数 */ @SerializedName("max_coupons_by_day") private Long maxCouponsByDay; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java index b1a8e522..b67ad24e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCouponUseRule.java @@ -21,9 +21,11 @@ public class ModifyCouponUseRule { /** 核销方式 说明:核销方式 */ @SerializedName("use_method") private CouponUseMethod useMethod; + /** 小程序AppID 说明:核销方式为线上小程序核销才有效 */ @SerializedName("mini_programs_appid") private String miniProgramsAppid; + /** 小程序path 说明:核销方式为线上小程序核销才有效 */ @SerializedName("mini_programs_path") private String miniProgramsPath; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java index bb60b72a..a324960d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyCustomEntrance.java @@ -21,15 +21,18 @@ public class ModifyCustomEntrance { /** 小程序入口 说明:需要小程序APPID、path、入口文案、引导文案。如果需要跳转小程序,APPID、path、入口文案为必填,引导文案非必填。AppID要与归属商户号有绑定关系 */ @SerializedName("mini_programs_info") private ModifyMiniAppInfo miniProgramsInfo; + /** 商户公众号AppID 说明:可配置商户公众号,从券详情可跳转至公众号 */ @SerializedName("appid") private String appid; + /** * 更多优惠入口;营销馆创建地址:https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list * 说明:填写微信支付营销馆的馆id,用户自定义字段。[营销馆](https://pay.weixin.qq.com/index.php/xphp/cfav_market/hall#/pages/list/list)需在商户平台创建。 */ @SerializedName("hall_id") private String hallId; + /** code展示模式 说明:code展示模式 */ @SerializedName("code_display_mode") private CodeDisplayMode codeDisplayMode; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java index 95cf5c88..9a188b07 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyMiniAppInfo.java @@ -21,12 +21,15 @@ public class ModifyMiniAppInfo { /** 商家小程序AppID 说明:需要小程序AppID与归属商户号有绑定关系 */ @SerializedName("mini_programs_appid") private String miniProgramsAppid; + /** 商家小程序path 说明:商家小程序path */ @SerializedName("mini_programs_path") private String miniProgramsPath; + /** 入口文案 说明:入口文案,字数上限为5个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("entrance_words") private String entranceWords; + /** 引导文案 说明:小程序入口引导文案,字数上限为6个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("guiding_words") private String guidingWords; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java index 08e959b3..c04b5aa6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoBody.java @@ -21,30 +21,39 @@ public class ModifyStockInfoBody { /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ @SerializedName("custom_entrance") private ModifyCustomEntrance customEntrance; + /** 批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 注:该字段暂不支持修改 */ @SerializedName("stock_name") private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("comment") private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("goods_name") private String goodsName; + /** 商户请求单号 说明:商户修改批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 样式信息 说明: */ @SerializedName("display_pattern_info") private DisplayPatternInfo displayPatternInfo; + /** 核销规则 说明:券核销相关规则 */ @SerializedName("coupon_use_rule") private ModifyCouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ @SerializedName("stock_send_rule") private ModifyStockSendRule stockSendRule; + /** 事件通知配置 说明:事件回调通知商户的配置 */ @SerializedName("notify_config") private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差。只允许从false改为true,不支持从true改为false 注:该字段暂未开放 */ @SerializedName("subsidy") private Boolean subsidy; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java index 6a6d2e16..1c2b2190 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockInfoRequest.java @@ -23,33 +23,43 @@ public class ModifyStockInfoRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ @SerializedName("custom_entrance") private ModifyCustomEntrance customEntrance; + /** 批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 注:该字段暂不支持修改 */ @SerializedName("stock_name") private String stockName; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("comment") private String comment; + /** 适用商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("goods_name") private String goodsName; + /** 商户请求单号 说明:商户修改批次凭据号(格式:商户ID+日期+流水号),商户侧需保持唯一性。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 样式信息 说明: */ @SerializedName("display_pattern_info") private DisplayPatternInfo displayPatternInfo; + /** 核销规则 说明:券核销相关规则 */ @SerializedName("coupon_use_rule") private ModifyCouponUseRule couponUseRule; + /** 发放规则 说明:券发放相关规则 */ @SerializedName("stock_send_rule") private ModifyStockSendRule stockSendRule; + /** 事件通知配置 说明:事件回调通知商户的配置 */ @SerializedName("notify_config") private NotifyConfig notifyConfig; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差。只允许从false改为true,不支持从true改为false 注:该字段暂未开放 */ @SerializedName("subsidy") private Boolean subsidy; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java index 02ddfc93..4ba3db32 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ModifyStockSendRule.java @@ -21,6 +21,7 @@ public class ModifyStockSendRule { /** 是否开启自然人限领 说明:true-是;false-否,不填默认否 注:该字段暂不支持修改 */ @SerializedName("natural_person_limit") private Boolean naturalPersonLimit; + /** 可疑账号拦截 说明:true-是;false-否,不填默认否 */ @SerializedName("prevent_api_abuse") private Boolean preventApiAbuse; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java index 6ddf931f..bd3a5c02 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/PayReceiptListRequest.java @@ -23,6 +23,7 @@ public class PayReceiptListRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; @@ -30,6 +31,7 @@ public class PayReceiptListRequest { @SerializedName("coupon_code") @Expose(serialize = false) private String couponCode; + /** 补差付款请求单号 说明:商户调用补差付款API时填写的“业务请求唯一单号” */ @SerializedName("out_subsidy_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java index 1f18dcc9..0bca498e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponCodeListRequest.java @@ -23,18 +23,22 @@ public class QueryCouponCodeListRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** 分页最大size 说明:分页查询的最大size */ @SerializedName("limit") @Expose(serialize = false) private Long limit; + /** 分页起始位置 说明:分页查询的起始位置 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 公众账号ID 说明:公众账号ID */ @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 券code状态 说明:券code状态,当不填写时为查询所有状态的code列表 */ @SerializedName("status") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java index 3cf107d6..91245bf3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/QueryCouponRequest.java @@ -23,6 +23,7 @@ public class QueryCouponRequest { @SerializedName("coupon_code") @Expose(serialize = false) private String couponCode; + /** * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。 * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID或传入的AppID得是归属商户号有绑定关系的AppID @@ -30,6 +31,7 @@ public class QueryCouponRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** * 用户OpenID 说明:OpenID信息,用户在AppID下的唯一标识。 * 校验规则:传入的OpenID得是调用方商户号(即请求头里面的商户号)有绑定关系的AppID获取的OpenID或传入的OpenID得是归属商户号有绑定关系的AppID获取的OpenID。[获取OpenID文档](https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml#part-3) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java index 3d42ad78..c81e91c9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/ReturnCouponRequest.java @@ -21,9 +21,11 @@ public class ReturnCouponRequest { /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 批次号 说明:券的所属批次号 */ @SerializedName("stock_id") private String stockId; + /** 退券请求单据号 说明:每次退券请求的唯一标识,商户需保证唯一 */ @SerializedName("return_request_no") private String returnRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java index 1dab11bb..bf703ee7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCount.java @@ -21,12 +21,15 @@ public class SendCount { /** 已发放券张数 说明:批次已发放的券数量,满减、折扣、换购类型会返回该字段 */ @SerializedName("total_send_num") private Long totalSendNum; + /** 已发放券金额 说明:批次已发放的预算金额,满减券类型会返回该字段 */ @SerializedName("total_send_amount") private Long totalSendAmount; + /** 单天已发放券张数 说明:批次当天已发放的券数量,设置了单天发放上限的满减、折扣、换购类型返回该字段 */ @SerializedName("today_send_num") private Long todaySendNum; + /** 单天已发放券金额 说明:批次当天已发放的预算金额,设置了当天发放上限的满减券类型返回该字段 */ @SerializedName("today_send_amount") private Long todaySendAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java index 54e616bb..255d1044 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponRequest.java @@ -21,15 +21,19 @@ public class SendCouponRequest { /** 用户标识 说明:用户的唯一标识,必填 */ @SerializedName("openid") private String openid; + /** 公众账号ID 说明:发券方AppID */ @SerializedName("appid") private String appid; + /** 批次号 说明:批次号 */ @SerializedName("stock_id") private String stockId; + /** 发券凭证 说明:发券凭证,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号,需在单个批次单个用户下确保唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** 券code 说明:要求接口指定code发券的批次必传 */ @SerializedName("coupon_code") private String couponCode; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java index 482d30dc..fed6ce32 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendCouponResult.java @@ -21,9 +21,11 @@ public class SendCouponResult { /** 批次号 说明:微信支付券批次ID */ @SerializedName("stock_id") private String stockId; + /** 发券凭证 说明:发券凭证,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号,需在单个批次单个用户下确保唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java index 35f449b8..ec4a2e3d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SendGovCardRequest.java @@ -23,15 +23,19 @@ public class SendGovCardRequest { @SerializedName("card_id") @Expose(serialize = false) private String cardId; + /** 消费卡card_id创建方AppID 说明:消费卡cardi\\_d创建方的AppID,需与API调用方商户号有绑定关系,入参中的用户OpenID也需用此AppID生成 */ @SerializedName("appid") private String appid; + /** 用户OpenID 说明:待发券用户的OpenID,需为消费卡创建方AppID生成的OpenID */ @SerializedName("openid") private String openid; + /** 商户单据号 说明:商户此次发放凭据号。推荐使用大小写字母和数字,不同添加请求发放凭据号不同,商户侧需保证同一发券请求的out_request_no+send_time唯一性 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 请求发卡时间 * 说明:单次请求发卡时间,消费卡在商户系统的实际发放时间,为东八区标准时间(UTC+8)。商户需保证同一次请求的out_request_no+send_time唯一。由于系统限制,暂不支持传入早于当前时间24小时以上的时间进行发券请求。 diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java index fbf8102f..a29912a6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyRequest.java @@ -21,6 +21,7 @@ public class SetCouponNotifyRequest { /** 商户号 说明:商户号,不填默认查询调用方商户号 */ @SerializedName("mchid") private String mchid; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java index 21bf1baa..b0fbc28c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SetCouponNotifyResponse.java @@ -25,9 +25,11 @@ public class SetCouponNotifyResponse { */ @SerializedName("update_time") private String updateTime; + /** 通知URL地址 说明:商户提供的用于接收商家券事件通知的URL地址,必须支持HTTPS。 */ @SerializedName("notify_url") private String notifyUrl; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java index 12ee90c8..15a03235 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockGetResponse.java @@ -21,51 +21,66 @@ public class StockGetResponse { /** 商家券批次名称 说明:批次名称,字数上限为21个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("stock_name") private String stockName; + /** 批次归属商户号 说明:批次是归属于哪个商户 注: 普通直连模式,该参数为直连商户号; 服务商模式,该参数为子商户号; 间连模式,该参数为子商户号。 */ @SerializedName("belong_merchant") private String belongMerchant; + /** 批次备注 说明:仅配置商户可见,用于自定义信息。字数上限为20个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("comment") private String comment; + /** 适应商品范围 说明:用来描述批次在哪些商品可用,会显示在微信卡包中。字数上限为15个,一个中文汉字/英文字母/数字均占用一个字数。 */ @SerializedName("goods_name") private String goodsName; + /** 批次类型 说明:批次类型 */ @SerializedName("stock_type") private BusiFavorStockType stockType; + /** 核销规则 说明:核销规则 */ @SerializedName("coupon_use_rule") private CouponUseRule couponUseRule; + /** 发放规则 说明:发放规则 */ @SerializedName("stock_send_rule") private StockSendRule stockSendRule; + /** 自定义入口 说明:卡详情页面,可选择多种入口引导用户 */ @SerializedName("custom_entrance") private CustomEntrance customEntrance; + /** 样式信息 说明:创建批次时的样式信息 */ @SerializedName("display_pattern_info") private DisplayPatternInfo displayPatternInfo; + /** 批次状态 说明:批次状态 */ @SerializedName("stock_state") private StockStatus stockState; + /** 券code模式 说明:券code模式 */ @SerializedName("coupon_code_mode") private CouponCodeMode couponCodeMode; + /** 批次号 说明:批次唯一标识 */ @SerializedName("stock_id") private String stockId; + /** * 券code数量 * 说明:当且仅当coupon_code_mode(券code模式)为MERCHANT_UPLOAD(商户上传自定义code)模式时,返回该字段;返回内容为商户上传code的数量信息 */ @SerializedName("coupon_code_count") private CouponCodeCount couponCodeCount; + /** 事件通知配置 说明:事件回调通知商户的配置 */ @SerializedName("notify_config") private NotifyConfig notifyConfig; + /** 批次发放情况 说明:批次发放情况 */ @SerializedName("send_count_information") private SendCount sendCountInformation; + /** 是否允许营销补差 说明:该批次发放的券是否允许进行补差 注:该字段暂未开放 */ @SerializedName("subsidy") private Boolean subsidy; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java index 6f6c838c..eb4c4a30 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/StockSendRule.java @@ -21,32 +21,40 @@ public class StockSendRule { /** 批次总预算 说明:总预算金额,单位分 注:该字段暂未开放 */ @SerializedName("max_amount") private Long maxAmount; + /** 批次最大发放个数 说明:批次最大可发放个数限制 特殊规则:取值范围 1 ≤ value ≤ 1000000000 */ @SerializedName("max_coupons") private Long maxCoupons; + /** 用户最大可领个数 说明:用户可领个数,每个用户最多100张券。 */ @SerializedName("max_coupons_per_user") private Integer maxCouponsPerUser; + /** 单天发放上限金额 说明:单天发放上限金额 注:该字段暂未开放 */ @SerializedName("max_amount_by_day") private Long maxAmountByDay; + /** * 单天发放上限个数 说明:单天发放上限个数(stock\\_type为DISCOUNT或EXCHANGE时可传入此字段控制单天发放上限)。 特殊规则:取值范围 1 ≤ value ≤ * 1000000000 */ @SerializedName("max_coupons_by_day") private Long maxCouponsByDay; + /** * 是否开启自然人限领 说明:不填默认否,枚举值: true:是 false:否 注:自然人防刷即同证件号下的所有账户合并计算的限领次数(限领次数指的是参数字段“用户最大领取个数”填写的值) */ @SerializedName("natural_person_limit") private Boolean naturalPersonLimit; + /** 可疑账号拦截 说明:true-是;false-否,不填默认否 */ @SerializedName("prevent_api_abuse") private Boolean preventApiAbuse; + /** 是否允许转赠,暂不开放 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ @SerializedName("transferable") private Boolean transferable; + /** 是否允许分享链接,暂不开放 说明:不填默认否,枚举值: true:是 false:否 该字段暂未开放 */ @SerializedName("shareable") private Boolean shareable; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java index 31f7fc6e..e7a6f472 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayReceipt.java @@ -21,36 +21,46 @@ public class SubsidyPayReceipt { /** 补差付款单号 说明:补差付款唯一单号,由微信支付生成,仅在补差付款成功后有返回 */ @SerializedName("subsidy_receipt_id") private String subsidyReceiptId; + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID */ @SerializedName("stock_id") private String stockId; + /** 商家券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 营销补差扣款商户号 说明:营销补差扣款商户号 */ @SerializedName("payer_merchant") private String payerMerchant; + /** 营销补差入账商户号 说明:营销补差入账商户号 */ @SerializedName("payee_merchant") private String payeeMerchant; + /** * 补差付款金额 说明:单位为分,单笔订单补差金额不得超过券的优惠金额,最高补差金额为5000元 > 券的优惠金额定义: 满减券:满减金额即为优惠金额 折扣券:优惠金额 = 微信支付订单金额 ÷ * 折扣比例 × (1 - 折扣比例) 换购券:不支持 */ @SerializedName("amount") private Long amount; + /** 补差付款描述 说明:付款备注描述,查询的时候原样带回 */ @SerializedName("description") private String description; + /** 补差付款单据状态 说明:补差付款单据状态 */ @SerializedName("status") private SubsidyPayReceiptStatus status; + /** 补差付款失败原因 说明:仅在补差付款失败时,返回告知对应失败的原因 */ @SerializedName("fail_reason") private SubsidyPayReceiptFailReason failReason; + /** * 补差付款完成时间 * 说明:仅在补差付款成功时,返回完成时间。遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -58,9 +68,11 @@ public class SubsidyPayReceipt { */ @SerializedName("success_time") private String successTime; + /** 业务请求唯一单号 说明:商户侧需保证唯一性。可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ @SerializedName("out_subsidy_no") private String outSubsidyNo; + /** * 补差付款发起时间 * 说明:补差付款单据创建时间。遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java index 7bc4ce49..25fd186b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyPayRequest.java @@ -21,30 +21,37 @@ public class SubsidyPayRequest { /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID 仅支持“满减券”和“折扣券”的批次,“换购券”批次不支持 */ @SerializedName("stock_id") private String stockId; + /** * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; */ @SerializedName("coupon_code") private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 营销补差扣款商户号 说明:营销补差扣款商户号 注:补差扣款商户号 = 制券商户号 或 补差扣款商户号 = 归属商户号 */ @SerializedName("payer_merchant") private String payerMerchant; + /** 营销补差入账商户号 说明:营销补差入账商户号 注:补差入账商户号 = 券归属商户号 或者和 券归属商户号有连锁品牌关系 */ @SerializedName("payee_merchant") private String payeeMerchant; + /** * 补差付款金额 说明:单位为分,单笔订单补差金额不得超过券的优惠金额,最高补差金额为5000元 > 券的优惠金额定义: 满减券:满减金额即为优惠金额 折扣券:优惠金额 = 微信支付订单金额 ÷ * 折扣比例 × (1 - 折扣比例) 换购券:不支持 */ @SerializedName("amount") private Long amount; + /** 补差付款描述 说明:付款备注描述,查询的时候原样带回 */ @SerializedName("description") private String description; + /** 业务请求唯一单号 说明:商户侧需保证唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ @SerializedName("out_subsidy_no") private String outSubsidyNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java index 68570121..c0067f37 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnReceipt.java @@ -21,45 +21,59 @@ public class SubsidyReturnReceipt { /** 补差回退单号 说明:补差回退唯一单号,由微信支付生成,仅在补差回退成功后有返回 */ @SerializedName("subsidy_return_receipt_id") private String subsidyReturnReceiptId; + /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID */ @SerializedName("stock_id") private String stockId; + /** 商家券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 微信支付退款单号 说明:微信支付退款单号 */ @SerializedName("refund_id") private String refundId; + /** 原营销补差扣款商户号 说明:原营销补差扣款商户号,即回退资金收款商户号 */ @SerializedName("payer_merchant") private String payerMerchant; + /** 原营销补差入账商户号 说明:原营销补差入账商户号,即回退资金扣款商户号 */ @SerializedName("payee_merchant") private String payeeMerchant; + /** 补差回退金额 说明:本次补差回退金额,单位为分。单个券code回退总金额不能超过补差金额 */ @SerializedName("amount") private Long amount; + /** 补差回退描述 说明:回退备注描述,查询的时候原样带回 */ @SerializedName("description") private String description; + /** 补差回退单据状态 说明:补差付款单据状态 */ @SerializedName("status") private SubsidyReturnReceiptStatus status; + /** 补差回退失败原因 说明:仅在补差回退失败时,返回告知对应失败的原因 */ @SerializedName("fail_reason") private SubsidyReturnReceiptFailReason failReason; + /** 补差回退完成时间 说明:仅在补差回退成功时,返回完成时间 */ @SerializedName("return_done_time") private String returnDoneTime; + /** 补差付款单号 说明:此次补差回退操作对应的补差付款单号 */ @SerializedName("subsidy_receipt_id") private String subsidyReceiptId; + /** 业务请求唯一单号 说明:商户侧需保证唯一性。可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ @SerializedName("out_subsidy_return_no") private String outSubsidyReturnNo; + /** 补差回退发起时间 说明:补差回退单据创建时间 */ @SerializedName("return_create_time") private String returnCreateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java index 5717b164..6478a156 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/SubsidyReturnRequest.java @@ -21,30 +21,38 @@ public class SubsidyReturnRequest { /** 商家券批次号 说明:由微信支付生成,调用创建商家券API成功时返回的唯一批次ID 仅支持“满减券”和“折扣券”的批次,“换购券”批次不支持 */ @SerializedName("stock_id") private String stockId; + /** * 商家券code 说明:券的唯一标识。 在WECHATPAY\\_MODE的券code模式下,商家券code是由微信支付生成的唯一ID; * 在MERCHANT\\_UPLOAD、MERCHANT\\_API的券code模式下,商家券code是由商户上传或指定,在批次下保证唯一; */ @SerializedName("coupon_code") private String couponCode; + /** 微信支付订单号 说明:微信支付下单支付成功返回的订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 微信支付退款单号 说明:微信支付退款单号 */ @SerializedName("refund_id") private String refundId; + /** 原营销补差扣款商户号 说明:原营销补差扣款商户号,即回退资金收款商户号 */ @SerializedName("payer_merchant") private String payerMerchant; + /** 原营销补差入账商户号 说明:原营销补差入账商户号,即回退资金扣款商户号 */ @SerializedName("payee_merchant") private String payeeMerchant; + /** 补差回退金额 说明:本次补差回退金额,单位为分。单个券Code回退总金额不能超过补差金额 */ @SerializedName("amount") private Long amount; + /** 补差回退描述 说明:回退备注描述,查询的时候原样带回 */ @SerializedName("description") private String description; + /** 业务请求唯一单号 说明:商户侧需保证唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号 */ @SerializedName("out_subsidy_return_no") private String outSubsidyReturnNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java index 7bf73359..0e84d34e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeBody.java @@ -26,6 +26,7 @@ public class UploadCouponCodeBody { */ @SerializedName("coupon_code_list") private List couponCodeList = new ArrayList(); + /** 请求业务单据号 说明:商户上传code的凭据号,商户侧需保持唯一性 */ @SerializedName("upload_request_no") private String uploadRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java index 8f6bdd30..a3e4fc04 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeFailReason.java @@ -21,9 +21,11 @@ public class UploadCouponCodeFailReason { /** 上传失败的券code 说明:商户通过API上传的券code */ @SerializedName("coupon_code") private String couponCode; + /** 上传失败错误码 说明:对应券code上传失败的错误码 */ @SerializedName("code") private String code; + /** 上传失败错误信息 说明:上传失败的错误信息描述 */ @SerializedName("message") private String message; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java index 8fbdd262..6d04b535 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeRequest.java @@ -25,12 +25,14 @@ public class UploadCouponCodeRequest { @SerializedName("stock_id") @Expose(serialize = false) private String stockId; + /** * 券code列表 说明:商户上传的券code列表;code允许包含的字符有 0-9 a-z A-Z 空格(仅含空格,不含制表符、换行符、换页符等) 中划线- 下划线_ 反斜线\\ 斜线/ * 等号= 竖线| */ @SerializedName("coupon_code_list") private List couponCodeList = new ArrayList(); + /** 请求业务单据号 说明:商户上传code的凭据号,商户侧需保持唯一性 */ @SerializedName("upload_request_no") private String uploadRequestNo; diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java index b5c4512b..e3352b93 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UploadCouponCodeResponse.java @@ -22,15 +22,19 @@ public class UploadCouponCodeResponse { /** 批次号 说明:商家券批次号 */ @SerializedName("stock_id") private String stockId; + /** 去重后上传code总数 说明:本次上传操作,去重后实际上传的code数目 */ @SerializedName("total_count") private Long totalCount; + /** 上传成功code个数 说明:本次上传操作上传成功个数 */ @SerializedName("success_count") private Long successCount; + /** 上传成功的code列表 说明:本次新增上传成功的code信息。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 */ @SerializedName("success_codes") private List successCodes; + /** * 上传成功时间 * 说明:上传操作完成时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -38,15 +42,19 @@ public class UploadCouponCodeResponse { */ @SerializedName("success_time") private String successTime; + /** 上传失败code个数 说明:本次上传操作上传失败的code数 */ @SerializedName("fail_count") private Long failCount; + /** 上传失败的code及原因 说明:本次导入失败的code信息,请参照错误信息,修改后重试 */ @SerializedName("fail_codes") private List failCodes; + /** 已存在的code列表 说明:历史已存在的code列表,本次不会重复导入。 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 */ @SerializedName("exist_codes") private List existCodes; + /** * 本次请求中重复的code列表 说明:本次重复导入的code会被自动过滤,仅保留一个做导入,如满足要求则成功;如不满足要求,则失败;请参照报错提示修改重试。 * 特殊规则:单个券code长度为【1,32】,条目个数限制为【1,200】。 diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java index 76c0bcc5..2f1278ea 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponRequest.java @@ -21,18 +21,21 @@ public class UseCouponRequest { /** 券code 说明:券的唯一标识 */ @SerializedName("coupon_code") private String couponCode; + /** * 批次号 * 说明:微信为每个商家券批次分配的唯一ID,当你在创建商家券接口中的coupon\\_code\\_mode参数传值为MERCHANT\\_API或者MERCHANT\\_UPLOAD时,则核销接口中该字段必传,否则该字段可不传 */ @SerializedName("stock_id") private String stockId; + /** * 公众账号ID 说明:支持传入与当前调用接口商户号有绑定关系的AppID。支持小程序AppID与公众号AppID。核销接口返回的OpenID会在该传入AppID下进行计算获得。 * 校验规则:传入的AppID得是与调用方商户号(即请求头里面的商户号)有绑定关系的AppID或传入的AppID得是归属商户号有绑定关系的AppID */ @SerializedName("appid") private String appid; + /** * 请求核销时间 说明:商户请求核销用户券的时间。 * 遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -40,9 +43,11 @@ public class UseCouponRequest { */ @SerializedName("use_time") private String useTime; + /** 核销请求单据号 说明:每次核销请求的唯一标识,商户需保证唯一 */ @SerializedName("use_request_no") private String useRequestNo; + /** * 用户标识 说明:用户的唯一标识,做安全校验使用,非必填。 * 校验规则:传入的OpenID得是调用方商户号(即请求头里面的商户号)有绑定关系的AppID获取的OpenID或传入的OpenID得是归属商户号有绑定关系的AppID获取的OpenID。[获取OpenID文档](https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml#part-3) diff --git a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java index f0998822..d0dd6da4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/merchantexclusivecoupon/model/UseCouponResponse.java @@ -21,9 +21,11 @@ public class UseCouponResponse { /** 批次号 说明:批次ID */ @SerializedName("stock_id") private String stockId; + /** 用户标识 说明:用户在该公众号内的唯一身份标识。 */ @SerializedName("openid") private String openid; + /** * 系统核销券成功的时间 * 说明:系统成功核销券的时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppService.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppService.java index 437c734d..840a18cd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppService.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppService.java @@ -49,11 +49,13 @@ private AppService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** AppService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -85,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -128,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * APP支付下单 * @@ -158,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -202,6 +209,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtension.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtension.java index fe9c2f40..4cee854e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtension.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/AppServiceExtension.java @@ -40,6 +40,7 @@ private AppServiceExtension(Config config, HttpClient httpClient, HostName hostN } this.appService = builder.build(); } + /** * APP 支付下单,并返回 APP 调起支付数据。推荐使用! * @@ -73,6 +74,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment( response.setSign(sign); return response; } + /** * 微信支付订单号查询订单 * @@ -86,6 +88,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment( public Transaction queryOrderById(QueryOrderByIdRequest request) { return appService.queryOrderById(request); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Amount.java index 33d73cf0..23f15312 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseOrderRequest.java index 0bb22eb4..f8789544 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseOrderRequest.java @@ -22,9 +22,11 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseRequest.java index cd0221f6..1028104d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/CloseRequest.java @@ -20,6 +20,7 @@ public class CloseRequest { /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Detail.java index 9412f8ef..0d62d3f2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/GoodsDetail.java index c5af8cb2..3d796997 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/PrepayRequest.java index f17e4a25..cc92e2fe 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/PrepayRequest.java @@ -21,33 +21,43 @@ public class PrepayRequest { /** 服务商应用ID 说明:服务商申请的公众号appid */ @SerializedName("sp_appid") private String spAppid; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户应用ID 说明:子商户申请的公众号appid */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -65,18 +75,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByIdRequest.java index a07b72f4..3038ce7f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByIdRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByOutTradeNoRequest.java index 7fdacf2e..f4c99669 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/QueryOrderByOutTradeNoRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/SceneInfo.java index 8482de89..0739e39e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/StoreInfo.java index f1e5b5c2..b3d7eba7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Transaction.java index ff184450..9d4a58f1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/app/model/Transaction.java @@ -24,36 +24,47 @@ public class Transaction { /** amount */ @SerializedName("amount") private TransactionAmount amount; + /** spAppid */ @SerializedName("sp_appid") private String spAppid; + /** subAppid */ @SerializedName("sub_appid") private String subAppid; + /** spMchid */ @SerializedName("sp_mchid") private String spMchid; + /** subMchid */ @SerializedName("sub_mchid") private String subMchid; + /** attach */ @SerializedName("attach") private String attach; + /** bankType */ @SerializedName("bank_type") private String bankType; + /** outTradeNo */ @SerializedName("out_trade_no") private String outTradeNo; + /** payer */ @SerializedName("payer") private TransactionPayer payer; + /** promotionDetail */ @SerializedName("promotion_detail") private List promotionDetail; + /** successTime */ @SerializedName("success_time") private String successTime; + /** tradeState */ public enum TradeStateEnum { @SerializedName("SUCCESS") @@ -83,9 +94,11 @@ public enum TradeStateEnum { @SerializedName("trade_state") private TradeStateEnum tradeState; + /** tradeStateDesc */ @SerializedName("trade_state_desc") private String tradeStateDesc; + /** tradeType */ public enum TradeTypeEnum { @SerializedName("JSAPI") @@ -109,6 +122,7 @@ public enum TradeTypeEnum { @SerializedName("trade_type") private TradeTypeEnum tradeType; + /** transactionId */ @SerializedName("transaction_id") private String transactionId; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/H5Service.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/H5Service.java index 3c8fb855..14c73514 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/H5Service.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/H5Service.java @@ -49,6 +49,7 @@ private H5Service(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** H5Service构造器 */ public static class Builder { @@ -132,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * H5支付下单 * @@ -162,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -206,6 +209,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Amount.java index 2477cf47..7578aebc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseOrderRequest.java index 9ed63d7f..ec7d97a2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseOrderRequest.java @@ -22,9 +22,11 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseRequest.java index dfab4923..f46989f8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/CloseRequest.java @@ -20,6 +20,7 @@ public class CloseRequest { /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Detail.java index 7a9cbbd5..2720e736 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/GoodsDetail.java index c2b1ac17..4745ad36 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/H5Info.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/H5Info.java index f7229a3a..5be83e32 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/H5Info.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/H5Info.java @@ -20,15 +20,19 @@ public class H5Info { /** 场景类型 说明:场景类型 */ @SerializedName("type") private String type; + /** 应用名称 说明:应用名称 */ @SerializedName("app_name") private String appName; + /** 网站URL 说明:网站URL */ @SerializedName("app_url") private String appUrl; + /** iOS平台BundleID 说明:iOS平台BundleID */ @SerializedName("bundle_id") private String bundleId; + /** Android平台PackageName 说明:Android平台PackageName */ @SerializedName("package_name") private String packageName; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/PrepayRequest.java index a03a4d33..77c7fece 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/PrepayRequest.java @@ -21,33 +21,43 @@ public class PrepayRequest { /** 服务商应用ID 说明:服务商申请的公众号appid */ @SerializedName("sp_appid") private String spAppid; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户应用ID 说明:子商户申请的公众号appid */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -65,18 +75,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByIdRequest.java index faf5bacb..68e46d12 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByIdRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByOutTradeNoRequest.java index 249bd07c..8860946f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/QueryOrderByOutTradeNoRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/SceneInfo.java index d6e0345b..820ec852 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/SceneInfo.java @@ -20,12 +20,15 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; + /** h5Info */ @SerializedName("h5_info") private H5Info h5Info; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/StoreInfo.java index 7dae9397..e349f271 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Transaction.java index 49fe22ea..8bab1374 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/h5/model/Transaction.java @@ -24,36 +24,47 @@ public class Transaction { /** amount */ @SerializedName("amount") private TransactionAmount amount; + /** spAppid */ @SerializedName("sp_appid") private String spAppid; + /** subAppid */ @SerializedName("sub_appid") private String subAppid; + /** spMchid */ @SerializedName("sp_mchid") private String spMchid; + /** subMchid */ @SerializedName("sub_mchid") private String subMchid; + /** attach */ @SerializedName("attach") private String attach; + /** bankType */ @SerializedName("bank_type") private String bankType; + /** outTradeNo */ @SerializedName("out_trade_no") private String outTradeNo; + /** payer */ @SerializedName("payer") private TransactionPayer payer; + /** promotionDetail */ @SerializedName("promotion_detail") private List promotionDetail; + /** successTime */ @SerializedName("success_time") private String successTime; + /** tradeState */ public enum TradeStateEnum { @SerializedName("SUCCESS") @@ -83,9 +94,11 @@ public enum TradeStateEnum { @SerializedName("trade_state") private TradeStateEnum tradeState; + /** tradeStateDesc */ @SerializedName("trade_state_desc") private String tradeStateDesc; + /** tradeType */ public enum TradeTypeEnum { @SerializedName("JSAPI") @@ -109,6 +122,7 @@ public enum TradeTypeEnum { @SerializedName("trade_type") private TradeTypeEnum tradeType; + /** transactionId */ @SerializedName("transaction_id") private String transactionId; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiService.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiService.java index e2bdaf9a..8bd8dbea 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiService.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiService.java @@ -49,11 +49,13 @@ private JsapiService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** JsapiService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -85,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -128,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * JSAPI支付下单 * @@ -158,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -202,6 +209,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtension.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtension.java index 3e13bc26..b4191768 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtension.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/JsapiServiceExtension.java @@ -77,6 +77,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment( response.setPaySign(sign); return response; } + /** * 微信支付订单号查询订单 * @@ -90,6 +91,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment( public Transaction queryOrderById(QueryOrderByIdRequest request) { return jsapiService.queryOrderById(request); } + /** * 商户订单号查询订单 * @@ -103,6 +105,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { public Transaction queryOrderByOutTradeNo(QueryOrderByOutTradeNoRequest request) { return jsapiService.queryOrderByOutTradeNo(request); } + /** * 关闭订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Amount.java index 9225b809..15c17115 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseOrderRequest.java index bd7211f0..f8fc9477 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseOrderRequest.java @@ -22,9 +22,11 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseRequest.java index cbc211a3..f77ddcae 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/CloseRequest.java @@ -20,6 +20,7 @@ public class CloseRequest { /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Detail.java index b3add2f6..2b51774a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/GoodsDetail.java index a8e6e4d9..6f2d4470 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Payer.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Payer.java index cb68c3d8..1bbd43a2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Payer.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Payer.java @@ -20,6 +20,7 @@ public class Payer { /** 用户标识 说明:用户在服务商AppID下的唯一标识。 */ @SerializedName("sp_openid") private String spOpenid; + /** 用户子标识 说明:用户在子商户AppID下的唯一标识。 */ @SerializedName("sub_openid") private String subOpenid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/PrepayRequest.java index 9e20ac5e..38ff61e5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/PrepayRequest.java @@ -21,33 +21,43 @@ public class PrepayRequest { /** 服务商应用ID 说明:服务商申请的公众号appid */ @SerializedName("sp_appid") private String spAppid; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户应用ID 说明:子商户申请的公众号appid */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -65,21 +75,27 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** payer */ @SerializedName("payer") private Payer payer; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByIdRequest.java index b7e4d9c7..46ef3b02 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByIdRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByOutTradeNoRequest.java index 2dd2b722..c288b22a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/QueryOrderByOutTradeNoRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/SceneInfo.java index 09ea27e1..b79ffe33 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/StoreInfo.java index 08de33d1..a062700c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Transaction.java index b0c0834f..b3499981 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/jsapi/model/Transaction.java @@ -24,36 +24,47 @@ public class Transaction { /** amount */ @SerializedName("amount") private TransactionAmount amount; + /** spAppid */ @SerializedName("sp_appid") private String spAppid; + /** subAppid */ @SerializedName("sub_appid") private String subAppid; + /** spMchid */ @SerializedName("sp_mchid") private String spMchid; + /** subMchid */ @SerializedName("sub_mchid") private String subMchid; + /** attach */ @SerializedName("attach") private String attach; + /** bankType */ @SerializedName("bank_type") private String bankType; + /** outTradeNo */ @SerializedName("out_trade_no") private String outTradeNo; + /** payer */ @SerializedName("payer") private TransactionPayer payer; + /** promotionDetail */ @SerializedName("promotion_detail") private List promotionDetail; + /** successTime */ @SerializedName("success_time") private String successTime; + /** tradeState */ public enum TradeStateEnum { @SerializedName("SUCCESS") @@ -83,9 +94,11 @@ public enum TradeStateEnum { @SerializedName("trade_state") private TradeStateEnum tradeState; + /** tradeStateDesc */ @SerializedName("trade_state_desc") private String tradeStateDesc; + /** tradeType */ public enum TradeTypeEnum { @SerializedName("JSAPI") @@ -109,6 +122,7 @@ public enum TradeTypeEnum { @SerializedName("trade_type") private TradeTypeEnum tradeType; + /** transactionId */ @SerializedName("transaction_id") private String transactionId; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionDetail.java index 2b4c98c4..7caf04aa 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionDetail.java @@ -21,9 +21,11 @@ public class PromotionDetail { /** 券ID 说明:券ID */ @SerializedName("coupon_id") private String couponId; + /** 优惠名称 说明:优惠名称 */ @SerializedName("name") private String name; + /** GLOBAL:全场代金券;SINGLE:单品优惠 */ public enum ScopeEnum { @SerializedName("GLOBAL") @@ -35,6 +37,7 @@ public enum ScopeEnum { @SerializedName("scope") private ScopeEnum scope; + /** CASH:充值;NOCASH:预充值。 */ public enum TypeEnum { @SerializedName("CASH") @@ -46,24 +49,31 @@ public enum TypeEnum { @SerializedName("type") private TypeEnum type; + /** 优惠券面额 说明:优惠券面额 */ @SerializedName("amount") private Integer amount; + /** 活动ID 说明:活动ID,批次ID */ @SerializedName("stock_id") private String stockId; + /** 微信出资 说明:单位为分 */ @SerializedName("wechatpay_contribute") private Integer wechatpayContribute; + /** 商户出资 说明:单位为分 */ @SerializedName("merchant_contribute") private Integer merchantContribute; + /** 其他出资 说明:单位为分 */ @SerializedName("other_contribute") private Integer otherContribute; + /** 优惠币种 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionGoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionGoodsDetail.java index bb902d4a..18a9676e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionGoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/PromotionGoodsDetail.java @@ -20,15 +20,19 @@ public class PromotionGoodsDetail { /** 商品编码 说明:商品编码 */ @SerializedName("goods_id") private String goodsId; + /** 商品数量 说明:商品数量 */ @SerializedName("quantity") private Integer quantity; + /** 商品价格 说明:商品价格 */ @SerializedName("unit_price") private Integer unitPrice; + /** 商品优惠金额 说明:商品优惠金额 */ @SerializedName("discount_amount") private Integer discountAmount; + /** 商品备注 说明:商品备注 */ @SerializedName("goods_remark") private String goodsRemark; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionAmount.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionAmount.java index e2f8a8d0..a8206bdb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionAmount.java @@ -20,12 +20,15 @@ public class TransactionAmount { /** currency */ @SerializedName("currency") private String currency; + /** payerCurrency */ @SerializedName("payer_currency") private String payerCurrency; + /** payerTotal */ @SerializedName("payer_total") private Integer payerTotal; + /** total */ @SerializedName("total") private Integer total; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionPayer.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionPayer.java index c6326a16..e67bd650 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionPayer.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/model/TransactionPayer.java @@ -20,6 +20,7 @@ public class TransactionPayer { /** spOpenid */ @SerializedName("sp_openid") private String spOpenid; + /** subOpenid */ @SerializedName("sub_openid") private String subOpenid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayService.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayService.java index c50ab07b..12b94cdb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayService.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/NativePayService.java @@ -49,6 +49,7 @@ private NativePayService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** NativePayService构造器 */ public static class Builder { @@ -66,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -76,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -86,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -129,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * Native支付预下单 * @@ -159,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -203,6 +209,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Amount.java index 17aeb565..5a7b1c4f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseOrderRequest.java index e66c8840..3fc5fe97 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseOrderRequest.java @@ -22,9 +22,11 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseRequest.java index c96048f1..3deeb9de 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/CloseRequest.java @@ -20,6 +20,7 @@ public class CloseRequest { /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Detail.java index 17310651..2662406d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/GoodsDetail.java index b6f72b6b..cffed40e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/PrepayRequest.java index f938aaf5..88a0d7f1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/PrepayRequest.java @@ -21,33 +21,43 @@ public class PrepayRequest { /** 服务商应用ID 说明:服务商申请的公众号appid */ @SerializedName("sp_appid") private String spAppid; + /** 服务商户号 说明:服务商户号,由微信支付生成并下发 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户应用ID 说明:子商户申请的公众号appid */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发 */ @SerializedName("sub_mchid") private String subMchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -65,18 +75,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByIdRequest.java index 53115826..65b9df61 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByIdRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByOutTradeNoRequest.java index f9810bd2..ced5592b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/QueryOrderByOutTradeNoRequest.java @@ -22,10 +22,12 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** spMchid 说明:服务商户号 */ @SerializedName("sp_mchid") @Expose(serialize = false) private String spMchid; + /** subMchid 说明:子商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/SceneInfo.java index 2b084cab..ffbf9570 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/StoreInfo.java index 23d1549e..8f1f12a7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Transaction.java index 35b69fa8..386cff0a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/partnerpayments/nativepay/model/Transaction.java @@ -24,36 +24,47 @@ public class Transaction { /** amount */ @SerializedName("amount") private TransactionAmount amount; + /** spAppid */ @SerializedName("sp_appid") private String spAppid; + /** subAppid */ @SerializedName("sub_appid") private String subAppid; + /** spMchid */ @SerializedName("sp_mchid") private String spMchid; + /** subMchid */ @SerializedName("sub_mchid") private String subMchid; + /** attach */ @SerializedName("attach") private String attach; + /** bankType */ @SerializedName("bank_type") private String bankType; + /** outTradeNo */ @SerializedName("out_trade_no") private String outTradeNo; + /** payer */ @SerializedName("payer") private TransactionPayer payer; + /** promotionDetail */ @SerializedName("promotion_detail") private List promotionDetail; + /** successTime */ @SerializedName("success_time") private String successTime; + /** tradeState */ public enum TradeStateEnum { @SerializedName("SUCCESS") @@ -83,9 +94,11 @@ public enum TradeStateEnum { @SerializedName("trade_state") private TradeStateEnum tradeState; + /** tradeStateDesc */ @SerializedName("trade_state_desc") private String tradeStateDesc; + /** tradeType */ public enum TradeTypeEnum { @SerializedName("JSAPI") @@ -109,6 +122,7 @@ public enum TradeTypeEnum { @SerializedName("trade_type") private TradeTypeEnum tradeType; + /** transactionId */ @SerializedName("transaction_id") private String transactionId; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/AppService.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/AppService.java index 02f03dc6..597ddbfb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/AppService.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/AppService.java @@ -49,11 +49,13 @@ private AppService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** AppService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -129,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * APP支付下单 * @@ -159,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -199,6 +205,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/AppServiceExtension.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/AppServiceExtension.java index 38d0e6aa..6ab671c6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/AppServiceExtension.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/AppServiceExtension.java @@ -86,6 +86,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment(PrepayRequest r public Transaction queryOrderById(QueryOrderByIdRequest request) { return appService.queryOrderById(request); } + /** * 商户订单号查询订单 * @@ -99,6 +100,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { public Transaction queryOrderByOutTradeNo(QueryOrderByOutTradeNoRequest request) { return appService.queryOrderByOutTradeNo(request); } + /** * 关闭订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Amount.java index ba6e76f0..8526dc1f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/CloseOrderRequest.java index b8c3b377..a2ab54bb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/CloseOrderRequest.java @@ -22,6 +22,7 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Detail.java index 65e2f505..b2e60715 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/GoodsDetail.java index 1d507f78..47e4bafa 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/PrepayRequest.java index 7d21e519..1a6a6f15 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/PrepayRequest.java @@ -21,27 +21,35 @@ public class PrepayRequest { /** 公众号ID 说明:公众号ID */ @SerializedName("appid") private String appid; + /** 直连商户号 说明:直连商户号 */ @SerializedName("mchid") private String mchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -59,18 +67,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByIdRequest.java index 51e5bb42..a147b882 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByIdRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByOutTradeNoRequest.java index c090be2d..4f2e0dc2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/QueryOrderByOutTradeNoRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/SceneInfo.java index 06744835..dcaa0de1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/StoreInfo.java index 82e88e75..b8d24750 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/app/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/app/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/H5Service.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/H5Service.java index 0d69bdf7..05cb77fe 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/H5Service.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/H5Service.java @@ -49,11 +49,13 @@ private H5Service(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** H5Service构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -85,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -128,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * H5支付下单 * @@ -158,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -198,6 +205,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Amount.java index 3801c862..7d55bd3f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/CloseOrderRequest.java index 20ad279a..21a2a977 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/CloseOrderRequest.java @@ -22,6 +22,7 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Detail.java index 7a21e161..8607fcc2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/GoodsDetail.java index 8385837d..a48d1535 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/H5Info.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/H5Info.java index 10d8774c..7cc262f5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/H5Info.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/H5Info.java @@ -20,15 +20,19 @@ public class H5Info { /** 场景类型 说明:场景类型 */ @SerializedName("type") private String type; + /** 应用名称 说明:应用名称 */ @SerializedName("app_name") private String appName; + /** 网站URL 说明:网站URL */ @SerializedName("app_url") private String appUrl; + /** iOS平台BundleID 说明:iOS平台BundleID */ @SerializedName("bundle_id") private String bundleId; + /** Android平台PackageName 说明:Android平台PackageName */ @SerializedName("package_name") private String packageName; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/PrepayRequest.java index 4007aaf6..0bbb86ed 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/PrepayRequest.java @@ -21,27 +21,35 @@ public class PrepayRequest { /** 公众号ID 说明:公众号ID */ @SerializedName("appid") private String appid; + /** 直连商户号 说明:直连商户号 */ @SerializedName("mchid") private String mchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -59,18 +67,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByIdRequest.java index 003af7fd..3a16c211 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByIdRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByOutTradeNoRequest.java index 70122ec6..cfb508d0 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/QueryOrderByOutTradeNoRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/SceneInfo.java index 2efaa310..acfbe171 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/SceneInfo.java @@ -20,12 +20,15 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; + /** h5Info */ @SerializedName("h5_info") private H5Info h5Info; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/StoreInfo.java index cbb3a99f..978ad8ed 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/h5/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiService.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiService.java index 3605adcb..e0d76a68 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiService.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiService.java @@ -49,11 +49,13 @@ private JsapiService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** JsapiService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -85,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -128,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * JSAPI支付下单 * @@ -158,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -198,6 +205,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtension.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtension.java index b7de299d..f899afe8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtension.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/JsapiServiceExtension.java @@ -43,6 +43,7 @@ private JsapiServiceExtension( } this.jsapiService = builder.build(); } + /** * JSAPI 支付下单,并返回 JSAPI 调起支付数据。推荐使用! * @@ -74,6 +75,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment(PrepayRequest r response.setPaySign(sign); return response; } + /** * 微信支付订单号查询订单 * @@ -87,6 +89,7 @@ public PrepayWithRequestPaymentResponse prepayWithRequestPayment(PrepayRequest r public Transaction queryOrderById(QueryOrderByIdRequest request) { return jsapiService.queryOrderById(request); } + /** * 商户订单号查询订单 * @@ -100,6 +103,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { public Transaction queryOrderByOutTradeNo(QueryOrderByOutTradeNoRequest request) { return jsapiService.queryOrderByOutTradeNo(request); } + /** * 关闭订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Amount.java index ebeae309..d87c04da 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/CloseOrderRequest.java index a802a6fa..5a46e238 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/CloseOrderRequest.java @@ -22,6 +22,7 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Detail.java index dacc214b..db7f1ec3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/GoodsDetail.java index 6df217e1..360b01db 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/PrepayRequest.java index 94fdab6f..5dd8e673 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/PrepayRequest.java @@ -21,27 +21,35 @@ public class PrepayRequest { /** 公众号ID 说明:公众号ID */ @SerializedName("appid") private String appid; + /** 直连商户号 说明:直连商户号 */ @SerializedName("mchid") private String mchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -59,21 +67,27 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** payer */ @SerializedName("payer") private Payer payer; + /** detail */ @SerializedName("detail") private Detail detail; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByIdRequest.java index caf2142d..bc4c2b31 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByIdRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByOutTradeNoRequest.java index b82af97b..8a3f78d7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/QueryOrderByOutTradeNoRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/SceneInfo.java index 8ffcab83..481613db 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/StoreInfo.java index d912e1fb..f0862392 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/jsapi/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionDetail.java index 04498eca..040dd822 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionDetail.java @@ -16,9 +16,11 @@ public class PromotionDetail { /** 券ID 说明:券ID */ @SerializedName("coupon_id") private String couponId; + /** 优惠名称 说明:优惠名称 */ @SerializedName("name") private String name; + /** GLOBAL:全场代金券;SINGLE:单品优惠 */ public enum ScopeEnum { @SerializedName("GLOBAL") @@ -30,6 +32,7 @@ public enum ScopeEnum { @SerializedName("scope") private ScopeEnum scope; + /** CASH:充值;NOCASH:预充值。 */ public enum TypeEnum { @SerializedName("CASH") @@ -41,24 +44,31 @@ public enum TypeEnum { @SerializedName("type") private TypeEnum type; + /** 优惠券面额 说明:优惠券面额 */ @SerializedName("amount") private Integer amount; + /** 活动ID 说明:活动ID,批次ID */ @SerializedName("stock_id") private String stockId; + /** 微信出资 说明:单位为分 */ @SerializedName("wechatpay_contribute") private Integer wechatpayContribute; + /** 商户出资 说明:单位为分 */ @SerializedName("merchant_contribute") private Integer merchantContribute; + /** 其他出资 说明:单位为分 */ @SerializedName("other_contribute") private Integer otherContribute; + /** 优惠币种 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; + /** 单品列表 */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionGoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionGoodsDetail.java index 280b949d..b8889bd7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionGoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/model/PromotionGoodsDetail.java @@ -15,15 +15,19 @@ public class PromotionGoodsDetail { /** 商品编码 说明:商品编码 */ @SerializedName("goods_id") private String goodsId; + /** 商品数量 说明:商品数量 */ @SerializedName("quantity") private Integer quantity; + /** 商品价格 说明:商品价格 */ @SerializedName("unit_price") private Integer unitPrice; + /** 商品优惠金额 说明:商品优惠金额 */ @SerializedName("discount_amount") private Integer discountAmount; + /** 商品备注 说明:商品备注 */ @SerializedName("goods_remark") private String goodsRemark; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/payments/model/Transaction.java index 4a3cb179..fb759f49 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/model/Transaction.java @@ -16,30 +16,39 @@ public class Transaction { /** amount */ @SerializedName("amount") private TransactionAmount amount; + /** appid */ @SerializedName("appid") private String appid; + /** attach */ @SerializedName("attach") private String attach; + /** bankType */ @SerializedName("bank_type") private String bankType; + /** mchid */ @SerializedName("mchid") private String mchid; + /** outTradeNo */ @SerializedName("out_trade_no") private String outTradeNo; + /** payer */ @SerializedName("payer") private TransactionPayer payer; + /** promotionDetail */ @SerializedName("promotion_detail") private List promotionDetail; + /** successTime */ @SerializedName("success_time") private String successTime; + /** tradeState */ public enum TradeStateEnum { @SerializedName("SUCCESS") @@ -69,9 +78,11 @@ public enum TradeStateEnum { @SerializedName("trade_state") private TradeStateEnum tradeState; + /** tradeStateDesc */ @SerializedName("trade_state_desc") private String tradeStateDesc; + /** tradeType */ public enum TradeTypeEnum { @SerializedName("JSAPI") @@ -95,6 +106,7 @@ public enum TradeTypeEnum { @SerializedName("trade_type") private TradeTypeEnum tradeType; + /** transactionId */ @SerializedName("transaction_id") private String transactionId; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/model/TransactionAmount.java b/service/src/main/java/com/wechat/pay/java/service/payments/model/TransactionAmount.java index def6c2a9..c9a59599 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/model/TransactionAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/model/TransactionAmount.java @@ -15,12 +15,15 @@ public class TransactionAmount { /** currency */ @SerializedName("currency") private String currency; + /** payerCurrency */ @SerializedName("payer_currency") private String payerCurrency; + /** payerTotal */ @SerializedName("payer_total") private Integer payerTotal; + /** total */ @SerializedName("total") private Integer total; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/NativePayService.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/NativePayService.java index 70721dd0..d1a9c91a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/NativePayService.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/NativePayService.java @@ -49,11 +49,13 @@ private NativePayService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** NativePayService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -65,6 +67,7 @@ public Builder config(Config config) { return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -75,6 +78,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -85,6 +89,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -128,6 +133,7 @@ public void closeOrder(CloseOrderRequest request) { .build(); httpClient.execute(httpRequest, null); } + /** * Native支付预下单 * @@ -158,6 +164,7 @@ public PrepayResponse prepay(PrepayRequest request) { httpClient.execute(httpRequest, PrepayResponse.class); return httpResponse.getServiceResponse(); } + /** * 微信支付订单号查询订单 * @@ -198,6 +205,7 @@ public Transaction queryOrderById(QueryOrderByIdRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 商户订单号查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Amount.java index af1ad368..7e93d4c9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Amount.java @@ -20,6 +20,7 @@ public class Amount { /** 总金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Integer total; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/CloseOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/CloseOrderRequest.java index ea7ac8b3..bacba294 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/CloseOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/CloseOrderRequest.java @@ -22,6 +22,7 @@ public class CloseOrderRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") private String mchid; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Detail.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Detail.java index e26fa731..c4a417ae 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Detail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/Detail.java @@ -24,9 +24,11 @@ public class Detail { */ @SerializedName("cost_price") private Integer costPrice; + /** 商品小票ID 说明:商家小票ID。 */ @SerializedName("invoice_id") private String invoiceId; + /** 单品列表 说明: */ @SerializedName("goods_detail") private List goodsDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/GoodsDetail.java index 5f312a74..3ab56906 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/GoodsDetail.java @@ -20,15 +20,19 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传)。 */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称。 */ @SerializedName("goods_name") private String goodsName; + /** 商品数量 说明:用户购买的数量。 */ @SerializedName("quantity") private Integer quantity; + /** 商品单价 说明:商品单价,单位为分。 */ @SerializedName("unit_price") private Integer unitPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/PrepayRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/PrepayRequest.java index 5d77503f..98429e76 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/PrepayRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/PrepayRequest.java @@ -21,27 +21,35 @@ public class PrepayRequest { /** 公众号ID 说明:公众号ID */ @SerializedName("appid") private String appid; + /** 直连商户号 说明:直连商户号 */ @SerializedName("mchid") private String mchid; + /** 商品描述 说明:商品描述 */ @SerializedName("description") private String description; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易结束时间 说明:订单失效时间,格式为rfc3339格式 */ @SerializedName("time_expire") private String timeExpire; + /** 附加数据 说明:附加数据 */ @SerializedName("attach") private String attach; + /** 通知地址 说明:有效性:1. HTTPS;2. 不允许携带查询串。 */ @SerializedName("notify_url") private String notifyUrl; + /** 订单优惠标记 说明:商品标记,代金券或立减优惠功能的参数。 */ @SerializedName("goods_tag") private String goodsTag; + /** limitPay */ public enum LimitPayEnum { @SerializedName("no_balance") @@ -59,18 +67,23 @@ public enum LimitPayEnum { @SerializedName("limit_pay") private List limitPay; + /** 电子发票入口开放标识 说明:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 */ @SerializedName("support_fapiao") private Boolean supportFapiao; + /** amount */ @SerializedName("amount") private Amount amount; + /** detail */ @SerializedName("detail") private Detail detail; + /** settleInfo */ @SerializedName("settle_info") private SettleInfo settleInfo; + /** sceneInfo */ @SerializedName("scene_info") private SceneInfo sceneInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByIdRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByIdRequest.java index 895c69e6..5e556918 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByIdRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByIdRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByIdRequest { @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByOutTradeNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByOutTradeNoRequest.java index bd512168..66f2f529 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByOutTradeNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/QueryOrderByOutTradeNoRequest.java @@ -22,6 +22,7 @@ public class QueryOrderByOutTradeNoRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** mchid 说明:直连商户号 */ @SerializedName("mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/SceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/SceneInfo.java index 9ba7d2db..406583ff 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/SceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/SceneInfo.java @@ -20,9 +20,11 @@ public class SceneInfo { /** 用户终端IP 说明:用户终端IP */ @SerializedName("payer_client_ip") private String payerClientIp; + /** 商户端设备号 说明:商户端设备号 */ @SerializedName("device_id") private String deviceId; + /** storeInfo */ @SerializedName("store_info") private StoreInfo storeInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/StoreInfo.java index 47368ee1..12d190a6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/payments/nativepay/model/StoreInfo.java @@ -20,12 +20,15 @@ public class StoreInfo { /** 门店编号 说明:商户侧门店编号 */ @SerializedName("id") private String id; + /** 门店名称 说明:商户侧门店名称 */ @SerializedName("name") private String name; + /** 地区编码 说明:地区编码,详细请见微信支付提供的文档 */ @SerializedName("area_code") private String areaCode; + /** 详细地址 说明:详细的商户门店地址 */ @SerializedName("address") private String address; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/PayrollCardService.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/PayrollCardService.java index 8f4d49c7..64006b19 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/PayrollCardService.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/PayrollCardService.java @@ -60,6 +60,7 @@ private PayrollCardService(HttpClient httpClient, HostName hostName, PrivacyEncr this.hostName = hostName; this.encryptor = requireNonNull(encryptor); } + /** PayrollCardService构造器 */ public static class Builder { @@ -136,6 +137,7 @@ public AuthenticationEntity getAuthentication(GetAuthenticationRequest request) httpClient.execute(httpRequest, AuthenticationEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询核身记录 * @@ -193,6 +195,7 @@ public ListAuthenticationsResponse listAuthentications(ListAuthenticationsReques httpClient.execute(httpRequest, ListAuthenticationsResponse.class); return httpResponse.getServiceResponse(); } + /** * 微工卡核身预下单 * @@ -224,6 +227,7 @@ public PreOrderAuthenticationResponse preOrderAuthentication( httpClient.execute(httpRequest, PreOrderAuthenticationResponse.class); return httpResponse.getServiceResponse(); } + /** * 微工卡核身预下单(流程中完成授权) * @@ -258,6 +262,7 @@ public PreOrderAuthenticationWithAuthResponse preOrderAuthenticationWithAuth( httpClient.execute(httpRequest, PreOrderAuthenticationWithAuthResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询微工卡授权关系 * @@ -303,6 +308,7 @@ public RelationEntity getRelation(GetRelationRequest request) { httpClient.execute(httpRequest, RelationEntity.class); return httpResponse.getServiceResponse(); } + /** * 生成授权token * @@ -334,6 +340,7 @@ public TokenEntity createToken(CreateTokenRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, TokenEntity.class); return httpResponse.getServiceResponse(); } + /** * 发起批量转账 * diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/AuthenticationEntity.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/AuthenticationEntity.java index 2bacc082..55cec0ae 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/AuthenticationEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/AuthenticationEntity.java @@ -20,27 +20,35 @@ public class AuthenticationEntity { /** 服务商商户号 说明:服务商商户号 */ @SerializedName("mchid") private String mchid; + /** 特约商户商户号 说明:特约商户商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 用户OpenID 说明:用户OpenID */ @SerializedName("openid") private String openid; + /** 核身渠道 说明:核身渠道,发起核身时的来源渠道,如通过小程序,硬件设备等 */ @SerializedName("authenticate_scene") private AuthenticationScene authenticateScene; + /** 核身渠道标识 说明:核身渠道标识,用于定位渠道具体来源,如果是扫码打卡渠道标识就是具体的小程序AppID,若是硬件设备,则是设备的序列号等 */ @SerializedName("authenticate_source") private String authenticateSource; + /** 项目名称 说明:项目名称 */ @SerializedName("project_name") private String projectName; + /** 用工企业 说明:该工人所属的用工企业,由商户核身下单时传入 */ @SerializedName("employer_name") private String employerName; + /** 核身状态 说明:核身状态 */ @SerializedName("authenticate_state") private AuthenticationState authenticateState; + /** * 核身时间 * 说明:核身时间,遵循RFC3339标准格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -48,12 +56,15 @@ public class AuthenticationEntity { */ @SerializedName("authenticate_time") private String authenticateTime; + /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") private String authenticateNumber; + /** 核身失败原因 说明:结果为核身失败时的原因描述,仅在失败记录返回 */ @SerializedName("authenticate_failed_reason") private String authenticateFailedReason; + /** 核身类型 说明:核身类型 */ @SerializedName("authenticate_type") private AuthenticationType authenticateType; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTokenRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTokenRequest.java index 87ef30a5..85be820d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTokenRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTokenRequest.java @@ -22,27 +22,33 @@ public class CreateTokenRequest { /** 用户OpenID 说明:用户OpenID */ @SerializedName("openid") private String openid; + /** * 服务商AppID 说明:当输入服务商AppID时,会校验其与服务商商户号的绑定关系。 服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("appid") private String appid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** * 特约商户AppID 说明:当输入特约商户AppID时,会校验其与特约商户号的绑定关系。 服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("sub_appid") private String subAppid; + /** 用户实名 说明:用户实名信息,按照APIV3标准加密该字段 */ @Encryption @SerializedName("user_name") private String userName; + /** 用户证件号 说明:用户证件号,按照APIV3标准加密该字段 */ @Encryption @SerializedName("id_card_number") private String idCardNumber; + /** * 用工类型 * 说明:微工卡服务仅支持用于与商户有用工关系的用户,需明确用工类型;参考值:长期用工:LONG_TERM_EMPLOYMENT,短期用工:SHORT_TERM_EMPLOYMENT,合作关系:COOPERATION_EMPLOYMENT diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTransferBatchRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTransferBatchRequest.java index 4b80d3ae..ac6e5c25 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTransferBatchRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/CreateTransferBatchRequest.java @@ -24,6 +24,7 @@ public class CreateTransferBatchRequest { /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** * 特约商户AppID * 说明:微信分配的特约商户公众账号ID,特约商户授权类型为INFORMATION_AUTHORIZATION_TYPE和INFORMATION_AND_FUND_AUTHORIZATION_TYPE时 @@ -31,43 +32,54 @@ public class CreateTransferBatchRequest { */ @SerializedName("sub_appid") private String subAppid; + /** 特约商户授权类型 说明:特约商户授权类型 */ @SerializedName("authorization_type") private AuthType authorizationType; + /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 批次名称 说明:该笔批量转账的名称 */ @SerializedName("batch_name") private String batchName; + /** 批次备注 说明:转账说明,UTF8编码,最多允许32个字符 */ @SerializedName("batch_remark") private String batchRemark; + /** 转账总金额 说明:转账金额单位为“分”。转账总金额必须与批次内所有明细转账金额之和保持一致,否则无法发起转账操作 */ @SerializedName("total_amount") private Long totalAmount; + /** 转账总笔数 说明:一个转账批次单最多发起三千笔转账。转账总笔数必须与批次内所有明细之和保持一致,否则无法发起转账操作 */ @SerializedName("total_num") private Integer totalNum; + /** 转账明细列表 说明:发起批量转账的明细列表,最多三千笔 */ @Encryption @SerializedName("transfer_detail_list") private List transferDetailList = new ArrayList(); + /** 服务商的AppID 说明:微信分配的服务商商户公众账号ID,特约商户授权类型为FUND_AUTHORIZATION_TYPE时 需要填写 */ @SerializedName("sp_appid") private String spAppid; + /** * 用工类型 * 说明:微工卡服务仅支持用于与商户有用工关系的用户,需明确用工类型;参考值:长期用工:LONG_TERM_EMPLOYMENT,短期用工:SHORT_TERM_EMPLOYMENT,合作关系:COOPERATION_EMPLOYMENT */ @SerializedName("employment_type") private EmploymentType employmentType; + /** * 用工场景 * 说明:用工场景;参考值:LOGISTICS:物流;MANUFACTURING:制造业;HOTEL:酒店;CATERING:餐饮业;EVENT:活动促销;RETAIL:零售;OTHERS:其他 */ @SerializedName("employment_scene") private EmploymentScene employmentScene; + /** 业务来源 说明:传入业务ID后必填,区分不同任务来源于哪个业务系统 */ @SerializedName("business_type") private BusinessType businessType; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetAuthenticationRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetAuthenticationRequest.java index f54dd443..313c3e7a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetAuthenticationRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetAuthenticationRequest.java @@ -22,6 +22,7 @@ public class GetAuthenticationRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetRelationRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetRelationRequest.java index 91a4f00a..1000b629 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetRelationRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/GetRelationRequest.java @@ -22,14 +22,17 @@ public class GetRelationRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 服务商AppID 说明:当输入服务商AppID时会校验其与服务商商户号绑定关系。 服务商AppID和特约商户AppID至少输入一个。 */ @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 特约商户AppID 说明:当输入特约商户AppID时会校验其与特约商户号关系。 特约商户AppID和服务商AppID至少输入一个。 */ @SerializedName("sub_appid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsRequest.java index b7a0411c..a7b0ef89 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsRequest.java @@ -22,30 +22,37 @@ public class ListAuthenticationsRequest { @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 服务商AppID 说明:当输入服务商AppID时会校验其与服务商商户号绑定关系。 服务商AppID和特约商户AppID至少输入一个。 */ @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 特约商户AppID 说明:当输入特约商户AppID时会校验其与特约商户号关系。 特约商户AppID和服务商AppID至少输入一个。 */ @SerializedName("sub_appid") @Expose(serialize = false) private String subAppid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 核身日期 说明:核身日期,一次只能查询一天,最久可查询90天内的记录,格式为“yyyy-MM-DD” */ @SerializedName("authenticate_date") @Expose(serialize = false) private String authenticateDate; + /** 核身状态 说明:核身状态,列表查询仅提供成功状态的核身记录查询,故此字段固定默认值即可 */ @SerializedName("authenticate_state") @Expose(serialize = false) private String authenticateState; + /** 本次查询偏移量 说明:非负整数,表示该次请求资源的起始位置,从0开始计数。调用方选填,默认为0。offset为10,limit为10时,查询第10-19条数据 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 本次请求最大查询条数 说明:非0非负的整数,该次请求可返回的最大资源条数,默认值为10,最大支持10条。 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsResponse.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsResponse.java index 233e3580..fac0c375 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/ListAuthenticationsResponse.java @@ -21,12 +21,15 @@ public class ListAuthenticationsResponse { /** 查询结果记录列表 说明:查询结果记录列表 */ @SerializedName("data") private List data; + /** 总记录条数 说明:经过条件筛选,查询到的记录总数 */ @SerializedName("total_count") private Long totalCount; + /** 记录起始位置 说明:该次请求资源的起始位置,请求中包含偏移量时应答消息返回相同偏移量,否则返回默认值0 */ @SerializedName("offset") private Long offset; + /** 本次返回条数 说明:经过条件筛选,本次查询到的记录条数 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationRequest.java index 59d7f443..a0b2c5c9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationRequest.java @@ -20,26 +20,33 @@ public class PreOrderAuthenticationRequest { /** 用户OpenID 说明:用户OpenID */ @SerializedName("openid") private String openid; + /** 服务商AppID 说明:当输入服务商AppID时,会校验其与服务商商户号的绑定关系。服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("appid") private String appid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** * 特约商户AppID 说明:当输入特约商户AppID时,会校验其与特约商户号的绑定关系。服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("sub_appid") private String subAppid; + /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") private String authenticateNumber; + /** 项目名称 说明:该劳务活动的项目名称 */ @SerializedName("project_name") private String projectName; + /** 用工单位名称 说明:该工人所属的用工企业 */ @SerializedName("employer_name") private String employerName; + /** 核身类型 说明:核身类型 */ @SerializedName("authenticate_type") private AuthenticationType authenticateType; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationResponse.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationResponse.java index ae6cbd49..ae15b9ba 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationResponse.java @@ -20,18 +20,23 @@ public class PreOrderAuthenticationResponse { /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") private String authenticateNumber; + /** 微信用户OpenID 说明:微信用户OpenID */ @SerializedName("openid") private String openid; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** token值 说明:token值 */ @SerializedName("token") private String token; + /** token有效时间 说明:token有效时间,单位秒 */ @SerializedName("expires_in") private Integer expiresIn; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthRequest.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthRequest.java index f1fee014..bbaa5faf 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthRequest.java @@ -22,40 +22,50 @@ public class PreOrderAuthenticationWithAuthRequest { /** 用户OpenID 说明:用户OpenID */ @SerializedName("openid") private String openid; + /** 服务商AppID 说明:当输入服务商AppID时,会校验其与服务商商户号的绑定关系。服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("appid") private String appid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** * 特约商户AppID 说明:当输入特约商户AppID时,会校验其与特约商户号的绑定关系。服务商AppID和与特约商户AppID至少输入一个,且必须要有拉起微工卡小程序时使用的AppID。 */ @SerializedName("sub_appid") private String subAppid; + /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") private String authenticateNumber; + /** 项目名称 说明:该劳务活动的项目名称 */ @SerializedName("project_name") private String projectName; + /** 用工单位名称 说明:该工人所属的用工企业 */ @SerializedName("employer_name") private String employerName; + /** 用户实名 说明:用户实名信息,按照APIV3标准加密该字段 */ @Encryption @SerializedName("user_name") private String userName; + /** 用户证件号 说明:用户证件号,按照APIV3标准加密该字段 */ @Encryption @SerializedName("id_card_number") private String idCardNumber; + /** * 用工类型 * 说明:微工卡服务仅支持用于与商户有用工关系的用户,需明确用工类型;非必填;未授权必填,授权过,非必填,如填写,需要校验和初次填写的一致性;参考值:长期用工:LONG_TERM_EMPLOYMENT,短期用工:SHORT_TERM_EMPLOYMENT,合作关系:COOPERATION_EMPLOYMENT */ @SerializedName("employment_type") private EmploymentType employmentType; + /** 核身类型 说明:核身类型 */ @SerializedName("authenticate_type") private AuthenticationType authenticateType; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthResponse.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthResponse.java index af2f65cb..aa8a8ffc 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/PreOrderAuthenticationWithAuthResponse.java @@ -20,18 +20,23 @@ public class PreOrderAuthenticationWithAuthResponse { /** 商家核身单号 说明:商户系统内部的商家核身单号,要求此参数只能由数字、大小写字母组成,在服务商内部唯一 */ @SerializedName("authenticate_number") private String authenticateNumber; + /** 微信用户OpenID 说明:微信用户OpenID */ @SerializedName("openid") private String openid; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** token值 说明:token值 */ @SerializedName("token") private String token; + /** token有效时间 说明:token有效时间,单位秒 */ @SerializedName("expires_in") private Integer expiresIn; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/RelationEntity.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/RelationEntity.java index 90d7480d..e9a1dffd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/RelationEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/RelationEntity.java @@ -20,18 +20,23 @@ public class RelationEntity { /** 用户OpenID 说明:用户OpenID */ @SerializedName("openid") private String openid; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 授权状态 说明:授权状态:UNAUTHORIZED:未授权 AUTHORIZED:已授权 DEAUTHORIZED:已取消授权 */ @SerializedName("authorize_state") private String authorizeState; + /** 授权时间 说明:授权时间 */ @SerializedName("authorize_time") private String authorizeTime; + /** * 取消授权时间 * 说明:取消授权时间,遵循RFC3339标准格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -39,9 +44,11 @@ public class RelationEntity { */ @SerializedName("deauthorize_time") private String deauthorizeTime; + /** 开通状态 说明:微工卡的开通状态:UNREGISTERED:未开通;REGISTERED:已开通;CLOSED:已关闭 */ @SerializedName("register_state") private PayrollCardRegisterState registerState; + /** * 开通时间 * 说明:开通时间,未开通时不返回。遵循RFC3339标准格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -49,6 +56,7 @@ public class RelationEntity { */ @SerializedName("register_time") private String registerTime; + /** * 关闭时间 * 说明:关闭时间,仅当开通状态是已关闭时返回。遵循RFC3339标准格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TokenEntity.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TokenEntity.java index 57e73ec1..97dbad81 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TokenEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TokenEntity.java @@ -20,15 +20,19 @@ public class TokenEntity { /** 微信用户OpenID 说明:微信用户OpenID */ @SerializedName("openid") private String openid; + /** 商户号 说明:商户号 */ @SerializedName("mchid") private String mchid; + /** 特约商户号 说明:特约商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** token值 说明:token值 */ @SerializedName("token") private String token; + /** token有效时间 说明:token有效时间,单位秒 */ @SerializedName("expires_in") private Integer expiresIn; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferBatchEntity.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferBatchEntity.java index 3c84ab19..f1424848 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferBatchEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferBatchEntity.java @@ -20,9 +20,11 @@ public class TransferBatchEntity { /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 微信支付批次单号 说明:微信支付批次单号,微信商家转账系统返回的唯一标识 */ @SerializedName("batch_id") private String batchId; + /** 批次创建时间 说明:批次受理成功时返回,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("create_time") private String createTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferDetailInput.java b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferDetailInput.java index 77408748..3f08f116 100644 --- a/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferDetailInput.java +++ b/service/src/main/java/com/wechat/pay/java/service/payrollcard/model/TransferDetailInput.java @@ -22,15 +22,19 @@ public class TransferDetailInput { /** 商家明细单号 说明:商户系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("out_detail_no") private String outDetailNo; + /** 转账金额 说明:转账金额单位为“分” */ @SerializedName("transfer_amount") private Long transferAmount; + /** 转账备注 说明:单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符 */ @SerializedName("transfer_remark") private String transferRemark; + /** 收款用户OpenID 说明:收款用户OpenID。如果转账特约商户授权类型是INFORMATION_AUTHORIZATION_TYPE,对应的是特约商户公众号下的OpenID。 */ @SerializedName("openid") private String openid; + /** * 收款用户姓名 说明:收款用户姓名。采用标准RSA算法,公钥由微信侧提供 明细转账金额 >= 2,000时,该笔明细必须填写收款用户姓名 * 同一批次转账明细中的姓名字段传入规则需保持一致,也即全部填写、或全部不填写 若商户传入收款用户姓名,微信支付会校验用户OpenID与姓名是否一致,并提供电子回单 diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/ProfitsharingService.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/ProfitsharingService.java index 0700bcb0..250b1ac1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/ProfitsharingService.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/ProfitsharingService.java @@ -70,6 +70,7 @@ private ProfitsharingService( this.encryptor = requireNonNull(encryptor); this.decryptor = requireNonNull(decryptor); } + /** ProfitsharingService构造器 */ public static class Builder { @@ -152,6 +153,7 @@ public SplitBillResponse splitBill(SplitBillRequest request) { httpClient.execute(httpRequest, SplitBillResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询最大分账比例API * @@ -187,6 +189,7 @@ public QueryMerchantRatioResponse queryMerchantRatio(QueryMerchantRatioRequest r httpClient.execute(httpRequest, QueryMerchantRatioResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账API * @@ -218,6 +221,7 @@ public OrdersEntity createOrder(CreateOrderRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, OrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询分账结果API * @@ -260,6 +264,7 @@ public OrdersEntity queryOrder(QueryOrderRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, OrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 解冻剩余资金API * @@ -289,6 +294,7 @@ public OrdersEntity unfreezeOrder(UnfreezeOrderRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, OrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 添加分账接收方API * @@ -321,6 +327,7 @@ public AddReceiverResponse addReceiver(AddReceiverRequest request) { httpClient.execute(httpRequest, AddReceiverResponse.class); return httpResponse.getServiceResponse().cloneWithCipher(decryptor::decrypt); } + /** * 删除分账接收方API * @@ -351,6 +358,7 @@ public DeleteReceiverResponse deleteReceiver(DeleteReceiverRequest request) { httpClient.execute(httpRequest, DeleteReceiverResponse.class); return httpResponse.getServiceResponse(); } + /** * 请求分账回退API * @@ -381,6 +389,7 @@ public ReturnOrdersEntity createReturnOrder(CreateReturnOrderRequest request) { httpClient.execute(httpRequest, ReturnOrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询分账回退结果API * @@ -425,6 +434,7 @@ public ReturnOrdersEntity queryReturnOrder(QueryReturnOrderRequest request) { httpClient.execute(httpRequest, ReturnOrdersEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询剩余待分金额API * diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverRequest.java index 77e8fc31..6f3f7829 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverRequest.java @@ -22,24 +22,29 @@ public class AddReceiverRequest { /** 子商户号 说明:微信支付分配的子商户号,即分账的出资商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:子商户的公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填。(直连商户不需要,服务商需要) */ @SerializedName("sub_appid") private String subAppid; + /** * 接收方类型 说明:枚举值: MERCHANT_ID:商户ID PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * PERSONAL_SUB_OPENID:个人sub_openid(由子商户APPID转换得到) */ @SerializedName("type") private ReceiverType type; + /** * 接收方账号 说明:类型是MERCHANT_ID时,是商户号 类型是PERSONAL_OPENID时,是个人openid * 类型是PERSONAL_SUB_OPENID时,是个人sub_openid */ @SerializedName("account") private String account; + /** * 分账接收方全称 说明:分账接收方类型是MERCHANT_ID时,是商户全称(必传),当商户是小微商户或个体户时,是开户人姓名 * 分账接收方类型是PERSONAL_OPENID时,是个人姓名(选传,传则校验) 分账接收方类型是PERSONAL_SUB_OPENID时,是个人姓名(选传,传则校验) @@ -49,12 +54,14 @@ public class AddReceiverRequest { @Encryption @SerializedName("name") private String name; + /** * 与分账方的关系类型 说明:子商户与接收方的关系。 本字段值为枚举: SERVICE_PROVIDER:服务商 STORE:门店 STAFF:员工 STORE_OWNER:店主 * PARTNER:合作伙伴 HEADQUARTER:总部 BRAND:品牌方 DISTRIBUTOR:分销商 USER:用户 SUPPLIER:供应商 CUSTOM:自定义 */ @SerializedName("relation_type") private ReceiverRelationType relationType; + /** * 自定义的分账关系 说明:子商户与接收方具体的关系,本字段最多10个字。 当字段relation_type的值为CUSTOM时,本字段必填 * 当字段relation_type的值不为CUSTOM时,本字段无需填写 diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverResponse.java index bcccabdd..17286170 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/AddReceiverResponse.java @@ -22,19 +22,24 @@ public class AddReceiverResponse { /** 子商户号 说明:参考请求参数 */ @SerializedName("sub_mchid") private String subMchid; + /** 接收方类型 说明:参考请求参数 */ @SerializedName("type") private ReceiverType type; + /** 接收方账号 说明:参考请求参数 */ @SerializedName("account") private String account; + /** 分账接收方全称 说明:参考请求参数。使用APIv3敏感信息加密方式 */ @Encryption @SerializedName("name") private String name; + /** 与分账方的关系类型 说明:参考请求参数 */ @SerializedName("relation_type") private ReceiverRelationType relationType; + /** 自定义的分账关系 说明:参考请求参数 */ @SerializedName("custom_relation") private String customRelation; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderReceiver.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderReceiver.java index 5e0e05d0..0df30580 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderReceiver.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderReceiver.java @@ -25,12 +25,14 @@ public class CreateOrderReceiver { */ @SerializedName("type") private String type; + /** * 分账接收方帐号 说明:1、类型是MERCHANT_ID时,是商户号 2、类型是PERSONAL_OPENID时,是个人openid * 3、类型是PERSONAL_SUB_OPENID时,是个人sub_openid */ @SerializedName("account") private String account; + /** * 分账个人接收方姓名 说明:可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID或PERSONAL_SUB_OPENID时,是个人姓名的密文(选传,传则校验) 此字段的加密的方式为:敏感信息加密说明 @@ -39,9 +41,11 @@ public class CreateOrderReceiver { @Encryption @SerializedName("name") private String name; + /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderRequest.java index dec29493..55564f02 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateOrderRequest.java @@ -24,27 +24,34 @@ public class CreateOrderRequest { /** 子商户号 说明:微信支付分配的子商户号,即分账的出资商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 公众账号ID 说明:微信分配的服务商appid */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:微信分配的子商户公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填。(直连商户不需要,服务商需要) */ @SerializedName("sub_appid") private String subAppid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:服务商系统内部的分账单号,在服务商系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账接收方列表 说明:分账接收方列表,可以设置出资商户作为分账接受方,最多可有50个分账接收方 */ @Encryption @SerializedName("receivers") private List receivers = new ArrayList(); + /** * 是否解冻剩余未分资金 说明:1、如果为true,该笔订单剩余未分账的金额会解冻回分账方商户; 2、如果为false,该笔订单剩余未分账的金额不会解冻回分账方商户,可以对该笔订单再次进行分账。 */ @SerializedName("unfreeze_unsplit") private Boolean unfreezeUnsplit; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateReturnOrderRequest.java index 513d528b..f52e9562 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/CreateReturnOrderRequest.java @@ -20,21 +20,27 @@ public class CreateReturnOrderRequest { /** 子商户号 说明:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识。微信分账单号和商户分账单号二选一填写 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。微信分账单号和商户分账单号二选一填写 取值范围:[0-9a-zA-Z_*@-] */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 */ @SerializedName("out_return_no") private String outReturnNo; + /** 回退商户号 说明:分账回退的出资商户,只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 */ @SerializedName("amount") private Long amount; + /** 回退描述 说明:分账回退的原因描述 */ @SerializedName("description") private String description; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverRequest.java index 0aa46293..7803db38 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverRequest.java @@ -20,18 +20,22 @@ public class DeleteReceiverRequest { /** 子商户号 说明:微信支付分配的子商户号,即分账的出资商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 公众账号ID 说明:微信分配的公众账号ID */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:微信分配的子商户公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填。(直连商户不需要,服务商需要) */ @SerializedName("sub_appid") private String subAppid; + /** * 接收方类型 说明:枚举值: MERCHANT_ID:商户ID PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * PERSONAL_SUB_OPENID:个人sub_openid(由子商户APPID转换得到) */ @SerializedName("type") private ReceiverType type; + /** * 接收方账号 说明:类型是MERCHANT\\_ID时,是商户号 类型是PERSONAL\\_OPENID时,是个人openid * [openid获取方法](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/open/pay/chapter3_3_1.shtml#part-13) diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverResponse.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverResponse.java index 24eec033..4e497a2b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/DeleteReceiverResponse.java @@ -20,9 +20,11 @@ public class DeleteReceiverResponse { /** 子商户号 说明:参考请求参数 */ @SerializedName("sub_mchid") private String subMchid; + /** 接收方类型 说明:参考请求参数 */ @SerializedName("type") private ReceiverType type; + /** 接收方账号 说明:参考请求参数 */ @SerializedName("account") private String account; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrderReceiverDetail.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrderReceiverDetail.java index 9bcfa458..de7a05a1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrderReceiverDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrderReceiverDetail.java @@ -20,30 +20,38 @@ public class OrderReceiverDetail { /** 分账金额 说明:分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 */ @SerializedName("amount") private Long amount; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 接收方类型 说明:接收方类型 */ @SerializedName("type") private ReceiverType type; + /** * 接收方账号 说明:1、类型是MERCHANT_ID时,是商户号 2、类型是PERSONAL_OPENID时,是个人openid * 3、类型是PERSONAL_SUB_OPENID时,是个人sub_openid */ @SerializedName("account") private String account; + /** 分账结果 说明:分账结果 */ @SerializedName("result") private DetailStatus result; + /** 分账失败原因 说明:分账失败原因,状态为CLOSED时返回 */ @SerializedName("fail_reason") private DetailFailReason failReason; + /** 分账创建时间 说明:分账创建时间,遵循RFC3339标准格式 */ @SerializedName("create_time") private String createTime; + /** 分账完成时间 说明:分账完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; + /** 分账明细单号 说明:微信分账明细单号,每笔分账业务执行的明细单号,可与资金账单对账使用 */ @SerializedName("detail_id") private String detailId; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrdersEntity.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrdersEntity.java index 28d08e57..23a551c2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrdersEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/OrdersEntity.java @@ -21,18 +21,23 @@ public class OrdersEntity { /** 子商户号 说明:微信支付分配的子商户号,即分账的出资商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母\\_\\-\\|\\*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 分账单状态 说明:分账单状态(每个接收方的分账结果请查看receivers中的result字段) */ @SerializedName("state") private OrderStatus state; + /** 分账接收方列表 说明:分账接收方列表 */ @SerializedName("receivers") private List receivers; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryMerchantRatioResponse.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryMerchantRatioResponse.java index e6b4d990..caa8ef13 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryMerchantRatioResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryMerchantRatioResponse.java @@ -20,6 +20,7 @@ public class QueryMerchantRatioResponse { /** 子商户号 说明:参考请求参数 */ @SerializedName("sub_mchid") private String subMchid; + /** 最大分账比例 说明:子商户允许父商户分账的最大比例,单位万分比,比如2000表示20% */ @SerializedName("max_ratio") private Long maxRatio; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderAmountResponse.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderAmountResponse.java index 837db785..2499e147 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderAmountResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderAmountResponse.java @@ -20,6 +20,7 @@ public class QueryOrderAmountResponse { /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 订单剩余待分金额 说明:订单剩余待分金额,整数,单元为分 */ @SerializedName("unsplit_amount") private Long unsplitAmount; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderRequest.java index a3827acc..e3c68790 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryOrderRequest.java @@ -22,10 +22,12 @@ public class QueryOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") @Expose(serialize = false) private String transactionId; + /** 商户分账单号 说明:查询分账结果,输入申请分账时的商户分账单号; 查询分账完结执行的结果,输入发起分账完结时的商户分账单号。 */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryReturnOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryReturnOrderRequest.java index 3d9bf921..a24e50c8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryReturnOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/QueryReturnOrderRequest.java @@ -22,10 +22,12 @@ public class QueryReturnOrderRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 商户回退单号 说明:调用回退接口提供的商户系统内部的回退单号 */ @SerializedName("out_return_no") @Expose(serialize = false) private String outReturnNo; + /** 商户分账单号 说明:原发起分账请求时使用的商户系统内部的分账单号 */ @SerializedName("out_order_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/ReturnOrdersEntity.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/ReturnOrdersEntity.java index 4a0941d9..ac78b2a1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/ReturnOrdersEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/ReturnOrdersEntity.java @@ -20,39 +20,50 @@ public class ReturnOrdersEntity { /** 子商户号 说明:参考请求参数 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信分账单号 说明:微信分账单号,微信系统返回的唯一标识 */ @SerializedName("order_id") private String orderId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次 */ @SerializedName("out_order_no") private String outOrderNo; + /** 商户回退单号 说明:调用回退接口提供的商户系统内部的回退单号 */ @SerializedName("out_return_no") private String outReturnNo; + /** 微信回退单号 说明:微信分账回退单号,微信系统返回的唯一标识 */ @SerializedName("return_id") private String returnId; + /** 回退商户号 说明:只能对原分账请求中成功分给商户接收方进行回退 */ @SerializedName("return_mchid") private String returnMchid; + /** 回退金额 说明:需要从分账接收方回退的金额,单位为分,只能为整数 */ @SerializedName("amount") private Long amount; + /** 回退描述 说明:分账回退的原因描述 */ @SerializedName("description") private String description; + /** * 回退结果 * 说明:如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果。如果查询到回退结果在处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险。在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败 */ @SerializedName("result") private ReturnOrderStatus result; + /** 失败原因 说明:失败原因 */ @SerializedName("fail_reason") private ReturnOrderFailReason failReason; + /** 创建时间 说明:分账回退创建时间,遵循RFC3339标准格式 */ @SerializedName("create_time") private String createTime; + /** 完成时间 说明:分账回退完成时间,遵循RFC3339标准格式 */ @SerializedName("finish_time") private String finishTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillRequest.java index 452f7fd8..b1b35267 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillRequest.java @@ -22,10 +22,12 @@ public class SplitBillRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 账单日期 说明:格式YYYY-MM-DD。仅支持三个月内的账单下载申请。 */ @SerializedName("bill_date") @Expose(serialize = false) private String billDate; + /** 压缩类型 说明:不填则以不压缩的方式返回数据流 */ @SerializedName("tar_type") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillResponse.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillResponse.java index a0e15930..9a7cc284 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/SplitBillResponse.java @@ -20,9 +20,11 @@ public class SplitBillResponse { /** 哈希类型 说明:原始账单(gzip需要解压缩)的摘要算法,用于校验文件的完整性 */ @SerializedName("hash_type") private SplitBillHashType hashType; + /** 哈希值 说明:原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性 */ @SerializedName("hash_value") private String hashValue; + /** 下载地址 说明:供下一步请求账单文件的下载地址,该地址30s内有效 */ @SerializedName("download_url") private String downloadUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/UnfreezeOrderRequest.java b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/UnfreezeOrderRequest.java index 56cfbac8..c148559e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/UnfreezeOrderRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/profitsharing/model/UnfreezeOrderRequest.java @@ -20,15 +20,19 @@ public class UnfreezeOrderRequest { /** 子商户号 说明:微信支付分配的子商户号,即分账的出资商户号。(直连商户不需要,服务商需要) */ @SerializedName("sub_mchid") private String subMchid; + /** 微信订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户分账单号 说明:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ */ @SerializedName("out_order_no") private String outOrderNo; + /** 分账描述 说明:分账的原因描述,分账账单中需要体现 */ @SerializedName("description") private String description; + /** 分账结果回调url 说明:异步接收微信支付分账结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数 */ @SerializedName("notify_url") private String notifyUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/RefundService.java b/service/src/main/java/com/wechat/pay/java/service/refund/RefundService.java index 26aa3f20..9b3b6fc6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/RefundService.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/RefundService.java @@ -46,11 +46,13 @@ private RefundService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** RefundService构造器 */ public static class Builder { private HttpClient httpClient; private HostName hostName; + /** * 设置请求配置,以该配置构造默认的httpClient,若未调用httpClient()方法,则必须调用该方法 * @@ -61,6 +63,7 @@ public Builder config(Config config) { this.httpClient = new DefaultHttpClientBuilder().config(config).build(); return this; } + /** * 设置微信支付域名,可选,默认为api.mch.weixin.qq.com * @@ -71,6 +74,7 @@ public Builder hostName(HostName hostName) { this.hostName = hostName; return this; } + /** * 设置自定义httpClient,若未调用config(),则必须调用该方法 * @@ -81,6 +85,7 @@ public Builder httpClient(HttpClient httpClient) { this.httpClient = httpClient; return this; } + /** * 构造服务 * @@ -120,6 +125,7 @@ public Refund create(CreateRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Refund.class); return httpResponse.getServiceResponse(); } + /** * 查询单笔退款(通过商户退款单号) * diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/Amount.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/Amount.java index bdb9e392..c00d8571 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/Amount.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/Amount.java @@ -21,30 +21,39 @@ public class Amount { /** 订单金额 说明:订单总金额,单位为分 */ @SerializedName("total") private Long total; + /** 退款金额 说明:退款标价金额,单位为分,可以做部分退款 */ @SerializedName("refund") private Long refund; + /** 退款出资账户及金额 说明:退款出资的账户类型及金额信息 */ @SerializedName("from") private List from; + /** 用户支付金额 说明:现金支付金额,单位为分,只能为整数 */ @SerializedName("payer_total") private Long payerTotal; + /** 用户退款金额 说明:退款给用户的金额,不包含所有优惠券金额 */ @SerializedName("payer_refund") private Long payerRefund; + /** 应结退款金额 说明:去掉非充值代金券退款金额后的退款金额,单位为分,退款金额=申请退款金额-非充值代金券退款金额,退款金额<=申请退款金额 */ @SerializedName("settlement_refund") private Long settlementRefund; + /** 应结订单金额 说明:应结订单金额=订单金额-免充值代金券金额,应结订单金额<=订单金额,单位为分 */ @SerializedName("settlement_total") private Long settlementTotal; + /** 优惠退款金额 说明:优惠退款金额<=退款金额,退款金额-代金券或立减优惠退款金额为现金,说明详见代金券或立减优惠,单位为分 */ @SerializedName("discount_refund") private Long discountRefund; + /** 退款币种 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY。 */ @SerializedName("currency") private String currency; + /** 手续费退款金额 说明:手续费退款金额,单位为分 */ @SerializedName("refund_fee") private Long refundFee; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/AmountReq.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/AmountReq.java index 24198bc4..ce1674f4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/AmountReq.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/AmountReq.java @@ -21,6 +21,7 @@ public class AmountReq { /** 退款金额 说明:退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额。 */ @SerializedName("refund") private Long refund; + /** * 退款出资账户及金额 说明:退款需要从指定账户出资时,传递此参数指定出资金额(币种的最小单位,只能为整数)。 * 同时指定多个账户出资退款的使用场景需要满足以下条件:1、未开通退款支出分离产品功能;2、订单属于分账订单,且分账处于待分账或分账中状态。 @@ -28,9 +29,11 @@ public class AmountReq { */ @SerializedName("from") private List from; + /** 原订单金额 说明:原支付交易的订单总金额,币种的最小单位,只能为整数。 */ @SerializedName("total") private Long total; + /** 退款币种 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/CreateRequest.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/CreateRequest.java index 3a35aea5..7ac10474 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/CreateRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/CreateRequest.java @@ -21,30 +21,38 @@ public class CreateRequest { /** 子商户号 说明:子商户的商户号,由微信支付生成并下发。服务商模式下必须传递此参数 */ @SerializedName("sub_mchid") private String subMchid; + /** 微信支付订单号 说明:原支付交易对应的微信订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户订单号 说明:原支付交易对应的商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 退款原因 说明:若商户传入,会在下发给用户的退款消息中体现退款原因 */ @SerializedName("reason") private String reason; + /** * 退款结果回调url 说明:异步接收微信支付退款结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。 * 如果参数中传了notify_url,则商户平台上配置的回调地址将不会生效,优先回调当前传的这个地址。 */ @SerializedName("notify_url") private String notifyUrl; + /** 退款商品 说明:指定商品退款需要传此参数,其他场景无需传递 */ @SerializedName("goods_detail") private List goodsDetail; + /** 金额信息 说明:订单金额信息 */ @SerializedName("amount") private AmountReq amount; + /** 退款资金来源 说明:若传递此参数则使用对应的资金账户退款,否则默认使用未结算资金退款(仅对老资金流商户适用) 枚举值: - AVAILABLE:可用余额账户 */ @SerializedName("funds_account") private ReqFundsAccount fundsAccount; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/FundsFromItem.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/FundsFromItem.java index 39fc5e4c..1bb9d060 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/FundsFromItem.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/FundsFromItem.java @@ -20,6 +20,7 @@ public class FundsFromItem { /** 出资金额 说明:对应账户出资金额 */ @SerializedName("amount") private Long amount; + /** 出资账户类型 说明:下面枚举值多选一。 枚举值: AVAILABLE : 可用余额 UNAVAILABLE : 不可用余额 */ @SerializedName("account") private Account account; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/GoodsDetail.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/GoodsDetail.java index 9b3e549e..67befbdd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/GoodsDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/GoodsDetail.java @@ -20,18 +20,23 @@ public class GoodsDetail { /** 商户侧商品编码 说明:由半角的大小写字母、数字、中划线、下划线中的一种或几种组成 */ @SerializedName("merchant_goods_id") private String merchantGoodsId; + /** 微信侧商品编码 说明:微信支付定义的统一商品编号(没有可不传) */ @SerializedName("wechatpay_goods_id") private String wechatpayGoodsId; + /** 商品名称 说明:商品的实际名称 */ @SerializedName("goods_name") private String goodsName; + /** 商品单价 说明:商品单价金额,单位为分 */ @SerializedName("unit_price") private Long unitPrice; + /** 商品退款金额 说明:商品退款金额,单位为分 */ @SerializedName("refund_amount") private Long refundAmount; + /** 商品退货数量 说明:对应商品的退货数量 */ @SerializedName("refund_quantity") private Integer refundQuantity; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/Promotion.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/Promotion.java index e9d79fee..6fe04743 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/Promotion.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/Promotion.java @@ -21,18 +21,23 @@ public class Promotion { /** 券ID 说明:券或者立减优惠id */ @SerializedName("promotion_id") private String promotionId; + /** 优惠券面额 说明:用户享受优惠的金额(优惠券面额=微信出资金额+商家出资金额+其他出资方金额 ),单位为分 */ @SerializedName("amount") private Long amount; + /** 优惠退款金额 说明:优惠退款金额<=退款金额,退款金额-代金券或立减优惠退款金额为用户支付的现金,说明详见代金券或立减优惠,单位为分 */ @SerializedName("refund_amount") private Long refundAmount; + /** 商品列表 说明:优惠商品发生退款时返回商品信息 */ @SerializedName("goods_detail") private List goodsDetail; + /** 优惠范围 说明:枚举值: - GLOBAL- 全场代金券 - SINGLE- 单品优惠 */ @SerializedName("scope") private Scope scope; + /** 优惠类型 说明:枚举值: - COUPON- 代金券,需要走结算资金的充值型代金券 - DISCOUNT- 优惠券,不走结算资金的免充值型优惠券 */ @SerializedName("type") private Type type; diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/QueryByOutRefundNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/QueryByOutRefundNoRequest.java index 01bcc182..4039a8e4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/QueryByOutRefundNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/QueryByOutRefundNoRequest.java @@ -22,6 +22,7 @@ public class QueryByOutRefundNoRequest { @SerializedName("out_refund_no") @Expose(serialize = false) private String outRefundNo; + /** 子商户号 说明:子商户的商户号,由微信支付生成并下发。服务商模式下必须传递此参数 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/Refund.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/Refund.java index 3b236009..e63fa195 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/Refund.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/Refund.java @@ -21,21 +21,26 @@ public class Refund { /** 微信支付退款号 说明:微信支付退款号 */ @SerializedName("refund_id") private String refundId; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 微信支付订单号 说明:微信支付交易订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户订单号 说明:原支付交易对应的商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** * 退款入账账户 说明:取当前退款单的退款入账方,有以下几种情况: 1)退回银行卡:{银行名称}{卡类型}{卡尾号} 2)退回支付用户零钱:支付用户零钱 * 3)退还商户:商户基本账户商户结算银行账户 4)退回支付用户零钱通:支付用户零钱通 */ @SerializedName("user_received_account") private String userReceivedAccount; + /** * 退款成功时间 * 说明:退款成功时间,退款状态status为SUCCESS(退款成功)时,返回该字段。遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -43,6 +48,7 @@ public class Refund { */ @SerializedName("success_time") private String successTime; + /** * 退款创建时间 * 说明:退款受理时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -50,24 +56,29 @@ public class Refund { */ @SerializedName("create_time") private String createTime; + /** 优惠退款信息 说明:优惠退款信息 */ @SerializedName("promotion_detail") private List promotionDetail; + /** 金额信息 说明:金额详细信息 */ @SerializedName("amount") private Amount amount; + /** * 退款渠道 说明:枚举值: - ORIGINAL—原路退款 - BALANCE—退回到余额 - OTHER_BALANCE—原账户异常退到其他余额账户 - * OTHER_BANKCARD—原银行卡异常退到其他银行卡 */ @SerializedName("channel") private Channel channel; + /** * 资金账户 说明:退款所使用资金对应的资金账户类型 枚举值: - UNSETTLED : 未结算资金 - AVAILABLE : 可用余额 - UNAVAILABLE : 不可用余额 - * OPERATION : 运营户 - BASIC : 基本账户(含可用余额和不可用余额) */ @SerializedName("funds_account") private FundsAccount fundsAccount; + /** * 退款状态 说明:退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台(pay.weixin.qq.com)-交易中心,手动处理此笔退款。 枚举值: - * SUCCESS—退款成功 - CLOSED—退款关闭 - PROCESSING—退款处理中 - ABNORMAL—退款异常 diff --git a/service/src/main/java/com/wechat/pay/java/service/refund/model/RefundNotification.java b/service/src/main/java/com/wechat/pay/java/service/refund/model/RefundNotification.java index c6de3a6d..f26b2781 100644 --- a/service/src/main/java/com/wechat/pay/java/service/refund/model/RefundNotification.java +++ b/service/src/main/java/com/wechat/pay/java/service/refund/model/RefundNotification.java @@ -11,21 +11,26 @@ public class RefundNotification { /** 微信支付退款号 说明:微信支付退款号 */ @SerializedName("refund_id") private String refundId; + /** 商户退款单号 说明:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 */ @SerializedName("out_refund_no") private String outRefundNo; + /** 微信支付订单号 说明:微信支付交易订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 商户订单号 说明:原支付交易对应的商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** * 退款入账账户 说明:取当前退款单的退款入账方,有以下几种情况: 1)退回银行卡:{银行名称}{卡类型}{卡尾号} 2)退回支付用户零钱:支付用户零钱 * 3)退还商户:商户基本账户商户结算银行账户 4)退回支付用户零钱通:支付用户零钱通 */ @SerializedName("user_received_account") private String userReceivedAccount; + /** * 退款成功时间 * 说明:退款成功时间,退款状态status为SUCCESS(退款成功)时,返回该字段。遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -33,6 +38,7 @@ public class RefundNotification { */ @SerializedName("success_time") private String successTime; + /** * 退款创建时间 * 说明:退款受理时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -40,18 +46,22 @@ public class RefundNotification { */ @SerializedName("create_time") private String createTime; + /** 优惠退款信息 说明:优惠退款信息 */ @SerializedName("promotion_detail") private List promotionDetail = new ArrayList(); + /** 金额信息 说明:金额详细信息 */ @SerializedName("amount") private Amount amount; + /** * 退款渠道 说明:枚举值: - ORIGINAL—原路退款 - BALANCE—退回到余额 - OTHER_BALANCE—原账户异常退到其他余额账户 - * OTHER_BANKCARD—原银行卡异常退到其他银行卡 */ @SerializedName("channel") private Channel channel; + /** * 资金账户 说明:退款所使用资金对应的资金账户类型 枚举值: - UNSETTLED : 未结算资金 - AVAILABLE : 可用余额 - UNAVAILABLE : 不可用余额 - * OPERATION : 运营户 - BASIC : 基本账户(含可用余额和不可用余额) diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/RetailStoreService.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/RetailStoreService.java index e18c50d8..cfa4fd85 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/RetailStoreService.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/RetailStoreService.java @@ -67,6 +67,7 @@ private RetailStoreService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** RetailStoreService构造器 */ public static class Builder { @@ -130,6 +131,7 @@ public ApplyActivityResponse applyActivity(ApplyActivityRequest request) { httpClient.execute(httpRequest, ApplyActivityResponse.class); return httpResponse.getServiceResponse(); } + /** * 按区域查询品牌加价购活动 * @@ -173,6 +175,7 @@ public ListActsByAreaResponse listActsByArea(ListActsByAreaRequest request) { httpClient.execute(httpRequest, ListActsByAreaResponse.class); return httpResponse.getServiceResponse(); } + /** * 锁定品牌加价购活动资格 * @@ -204,6 +207,7 @@ public LockQualificationResponse lockQualification(LockQualificationRequest requ httpClient.execute(httpRequest, LockQualificationResponse.class); return httpResponse.getServiceResponse(); } + /** * 解锁品牌加价购活动资格 * @@ -235,6 +239,7 @@ public UnlockQualificationResponse unlockQualification(UnlockQualificationReques httpClient.execute(httpRequest, UnlockQualificationResponse.class); return httpResponse.getServiceResponse(); } + /** * 添加零售小店活动业务代理 * @@ -271,6 +276,7 @@ public AddRepresentativesResponse addRepresentative(AddRepresentativeRequest req httpClient.execute(httpRequest, AddRepresentativesResponse.class); return httpResponse.getServiceResponse(); } + /** * 添加小店活动门店 * @@ -306,6 +312,7 @@ public AddStoresResponse addStores(AddStoresRequest request) { httpClient.execute(httpRequest, AddStoresResponse.class); return httpResponse.getServiceResponse(); } + /** * 生成小店活动物料码 * @@ -340,6 +347,7 @@ public Materials createMaterials(CreateMaterialsRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Materials.class); return httpResponse.getServiceResponse(); } + /** * 删除零售小店活动业务代理 * @@ -376,6 +384,7 @@ public DeleteRepresentativeResponse deleteRepresentative(DeleteRepresentativeReq httpClient.execute(httpRequest, DeleteRepresentativeResponse.class); return httpResponse.getServiceResponse(); } + /** * 删除小店活动门店 * @@ -411,6 +420,7 @@ public DeleteStoresResponse deleteStores(DeleteStoresRequest request) { httpClient.execute(httpRequest, DeleteStoresResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询小店活动门店详情 * @@ -448,6 +458,7 @@ public RetailStoreInfo getStore(GetStoreRequest request) { httpClient.execute(httpRequest, RetailStoreInfo.class); return httpResponse.getServiceResponse(); } + /** * 查询零售小店活动业务代理 * @@ -492,6 +503,7 @@ public ListRepresentativeResponse listRepresentative(ListRepresentativeRequest r httpClient.execute(httpRequest, ListRepresentativeResponse.class); return httpResponse.getServiceResponse(); } + /** * 查询小店活动门店列表 * diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActApplyInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActApplyInfo.java index 78caba6c..ac694880 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActApplyInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActApplyInfo.java @@ -20,6 +20,7 @@ public class ActApplyInfo { /** 门店信息 说明:门店信息 */ @SerializedName("store_info") private StoreInfo storeInfo; + /** 商品原价 说明:品牌加价购活动商品的原价,该价格会在加价购小程序插件中展示(单位:分) */ @SerializedName("goods_original_price") private Long goodsOriginalPrice; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActArea.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActArea.java index b5ce20ea..dd4f2e84 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActArea.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActArea.java @@ -20,9 +20,11 @@ public class ActArea { /** 省名称 说明:省名称 */ @SerializedName("province") private String province; + /** 市名称 说明:市名称 */ @SerializedName("city") private String city; + /** 区名称 说明:区名称 */ @SerializedName("district") private String district; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActInfo.java index b7ed8821..eafb8c59 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActInfo.java @@ -20,6 +20,7 @@ public class ActInfo { /** 活动名称 说明:活动名称 */ @SerializedName("activity_name") private String activityName; + /** * 活动报名开始时间 * 说明:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -27,6 +28,7 @@ public class ActInfo { */ @SerializedName("apply_start_time") private String applyStartTime; + /** * 活动报名结束时间 * 说明:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -34,6 +36,7 @@ public class ActInfo { */ @SerializedName("apply_end_time") private String applyEndTime; + /** * 活动开始时间 * 说明:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -41,6 +44,7 @@ public class ActInfo { */ @SerializedName("activity_start_time") private String activityStartTime; + /** * 活动结束时间 * 说明:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -48,6 +52,7 @@ public class ActInfo { */ @SerializedName("activity_end_time") private String activityEndTime; + /** 活动描述 说明:活动描述 */ @SerializedName("activity_description") private String activityDescription; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActRule.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActRule.java index 8506a759..1db2f1d1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActRule.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ActRule.java @@ -21,15 +21,19 @@ public class ActRule { /** 购买单件商品,补贴给门店的金额 说明:购买单件商品,补贴给门店的金额(单位:分) */ @SerializedName("store_subsidy") private Long storeSubsidy; + /** 购买单件商品,补贴给服务商的佣金 说明:购买单件商品,补贴给服务商的佣金(单位:分) */ @SerializedName("service_provider_subsidy") private Long serviceProviderSubsidy; + /** 活动门店补贴商品数上限 说明:活动门店补贴商品数上限 */ @SerializedName("store_subsidy_quota") private Integer storeSubsidyQuota; + /** 单用户享受加价购优惠次数上限 说明:单用户享受加价购优惠次数上限 */ @SerializedName("user_subsidy_quota") private Integer userSubsidyQuota; + /** 活动区域列表 说明:活动区域列表 */ @SerializedName("areas") private List areas; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativeRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativeRequest.java index f382e8dc..013e79d1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativeRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativeRequest.java @@ -24,12 +24,15 @@ public class AddRepresentativeRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 业务代理信息列表 说明:业务代理信息列表 */ @SerializedName("representative_info_list") private List representativeInfoList = new ArrayList(); + /** 请求业务单据号 说明:商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 添加时间 说明:添加时间 */ @SerializedName("add_time") private String addTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesRequest.java index 048e75dc..2223e2fe 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesRequest.java @@ -22,9 +22,11 @@ public class AddRepresentativesRequest { /** 业务代理信息列表 说明:业务代理信息列表 */ @SerializedName("representative_info_list") private List representativeInfoList = new ArrayList(); + /** 请求业务单据号 说明:商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 添加时间 说明:添加时间 */ @SerializedName("add_time") private String addTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesResponse.java index a177e0b3..e4bd2138 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddRepresentativesResponse.java @@ -21,9 +21,11 @@ public class AddRepresentativesResponse { /** 零售小店活动ID 说明:零售小店活动ID */ @SerializedName("activity_id") private String activityId; + /** 添加失败业务代理信息列表 说明:添加失败业务代理信息列表 */ @SerializedName("failed_representative_info_list") private List failedRepresentativeInfoList; + /** 添加时间 说明:添加时间 */ @SerializedName("add_time") private String addTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresBody.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresBody.java index 69308409..7ba315dd 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresBody.java @@ -22,6 +22,7 @@ public class AddStoresBody { /** 请求业务单据 说明:商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 添加时间 * 说明:添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 @@ -29,6 +30,7 @@ public class AddStoresBody { */ @SerializedName("add_time") private String addTime; + /** 待新增的小店活动门店列表 说明:待新增的小店活动门店列表 */ @SerializedName("stores") private List stores = new ArrayList(); diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresRequest.java index 7b9f4609..4009d268 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresRequest.java @@ -24,9 +24,11 @@ public class AddStoresRequest { @SerializedName("brand_id") @Expose(serialize = false) private String brandId; + /** 请求业务单据 说明:商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 添加时间 * 说明:添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 @@ -34,6 +36,7 @@ public class AddStoresRequest { */ @SerializedName("add_time") private String addTime; + /** 待新增的小店活动门店列表 说明:待新增的小店活动门店列表 */ @SerializedName("stores") private List stores = new ArrayList(); diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresResponse.java index 8fcc0e2a..5211f7ae 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/AddStoresResponse.java @@ -25,6 +25,7 @@ public class AddStoresResponse { */ @SerializedName("add_time") private String addTime; + /** 添加失败的小店活动门店列表 说明:添加失败的小店活动门店列表 */ @SerializedName("failed_stores") private List failedStores; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityBody.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityBody.java index 2c0b4ea8..66179c84 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityBody.java @@ -21,6 +21,7 @@ public class ApplyActivityBody { /** 调用报名活动API的商户的商户号 说明:调用报名活动API的商户的商户号 */ @SerializedName("caller_merchant_id") private String callerMerchantId; + /** 门店报名信息 说明:门店报名信息 */ @SerializedName("apply_infos") private List applyInfos; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityRequest.java index b22e98fb..9147685d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityRequest.java @@ -23,9 +23,11 @@ public class ApplyActivityRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 调用报名活动API的商户的商户号 说明:调用报名活动API的商户的商户号 */ @SerializedName("caller_merchant_id") private String callerMerchantId; + /** 门店报名信息 说明:门店报名信息 */ @SerializedName("apply_infos") private List applyInfos; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityResponse.java index e3975597..7f450247 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ApplyActivityResponse.java @@ -21,9 +21,11 @@ public class ApplyActivityResponse { /** 返回结果文案 说明:返回结果文案 */ @SerializedName("return_message") private String returnMessage; + /** 失败的报名记录 说明:失败的报名记录 */ @SerializedName("failed_apply_infos") private List failedApplyInfos; + /** 成功的报名记录 说明:成功的报名记录 */ @SerializedName("succeed_apply_infos") private List succeedApplyInfos; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsBody.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsBody.java index 8a742431..cf68d303 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsBody.java @@ -20,6 +20,7 @@ public class CreateMaterialsBody { /** 请求业务单据 说明:商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 生成物料码数量 说明:生成物料码数量 */ @SerializedName("material_num") private Long materialNum; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsRequest.java index e17b1d25..c73c57f5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/CreateMaterialsRequest.java @@ -22,9 +22,11 @@ public class CreateMaterialsRequest { @SerializedName("brand_id") @Expose(serialize = false) private String brandId; + /** 请求业务单据 说明:商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 生成物料码数量 说明:生成物料码数量 */ @SerializedName("material_num") private Long materialNum; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeBody.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeBody.java index a3cb57a9..abccb4ae 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeBody.java @@ -22,9 +22,11 @@ public class DeleteRepresentativeBody { /** 业务代理信息列表 说明:业务代理信息列表 */ @SerializedName("representative_info_list") private List representativeInfoList = new ArrayList(); + /** 请求业务单据号 说明:商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 删除时间 说明:删除时间 */ @SerializedName("delete_time") private String deleteTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeRequest.java index a95174f6..9d4ba717 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeRequest.java @@ -24,12 +24,15 @@ public class DeleteRepresentativeRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 业务代理信息列表 说明:业务代理信息列表 */ @SerializedName("representative_info_list") private List representativeInfoList = new ArrayList(); + /** 请求业务单据号 说明:商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** 删除时间 说明:删除时间 */ @SerializedName("delete_time") private String deleteTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeResponse.java index f9a82122..66f90a66 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteRepresentativeResponse.java @@ -21,9 +21,11 @@ public class DeleteRepresentativeResponse { /** 零售小店活动ID 说明:零售小店活动ID */ @SerializedName("activity_id") private String activityId; + /** 删除失败业务代理信息列表 说明:删除失败业务代理信息列表 */ @SerializedName("failed_representative_info_list") private List failedRepresentativeInfoList; + /** 删除时间 说明:删除时间 */ @SerializedName("delete_time") private String deleteTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresBody.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresBody.java index b1a1d11a..1b77616b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresBody.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresBody.java @@ -22,6 +22,7 @@ public class DeleteStoresBody { /** 请求业务单据 说明:商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 删除时间 * 说明:删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 @@ -29,6 +30,7 @@ public class DeleteStoresBody { */ @SerializedName("delete_time") private String deleteTime; + /** 待删除的小店活动门店列表 说明:待删除的小店活动门店列表 */ @SerializedName("stores") private List stores = new ArrayList(); diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresRequest.java index ae00ef00..60c0fd92 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresRequest.java @@ -24,9 +24,11 @@ public class DeleteStoresRequest { @SerializedName("brand_id") @Expose(serialize = false) private String brandId; + /** 请求业务单据 说明:商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("out_request_no") private String outRequestNo; + /** * 删除时间 * 说明:删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 @@ -34,6 +36,7 @@ public class DeleteStoresRequest { */ @SerializedName("delete_time") private String deleteTime; + /** 待删除的小店活动门店列表 说明:待删除的小店活动门店列表 */ @SerializedName("stores") private List stores = new ArrayList(); diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresResponse.java index 95ee6c3b..527dc9b2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/DeleteStoresResponse.java @@ -25,6 +25,7 @@ public class DeleteStoresResponse { */ @SerializedName("delete_time") private String deleteTime; + /** 删除失败的小店活动门店列表 说明:删除失败的小店活动门店列表 */ @SerializedName("failed_stores") private List failedStores; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/FmcgAct.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/FmcgAct.java index 84340473..544cc040 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/FmcgAct.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/FmcgAct.java @@ -20,18 +20,23 @@ public class FmcgAct { /** 活动ID 说明:活动ID */ @SerializedName("activity_id") private String activityId; + /** 品牌ID 说明:品牌ID */ @SerializedName("brand_id") private String brandId; + /** 活动创建方商户号 说明:活动创建方商户号 */ @SerializedName("creator_merchant_id") private String creatorMerchantId; + /** 活动信息 说明:活动信息 */ @SerializedName("activity_info") private ActInfo activityInfo; + /** 活动商品信息 说明:活动商品列表 */ @SerializedName("goods_information") private GoodsInfo goodsInformation; + /** 活动规则 说明:活动规则 */ @SerializedName("rule_information") private ActRule ruleInformation; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GetStoreRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GetStoreRequest.java index 1ce6081f..9d25dcf3 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GetStoreRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GetStoreRequest.java @@ -22,6 +22,7 @@ public class GetStoreRequest { @SerializedName("brand_id") @Expose(serialize = false) private String brandId; + /** 门店编码 说明:门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("store_code") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GoodsInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GoodsInfo.java index 23d25915..396350f8 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GoodsInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/GoodsInfo.java @@ -20,9 +20,11 @@ public class GoodsInfo { /** 商品ID 说明:商品ID */ @SerializedName("goods_id") private String goodsId; + /** 商品名称 说明:商品名称 */ @SerializedName("goods_name") private String goodsName; + /** 商品图片URL 说明:商品图片URL */ @SerializedName("goods_picture_url") private String goodsPictureUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaRequest.java index 68c05864..d453431c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaRequest.java @@ -22,10 +22,12 @@ public class ListActsByAreaRequest { @SerializedName("city_id") @Expose(serialize = false) private String cityId; + /** 分页页码 说明:非负整数,该次请求资源的起始位置,从0开始计数 */ @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 最大返回的活动数 说明:非0非负的整数 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaResponse.java index 63879398..aebb2623 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListActsByAreaResponse.java @@ -21,12 +21,15 @@ public class ListActsByAreaResponse { /** 活动总数 说明:活动总数 */ @SerializedName("total_count") private Integer totalCount; + /** 活动集合 说明:活动集合 */ @SerializedName("data") private List data; + /** 分页页码 说明:非负整数,该次请求资源的起始位置,从0开始计数 */ @SerializedName("offset") private Integer offset; + /** 返回的活动数 说明:非0非负的整数 */ @SerializedName("limit") private Integer limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeRequest.java index 897b0c17..d86c375a 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeRequest.java @@ -22,10 +22,12 @@ public class ListRepresentativeRequest { @SerializedName("activity_id") @Expose(serialize = false) private String activityId; + /** 分页页码 说明:页码从0开始,默认第0页 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:分页大小,默认查询10个业代 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeResponse.java index 35f5be56..cce8b129 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListRepresentativeResponse.java @@ -21,12 +21,15 @@ public class ListRepresentativeResponse { /** 小店活动业代总数 说明:小店活动业代总数 */ @SerializedName("total_count") private Long totalCount; + /** 小店活动业代集合 说明:小店活动业代集合 */ @SerializedName("data") private List data; + /** 分页页码 说明:页码从0开始,默认第0页 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreRequest.java index 33ce8822..530c289e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreRequest.java @@ -22,10 +22,12 @@ public class ListStoreRequest { @SerializedName("brand_id") @Expose(serialize = false) private String brandId; + /** 分页页码 说明:页码从0开始,默认第0页 */ @SerializedName("offset") @Expose(serialize = false) private Long offset; + /** 分页大小 说明:分页大小,默认查询10家门店 */ @SerializedName("limit") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreResponse.java index a3bb459a..a556c3f4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/ListStoreResponse.java @@ -21,12 +21,15 @@ public class ListStoreResponse { /** 小店活动门店总数 说明:小店活动门店总数 */ @SerializedName("total_count") private Long totalCount; + /** 小店活动门店集合 说明:小店活动门店集合 */ @SerializedName("data") private List data; + /** 分页页码 说明:页码从0开始,默认第0页 */ @SerializedName("offset") private Long offset; + /** 分页大小 说明:分页大小 */ @SerializedName("limit") private Long limit; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationRequest.java index 01c47305..929e19f6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationRequest.java @@ -21,6 +21,7 @@ public class LockQualificationRequest { /** 订单信息 说明:订单信息 */ @SerializedName("order_information") private OrderInfo orderInformation; + /** 待锁定的加价购资格ID列表 说明:待锁定的加价购资格ID列表 */ @SerializedName("qualification_ids") private List qualificationIds; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationResponse.java index 53fcd420..488215f4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/LockQualificationResponse.java @@ -21,9 +21,11 @@ public class LockQualificationResponse { /** 返回结果文案 说明:返回结果文案 */ @SerializedName("return_message") private String returnMessage; + /** 锁定成功的资格ID列表 说明:锁定成功的资格ID列表 */ @SerializedName("succeed_qualification_ids") private List succeedQualificationIds; + /** 锁定失败的资格ID列表 说明:锁定失败的资格ID列表 */ @SerializedName("failed_qualification_ids") private List failedQualificationIds; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/MaterialInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/MaterialInfo.java index 63939b49..301d0f71 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/MaterialInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/MaterialInfo.java @@ -20,6 +20,7 @@ public class MaterialInfo { /** 物料码ID 说明:物料码ID */ @SerializedName("material_id") private String materialId; + /** 物料码链接 说明:物料码链接, 用于生成活动物料二维码 */ @SerializedName("material_url") private String materialUrl; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/OrderInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/OrderInfo.java index d5d7153a..39675deb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/OrderInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/OrderInfo.java @@ -20,15 +20,19 @@ public class OrderInfo { /** 支付订单的微信用户OpenID 说明:支付订单的微信用户OpenID */ @SerializedName("payer_openid") private String payerOpenid; + /** 商户订单号 说明:商户订单号 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 订单总金额 说明:订单总金额(单位:分) */ @SerializedName("total_fee") private Long totalFee; + /** 门店ID 说明:门店ID */ @SerializedName("store_id") private String storeId; + /** 门店商户号 说明:门店商户号 */ @SerializedName("store_merchant_id") private String storeMerchantId; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/RetailStoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/RetailStoreInfo.java index c9085a1b..777e3895 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/RetailStoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/RetailStoreInfo.java @@ -20,6 +20,7 @@ public class RetailStoreInfo { /** 门店编码 说明:门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 */ @SerializedName("store_code") private String storeCode; + /** 门店名称 说明:门店名称 */ @SerializedName("store_name") private String storeName; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/StoreInfo.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/StoreInfo.java index 1427d501..08bc5da4 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/StoreInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/StoreInfo.java @@ -20,9 +20,11 @@ public class StoreInfo { /** 门店ID 说明:门店ID */ @SerializedName("store_id") private String storeId; + /** 门店补贴入账商户号 说明:门店指定的品牌补贴收款商户号 */ @SerializedName("accounting_merchant_id") private String accountingMerchantId; + /** 门店商户号 说明:报名门店的商户号,即门店收款商户号 */ @SerializedName("merchant_id") private String merchantId; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationRequest.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationRequest.java index d67a5d24..a8bd7829 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationRequest.java @@ -21,6 +21,7 @@ public class UnlockQualificationRequest { /** 订单信息 说明:订单信息 */ @SerializedName("order_information") private OrderInfo orderInformation; + /** 待锁定的加价购资格ID列表 说明:待锁定的加价购资格ID列表 */ @SerializedName("qualification_ids") private List qualificationIds; diff --git a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationResponse.java b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationResponse.java index ecfe7413..da18b44c 100644 --- a/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/retailstore/model/UnlockQualificationResponse.java @@ -21,9 +21,11 @@ public class UnlockQualificationResponse { /** 返回结果文案 说明:返回结果文案 */ @SerializedName("return_message") private String returnMessage; + /** 解锁成功的资格ID列表 说明:解锁成功的资格列表 */ @SerializedName("succeed_qualification_ids") private List succeedQualificationIds; + /** 解锁失败的资格ID列表 说明:解锁失败的资格ID列表 */ @SerializedName("failed_qualification_ids") private List failedQualificationIds; diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/TransferBatchService.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/TransferBatchService.java index 3ea1af52..a0221fc7 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/TransferBatchService.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/TransferBatchService.java @@ -62,6 +62,7 @@ private TransferBatchService( this.encryptor = requireNonNull(encryptor); this.decryptor = requireNonNull(decryptor); } + /** TransferBatchService构造器 */ public static class Builder { @@ -151,6 +152,7 @@ public TransferBatchEntity getTransferBatchByNo(GetTransferBatchByNoRequest requ httpClient.execute(httpRequest, TransferBatchEntity.class); return httpResponse.getServiceResponse(); } + /** * 通过商家批次单号查询批次单 * @@ -202,6 +204,7 @@ public TransferBatchEntity getTransferBatchByOutNo(GetTransferBatchByOutNoReques httpClient.execute(httpRequest, TransferBatchEntity.class); return httpResponse.getServiceResponse(); } + /** * 发起商家转账 * @@ -234,6 +237,7 @@ public InitiateBatchTransferResponse initiateBatchTransfer(InitiateBatchTransfer httpClient.execute(httpRequest, InitiateBatchTransferResponse.class); return httpResponse.getServiceResponse(); } + /** * 通过微信明细单号查询明细单 * @@ -271,6 +275,7 @@ public TransferDetailEntity getTransferDetailByNo(GetTransferDetailByNoRequest r httpClient.execute(httpRequest, TransferDetailEntity.class); return httpResponse.getServiceResponse().cloneWithCipher(decryptor::decrypt); } + /** * 通过商家明细单号查询明细单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByNoRequest.java index f01b5c4e..5d39c7cb 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByNoRequest.java @@ -23,20 +23,24 @@ public class GetTransferBatchByNoRequest { @SerializedName("batch_id") @Expose(serialize = false) private String batchId; + /** * 是否查询转账明细单 说明:true-是;false-否,默认否。商户可选择是否查询指定状态的转账明细单,当转账批次单状态为“FINISHED”(已完成)时,才会返回满足条件的转账明细单 */ @SerializedName("need_query_detail") @Expose(serialize = false) private Boolean needQueryDetail; + /** 请求资源起始位置 说明:该次请求资源的起始位置。返回的明细是按照设置的明细条数进行分页展示的,一次查询可能无法返回所有明细,我们使用该参数标识查询开始位置,默认值为0 */ @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 最大资源条数 说明:该次请求可返回的最大明细条数,最小20条,最大100条,不传则默认20条。不足20条按实际条数返回 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** * 明细状态 说明:WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 ALL:全部。需要同时查询转账成功、失败和待确认的明细单 SUCCESS:转账成功 * FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByOutNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByOutNoRequest.java index de5a2fe8..f281bca1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByOutNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferBatchByOutNoRequest.java @@ -23,20 +23,24 @@ public class GetTransferBatchByOutNoRequest { @SerializedName("out_batch_no") @Expose(serialize = false) private String outBatchNo; + /** * 是否查询转账明细单 说明:true-是;false-否,默认否。商户可选择是否查询指定状态的转账明细单,当转账批次单状态为“FINISHED”(已完成)时,才会返回满足条件的转账明细单 */ @SerializedName("need_query_detail") @Expose(serialize = false) private Boolean needQueryDetail; + /** 请求资源起始位置 说明:该次请求资源(转账明细单)的起始位置,从0开始,默认值为0 */ @SerializedName("offset") @Expose(serialize = false) private Integer offset; + /** 最大资源条数 说明:该次请求可返回的最大资源(转账明细单)条数,最小20条,最大100条,不传则默认20条。不足20条按实际条数返回 */ @SerializedName("limit") @Expose(serialize = false) private Integer limit; + /** * 明细状态 说明:WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 ALL:全部。需要同时查询转账成功、失败和待确认的明细单 SUCCESS:转账成功 * FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByNoRequest.java index f7d299c2..94b9a234 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByNoRequest.java @@ -23,6 +23,7 @@ public class GetTransferDetailByNoRequest { @SerializedName("batch_id") @Expose(serialize = false) private String batchId; + /** 微信明细单号 说明:微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("detail_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByOutNoRequest.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByOutNoRequest.java index bf2f67a6..4b160812 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByOutNoRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/GetTransferDetailByOutNoRequest.java @@ -23,6 +23,7 @@ public class GetTransferDetailByOutNoRequest { @SerializedName("out_detail_no") @Expose(serialize = false) private String outDetailNo; + /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferRequest.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferRequest.java index d559daf2..c5b451b2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferRequest.java @@ -25,25 +25,32 @@ public class InitiateBatchTransferRequest { /** 商户appid 说明:申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) */ @SerializedName("appid") private String appid; + /** 商家批次单号 说明:商户系统内部的商家批次单号,要求此参数只能由数字、大小写字母组成,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 批次名称 说明:该笔批量转账的名称 */ @SerializedName("batch_name") private String batchName; + /** 批次备注 说明:转账说明,UTF8编码,最多允许32个字符 */ @SerializedName("batch_remark") private String batchRemark; + /** 转账总金额 说明:转账金额单位为“分”。转账总金额必须与批次内所有明细转账金额之和保持一致,否则无法发起转账操作 */ @SerializedName("total_amount") private Long totalAmount; + /** 转账总笔数 说明:一个转账批次单最多发起一千笔转账。转账总笔数必须与批次内所有明细之和保持一致,否则无法发起转账操作 */ @SerializedName("total_num") private Integer totalNum; + /** 转账明细列表 说明:发起批量转账的明细列表,最多一千笔 */ @Encryption @SerializedName("transfer_detail_list") private List transferDetailList = new ArrayList(); + /** 转账场景ID 说明:该批次转账使用的转账场景,如不填写则使用商家的默认场景,如无默认场景可为空,可前往“商家转账到零钱-前往功能”中申请。 如:1001-现金营销 */ @SerializedName("transfer_scene_id") private String transferSceneId; diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferResponse.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferResponse.java index 90cda9e2..113651f9 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferResponse.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/InitiateBatchTransferResponse.java @@ -21,12 +21,15 @@ public class InitiateBatchTransferResponse { /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 微信批次单号 说明:微信批次单号,微信商家转账系统返回的唯一标识 */ @SerializedName("batch_id") private String batchId; + /** 批次创建时间 说明:批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("create_time") private String createTime; + /** * 批次状态 * 说明:ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchEntity.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchEntity.java index bcd4e7b8..6539e529 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchEntity.java @@ -22,6 +22,7 @@ public class TransferBatchEntity { /** 转账批次单 说明:转账批次单基本信息 */ @SerializedName("transfer_batch") private TransferBatchGet transferBatch; + /** 转账明细单列表 说明:当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回。包括微信明细单号、明细状态信息 */ @SerializedName("transfer_detail_list") private List transferDetailList; diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchGet.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchGet.java index a6b2b7d5..8fea1177 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchGet.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferBatchGet.java @@ -21,15 +21,19 @@ public class TransferBatchGet { /** 商户号 说明:微信支付分配的商户号 */ @SerializedName("mchid") private String mchid; + /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 微信批次单号 说明:微信批次单号,微信商家转账系统返回的唯一标识 */ @SerializedName("batch_id") private String batchId; + /** 商户appid 说明:申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) */ @SerializedName("appid") private String appid; + /** * 批次状态 说明:WAIT_PAY: 待付款确认。需要付款出资商户在商家助手小程序或服务商助手小程序进行付款确认 * ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 @@ -37,42 +41,55 @@ public class TransferBatchGet { */ @SerializedName("batch_status") private String batchStatus; + /** 批次类型 说明:API:API方式发起 WEB:页面方式发起 */ @SerializedName("batch_type") private String batchType; + /** 批次名称 说明:该笔批量转账的名称 */ @SerializedName("batch_name") private String batchName; + /** 批次备注 说明:转账说明,UTF8编码,最多允许32个字符 */ @SerializedName("batch_remark") private String batchRemark; + /** 批次关闭原因 说明:如果批次单状态为“CLOSED”(已关闭),则有关闭原因 */ @SerializedName("close_reason") private CloseReasonType closeReason; + /** 转账总金额 说明:转账金额单位为“分” */ @SerializedName("total_amount") private Long totalAmount; + /** 转账总笔数 说明:一个转账批次单最多发起三千笔转账 */ @SerializedName("total_num") private Integer totalNum; + /** 批次创建时间 说明:批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("create_time") private String createTime; + /** 批次更新时间 说明:批次最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("update_time") private String updateTime; + /** 转账成功金额 说明:转账成功的金额,单位为“分”。当批次状态为“PROCESSING”(转账中)时,转账成功金额随时可能变化 */ @SerializedName("success_amount") private Long successAmount; + /** 转账成功笔数 说明:转账成功的笔数。当批次状态为“PROCESSING”(转账中)时,转账成功笔数随时可能变化 */ @SerializedName("success_num") private Integer successNum; + /** 转账失败金额 说明:转账失败的金额,单位为“分” */ @SerializedName("fail_amount") private Long failAmount; + /** 转账失败笔数 说明:转账失败的笔数 */ @SerializedName("fail_num") private Integer failNum; + /** 转账场景ID 说明:指定的转账场景ID */ @SerializedName("transfer_scene_id") private String transferSceneId; diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailCompact.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailCompact.java index 07ee7c04..8d311633 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailCompact.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailCompact.java @@ -21,9 +21,11 @@ public class TransferDetailCompact { /** 微信明细单号 说明:微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("detail_id") private String detailId; + /** 商家明细单号 说明:商户系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("out_detail_no") private String outDetailNo; + /** * 明细状态 说明:INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 * PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailEntity.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailEntity.java index 9efb4afc..83bc387e 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailEntity.java @@ -23,46 +23,59 @@ public class TransferDetailEntity { /** 商户号 说明:微信支付分配的商户号 */ @SerializedName("mchid") private String mchid; + /** 商家批次单号 说明:商户系统内部的商家批次单号,在商户系统内部唯一 */ @SerializedName("out_batch_no") private String outBatchNo; + /** 微信批次单号 说明:微信批次单号,微信商家转账系统返回的唯一标识 */ @SerializedName("batch_id") private String batchId; + /** 商户appid 说明:申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) */ @SerializedName("appid") private String appid; + /** 商家明细单号 说明:商户系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("out_detail_no") private String outDetailNo; + /** 微信明细单号 说明:微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 */ @SerializedName("detail_id") private String detailId; + /** * 明细状态 说明:INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 * PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) */ @SerializedName("detail_status") private String detailStatus; + /** 转账金额 说明:转账金额单位为“分” */ @SerializedName("transfer_amount") private Long transferAmount; + /** 转账备注 说明:单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符 */ @SerializedName("transfer_remark") private String transferRemark; + /** 明细失败原因 说明:如果转账失败则有失败原因 */ @SerializedName("fail_reason") private FailReasonType failReason; + /** 收款用户openid 说明:商户appid下,某用户的openid */ @SerializedName("openid") private String openid; + /** 收款用户姓名 说明:收款方姓名。采用标准RSA算法,公钥由微信侧提供 商户转账时传入了收款用户姓名、查询时会返回收款用户姓名 */ @Encryption @SerializedName("user_name") private String userName; + /** 转账发起时间 说明:转账发起的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("initiate_time") private String initiateTime; + /** 明细更新时间 说明:明细最后一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("update_time") private String updateTime; diff --git a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailInput.java b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailInput.java index 5ab56a73..0acbce89 100644 --- a/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailInput.java +++ b/service/src/main/java/com/wechat/pay/java/service/transferbatch/model/TransferDetailInput.java @@ -23,15 +23,19 @@ public class TransferDetailInput { /** 商家明细单号 说明:商户系统内部区分转账批次单下不同转账明细单的唯一标识,要求此参数只能由数字、大小写字母组成 */ @SerializedName("out_detail_no") private String outDetailNo; + /** 转账金额 说明:转账金额单位为“分” */ @SerializedName("transfer_amount") private Long transferAmount; + /** 转账备注 说明:单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符 */ @SerializedName("transfer_remark") private String transferRemark; + /** 收款用户openid 说明:商户appid下,某用户的openid */ @SerializedName("openid") private String openid; + /** * 收款用户姓名 说明:收款方真实姓名。支持标准RSA算法和国密算法,公钥由微信侧提供 明细转账金额<0.3元时,不允许填写收款用户姓名 明细转账金额 >= * 2,000元时,该笔明细必须填写收款用户姓名 同一批次转账明细中的姓名字段传入规则需保持一致,也即全部填写、或全部不填写 diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideService.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideService.java index d7c00a9c..ab54d836 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideService.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/WeixinPayScanAndRideService.java @@ -48,6 +48,7 @@ private WeixinPayScanAndRideService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** WeixinPayScanAndRideService构造器 */ public static class Builder { @@ -105,6 +106,7 @@ public TransactionsEntity createTransaction(CreateTransactionRequest request) { httpClient.execute(httpRequest, TransactionsEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询订单 * @@ -146,6 +148,7 @@ public TransactionsEntity queryTransaction(QueryTransactionRequest request) { httpClient.execute(httpRequest, TransactionsEntity.class); return httpResponse.getServiceResponse(); } + /** * 查询用户服务可用信息 * diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/BusSceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/BusSceneInfo.java index 40431aab..6c3a8345 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/BusSceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/BusSceneInfo.java @@ -20,9 +20,11 @@ public class BusSceneInfo { /** 乘车时间 说明:用户乘车时间(上车),按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("start_time") private String startTime; + /** 乘车路线 说明:乘车路线 路线名称的展示规则:\\^[A-Za-z0-9]{1,10}路$ 如line_name符合上述的规则,扣款凭证将增加展示乘车路线的字段 */ @SerializedName("line_name") private String lineName; + /** 车牌号 说明:车牌号。仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") private String plateNumber; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/CreateTransactionRequest.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/CreateTransactionRequest.java index 7ac7bde8..169ad401 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/CreateTransactionRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/CreateTransactionRequest.java @@ -20,39 +20,51 @@ public class CreateTransactionRequest { /** 公众账号ID 说明:商户在微信申请公众号或移动应用成功后分配的账号ID,登录平台为mp.weixin.qq.com或open.weixin.qq.com */ @SerializedName("appid") private String appid; + /** 子公众账号ID 说明:子公众账号ID,服务商模式下选传,用于扣费信息的商户信息展示, */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") private String subMchid; + /** 服务描述 说明:商户自定义字段,用于交易账单中对扣费服务的描述。该字段长度限制为字节长度限制 */ @SerializedName("description") private String description; + /** 附加数据 说明:附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用,该字段长度限制为字节长度限制 */ @SerializedName("attach") private String attach; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母,且在同一个商户号下唯一。该字段长度限制为字节长度限制 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易场景 说明:交易场景值,现在支持公交和地铁的场景值 */ @SerializedName("trade_scene") private TradeScene tradeScene; + /** 订单优惠标记 说明:代金券或立减优惠功能的参数,说明详见代金券或立减优惠 */ @SerializedName("goods_tag") private String goodsTag; + /** 代扣签约ID 说明:签约成功后,微信返回代扣签约ID 查用户是否能继续使用乘车卡时必传,此时,才会返回签约信息,如contract_state */ @SerializedName("contract_id") private String contractId; + /** 通知地址 说明:接受扣款结果异步回调通知的URL,注意回调URL只接受HTTPS */ @SerializedName("notify_url") private String notifyUrl; + /** 订单金额信息 说明:订单金额信息 */ @SerializedName("amount") private OrderAmount amount; + /** 公交场景信息 说明:请求受理扣费 tradescene为BUS时,传入该参数 */ @SerializedName("bus_info") private BusSceneInfo busInfo; + /** 地铁场景信息 说明:请求受理扣费 tradescene为METRO时,传入该参数 */ @SerializedName("metro_info") private MetroSceneInfo metroInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/MetroSceneInfo.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/MetroSceneInfo.java index e225c666..371beec1 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/MetroSceneInfo.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/MetroSceneInfo.java @@ -20,12 +20,15 @@ public class MetroSceneInfo { /** 乘车时间 说明:用户乘车时间(上车),按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("start_time") private String startTime; + /** 下车时间 说明:用户下车时间,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("end_time") private String endTime; + /** 起始站 说明:乘车起始站,该值催缴时会向微信用户进行展示 */ @SerializedName("start_station") private String startStation; + /** 终点站 说明:乘车终点站,该值催缴时会向微信用户进行展示 */ @SerializedName("end_station") private String endStation; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/OrderAmount.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/OrderAmount.java index 35677d6d..02f7f43b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/OrderAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/OrderAmount.java @@ -20,6 +20,7 @@ public class OrderAmount { /** 订单金额 说明:订单总金额,单位为分,只能为整数,详见支付金额 */ @SerializedName("total") private Long total; + /** 货币类型 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/PromotionDetail.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/PromotionDetail.java index 7fe739cf..c4089785 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/PromotionDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/PromotionDetail.java @@ -20,30 +20,39 @@ public class PromotionDetail { /** 券ID 说明:券或者立减优惠ID */ @SerializedName("coupon_id") private String couponId; + /** 优惠名称 说明:优惠名称 */ @SerializedName("name") private String name; + /** 优惠范围 说明:GLOBAL-全场代金券,SINGLE-单品优惠 */ @SerializedName("scope") private String scope; + /** 优惠类型 说明:优惠类型,枚举值有: */ @SerializedName("type") private PromotionType type; + /** 活动ID 说明:在微信商户后台配置的批次ID */ @SerializedName("stock_id") private String stockId; + /** 优惠券面额 说明:用户享受优惠的金额 */ @SerializedName("amount") private Long amount; + /** 微信出资 说明:特指由微信支付商户平台创建的优惠,出资金额等于本项优惠总金额,单位为分 */ @SerializedName("wechatpay_contribute") private Long wechatpayContribute; + /** 商户出资 说明:特指商户自己创建的优惠,出资金额等于本项优惠总金额,单位为分 */ @SerializedName("merchant_contribute") private Long merchantContribute; + /** 其他出资 说明:其他出资方出资金额,单位为分 */ @SerializedName("other_contribute") private Long otherContribute; + /** 优惠币种 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryOrderAmount.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryOrderAmount.java index ae2c0823..5b84be71 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryOrderAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryOrderAmount.java @@ -20,9 +20,11 @@ public class QueryOrderAmount { /** 订单金额 说明:订单总金额,单位为分,只能为整数,详见支付金额 */ @SerializedName("total") private Long total; + /** 用户实际支付金额 说明:用户实际支付金额,单位为分,只能为整数,详见支付金额 */ @SerializedName("payer_total") private Long payerTotal; + /** 货币类型 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryTransactionRequest.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryTransactionRequest.java index 4e54c1c2..37df8551 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryTransactionRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryTransactionRequest.java @@ -22,6 +22,7 @@ public class QueryTransactionRequest { @SerializedName("out_trade_no") @Expose(serialize = false) private String outTradeNo; + /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryUserServiceRequest.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryUserServiceRequest.java index 30308975..531a6735 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryUserServiceRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/QueryUserServiceRequest.java @@ -22,14 +22,17 @@ public class QueryUserServiceRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 子公众账号ID 说明:子公众账号ID,服务商模式下选传 */ @SerializedName("sub_appid") @Expose(serialize = false) private String subAppid; + /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 代扣签约ID 说明:签约成功后,微信返回代扣签约ID 查用户是否能继续使用乘车卡时必传 */ @SerializedName("contract_id") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/TransactionsEntity.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/TransactionsEntity.java index ca5c9195..30662f18 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/TransactionsEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/TransactionsEntity.java @@ -21,36 +21,47 @@ public class TransactionsEntity { /** 公众账号ID 说明:商户在微信申请公众号或移动应用成功后分配的账号ID,登录平台为mp.weixin.qq.com或open.weixin.qq.com */ @SerializedName("appid") private String appid; + /** 子商户公众账号ID 说明:子商户申请的公众号或移动应用AppID,需要在服务商的商户平台为子商户绑定 */ @SerializedName("sub_appid") private String subAppid; + /** 商户号 说明:微信支付分配的商户号 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:微信支付分配的子商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 服务描述 说明:商户自定义字段,用于交易账单中对扣费服务的描述。 */ @SerializedName("description") private String description; + /** 订单创建时间 说明:订单成功创建时返回,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("create_time") private String createTime; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母,且在同一个商户号下唯一 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 微信支付订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 交易状态 说明:交易状态,枚举值: */ @SerializedName("trade_state") private TradeState tradeState; + /** 交易状态描述 说明:对当前订单状态的描述和下一步操作的指引 */ @SerializedName("trade_state_description") private String tradeStateDescription; + /** 支付完成时间 说明:订单支付完成时间,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("success_time") private String successTime; + /** * 付款银行 说明:银行类型,采用字符串类型的银行标识,详细可参考 * 微信支付银行类型标识(https://pay.weixin.qq.com/wiki/doc/apiv3/terms_definition/chapter1_1_3.shtml)。 特殊标识 @@ -58,38 +69,48 @@ public class TransactionsEntity { */ @SerializedName("bank_type") private String bankType; + /** * 用户还款状态 说明:该字段标识对应的垫资单是否已还款或者已撤销。注意,使用此字段前需先确认bank_type字段值为BPA 以及 * trade_state字段值为SUCCESS或者REFUND。枚举值如下: */ @SerializedName("user_repay_state") private UserRepayState userRepayState; + /** 还款微信支付订单号 说明:用户还款成功的微信支付订单号。用户已还款会返回该字段。 */ @SerializedName("repay_transaction_id") private String repayTransactionId; + /** * 垫资还款时间 说明:垫资还款时间,该笔订单发生过垫资,并且用户还款成功后,会返回该字段信息,按照使用rfc3339所定义的格式,格式为yyyy-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("repay_time") private String repayTime; + /** 附加数据 说明:附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 */ @SerializedName("attach") private String attach; + /** 代扣签约ID 说明:签约成功后,微信返回的代扣签约ID */ @SerializedName("contract_id") private String contractId; + /** 交易场景 说明:交易场景值,枚举值: */ @SerializedName("trade_scene") private TradeScene tradeScene; + /** 公交场景信息 说明:返回信息中的trade_scene为BUS,返回该场景信息 */ @SerializedName("bus_info") private BusSceneInfo busInfo; + /** 地铁场景信息 说明:返回信息中的trade_scene为METRO,返回该场景信息 */ @SerializedName("metro_info") private MetroSceneInfo metroInfo; + /** 订单金额信息 说明:订单金额信息 */ @SerializedName("amount") private QueryOrderAmount amount; + /** 优惠信息 说明:优惠信息 */ @SerializedName("promotion_detail") private List promotionDetail; diff --git a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/UserServiceEntity.java b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/UserServiceEntity.java index 522b0af9..37890692 100644 --- a/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/UserServiceEntity.java +++ b/service/src/main/java/com/wechat/pay/java/service/weixinpayscanandride/model/UserServiceEntity.java @@ -20,9 +20,11 @@ public class UserServiceEntity { /** 代扣签约ID 说明:签约成功后,微信返回代扣签约ID */ @SerializedName("contract_id") private String contractId; + /** 用户服务可用状态 说明:用户服务可用状态,枚举值有: */ @SerializedName("user_service_state") private UserServiceStateEnum userServiceState; + /** 不可用状态描述 说明:blocked服务状态描述,返回用户状态为BLOCKED,会返回该字段,具体描述的枚举值如下: */ @SerializedName("block_reason") private BlockReasonEnum blockReason; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingService.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingService.java index 0d765024..54917dac 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingService.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/WexinPayScoreParkingService.java @@ -50,6 +50,7 @@ private WexinPayScoreParkingService(HttpClient httpClient, HostName hostName) { this.httpClient = requireNonNull(httpClient); this.hostName = hostName; } + /** WexinPayScoreParkingService构造器 */ public static class Builder { @@ -106,6 +107,7 @@ public Parking createParking(CreateParkingRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Parking.class); return httpResponse.getServiceResponse(); } + /** * 查询车牌服务开通信息 * @@ -153,6 +155,7 @@ public PlateService queryPlateService(QueryPlateServiceRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, PlateService.class); return httpResponse.getServiceResponse(); } + /** * 扣费受理 * @@ -182,6 +185,7 @@ public Transaction createTransaction(CreateTransactionRequest request) { HttpResponse httpResponse = httpClient.execute(httpRequest, Transaction.class); return httpResponse.getServiceResponse(); } + /** * 查询订单 * diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateParkingRequest.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateParkingRequest.java index f0bca940..37388992 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateParkingRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateParkingRequest.java @@ -20,18 +20,23 @@ public class CreateParkingRequest { /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") private String subMchid; + /** 商户入场id 说明:商户侧入场标识id,在同一个商户号下唯一 */ @SerializedName("out_parking_no") private String outParkingNo; + /** 车牌号 说明:车牌号,仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") private String plateNumber; + /** 车牌颜色 说明:车牌颜色 */ @SerializedName("plate_color") private PlateColor plateColor; + /** 回调通知url 说明:接受入场状态变更回调通知的url,注意回调url只接受https */ @SerializedName("notify_url") private String notifyUrl; + /** * 入场时间 * 说明:入场时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -39,9 +44,11 @@ public class CreateParkingRequest { */ @SerializedName("start_time") private String startTime; + /** 停车场名称 说明:所在停车位车场的名称 */ @SerializedName("parking_name") private String parkingName; + /** 免费时长 说明:停车场的免费停车时长,单位为秒 */ @SerializedName("free_duration") private Integer freeDuration; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateTransactionRequest.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateTransactionRequest.java index 34c62047..88ec5c47 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateTransactionRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/CreateTransactionRequest.java @@ -20,42 +20,53 @@ public class CreateTransactionRequest { /** 公众账号id 说明:appid是商户在微信申请公众号或移动应用成功后分配的帐号ID,登录平台为mp.weixin.qq.com或open.weixin.qq.com */ @SerializedName("appid") private String appid; + /** 子公众账号id 说明:子公众账号id,服务商模式下选传,用于扣费信息的商户信息展示, */ @SerializedName("sub_appid") private String subAppid; + /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") private String subMchid; + /** 服务描述 说明:商户自定义字段,用于交易账单中对扣费服务的描述。 */ @SerializedName("description") private String description; + /** 附加数据 说明:附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 */ @SerializedName("attach") private String attach; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 交易场景 说明:交易场景值,目前支持 :PARKING:车场停车场景 */ @SerializedName("trade_scene") private String tradeScene; + /** * 订单优惠标记 * 说明:代金券或立减优惠功能的参数,说明详见[代金券或立减优惠](https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter5_1_2.shtml) */ @SerializedName("goods_tag") private String goodsTag; + /** 回调通知url 说明:接受扣款结果异步回调通知的url,注意回调url只接受https */ @SerializedName("notify_url") private String notifyUrl; + /** * 分账标识 说明:Y:是,需要分账 N:否,不分账 * 字母要求大写,不传默认不分账,分账详细说明见[直连分账API](https://pay.weixin.qq.com/wiki/doc/api/allocation.php?chapter=26_1)、[服务商分账API文档](https://pay.weixin.qq.com/wiki/doc/api/allocation_sl.php?chapter=24_1&index=1) */ @SerializedName("profit_sharing") private String profitSharing; + /** 订单金额 说明:订单金额信息 */ @SerializedName("amount") private OrderAmount amount; + /** 停车场景信息 说明:当交易场景为PARKING时,需要在该字段添加停车场景信息 */ @SerializedName("parking_info") private ParkingTradeScene parkingInfo; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/OrderAmount.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/OrderAmount.java index dc3364d0..2e0def72 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/OrderAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/OrderAmount.java @@ -20,6 +20,7 @@ public class OrderAmount { /** 订单金额 说明:订单总金额,单位为分,只能为整数 */ @SerializedName("total") private Long total; + /** 货币类型 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Parking.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Parking.java index ee2d2a2a..eba05959 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Parking.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Parking.java @@ -20,27 +20,35 @@ public class Parking { /** 停车入场id 说明:车主服务为商户分配的入场id */ @SerializedName("id") private String id; + /** 商户入场id 说明:商户侧入场标识id,在同一个商户号下唯一 */ @SerializedName("out_parking_no") private String outParkingNo; + /** 车牌号 说明:车牌号,仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") private String plateNumber; + /** 车牌颜色 说明:车牌颜色 */ @SerializedName("plate_color") private PlateColor plateColor; + /** 入场时间 说明:入场时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE */ @SerializedName("start_time") private String startTime; + /** 停车场名称 说明:所在停车位车场的名称 */ @SerializedName("parking_name") private String parkingName; + /** 免费时长 说明:停车场的免费停车时长,单位为秒 */ @SerializedName("free_duration") private Integer freeDuration; + /** 停车入场状态 说明:本次入场车牌的服务状态, NORMAL:正常状态,可以使用微信支付分停车服务, BLOCKED 不可用状态,暂时不可以使用微信支付分停车服务 */ @SerializedName("state") private String state; + /** * 不可用状态描述 说明:block服务状态描述,返回车牌状态为BLOCKED,会返回该字段,描述具体BLOCKED的原因, PAUSE:已暂停微信支付分停车服务; * OVERDUE:已授权签约但欠费,不能提供服务, OUT_SERVICE : 车牌未开通微信支付分停车服务, EVALUATION_FAILED diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/ParkingTradeScene.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/ParkingTradeScene.java index 88488edd..deafc4f2 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/ParkingTradeScene.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/ParkingTradeScene.java @@ -20,12 +20,15 @@ public class ParkingTradeScene { /** 入场id 说明:微信支付分停车服务为商户分配的入场id,商户通过入场通知接口获取入场id */ @SerializedName("parking_id") private String parkingId; + /** 车牌号 说明:车牌号,仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") private String plateNumber; + /** 车牌颜色 说明:车牌颜色 */ @SerializedName("plate_color") private PlateColor plateColor; + /** * 入场时间 * 说明:用户入场时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -33,6 +36,7 @@ public class ParkingTradeScene { */ @SerializedName("start_time") private String startTime; + /** * 出场时间 * 说明:用户出场时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -40,12 +44,15 @@ public class ParkingTradeScene { */ @SerializedName("end_time") private String endTime; + /** 停车场名称 说明:所在停车位车场的名称 */ @SerializedName("parking_name") private String parkingName; + /** 计费时长 说明:计费的时间长,单位为秒 */ @SerializedName("charging_duration") private Integer chargingDuration; + /** 停车场设备id 说明:停车场设备id */ @SerializedName("device_id") private String deviceId; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Payer.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Payer.java index c2f8a271..c9979d81 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Payer.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Payer.java @@ -20,6 +20,7 @@ public class Payer { /** 用户在appid下的标识 说明:用户在appid下的唯一标识 */ @SerializedName("openid") private String openid; + /** 用户在sub_appid下的标识 说明:用户在sub_appid下的标识,商户扣费时传入了sub_appid,则会返回该用户在sub_appid下的标识 */ @SerializedName("sub_openid") private String subOpenid; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PlateService.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PlateService.java index ce0128ab..399783d5 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PlateService.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PlateService.java @@ -20,9 +20,11 @@ public class PlateService { /** 车牌号 说明:车牌号,仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") private String plateNumber; + /** 车牌颜色 说明:车牌颜色 */ @SerializedName("plate_color") private PlateColor plateColor; + /** * 车牌服务开通时间 * 说明:车牌服务开通时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -30,9 +32,11 @@ public class PlateService { */ @SerializedName("service_open_time") private String serviceOpenTime; + /** 用户标识 说明:用户在商户对应appid下的唯一标识,此处返回商户请求中的openid */ @SerializedName("openid") private String openid; + /** * 车牌服务开通状态 说明:车牌服务开通状态, NORMAL 正常服务 PAUSE 暂停服务 OUT_SERVICE 未开通 商户根据状态带用户跳转至对应的微信支付分停车服务小程序页面。 * 其中NORMAL 和 PAUSE状态,可跳转至车牌管理页,进行车牌服务状态管理。OUT_SERVICE状态,可跳转至服务开通页面。 diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PromotionDetail.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PromotionDetail.java index f024dbe3..ff37cb66 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PromotionDetail.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/PromotionDetail.java @@ -20,30 +20,39 @@ public class PromotionDetail { /** 券ID 说明:券或者立减优惠id */ @SerializedName("coupon_id") private String couponId; + /** 优惠名称 说明:优惠名称 */ @SerializedName("name") private String name; + /** 优惠范围 说明:GLOBAL-全场代金券, SINGLE-单品优惠 */ @SerializedName("scope") private String scope; + /** 优惠类型 说明:枚举值: CASH:充值型代金券 NOCASH:免充值型代金券 */ @SerializedName("type") private String type; + /** 活动ID 说明:在微信商户后台配置的批次ID */ @SerializedName("stock_id") private String stockId; + /** 优惠券面额 说明:用户享受优惠的金额 */ @SerializedName("amount") private Long amount; + /** 微信出资 说明:特指由微信支付商户平台创建的优惠,出资金额等于本项优惠总金额,单位为分 */ @SerializedName("wechatpay_contribute") private Long wechatpayContribute; + /** 商户出资 说明:特指商户自己创建的优惠,出资金额等于本项优惠总金额,单位为分 */ @SerializedName("merchant_contribute") private Long merchantContribute; + /** 其他出资 说明:其他出资方出资金额,单位为分 */ @SerializedName("other_contribute") private Long otherContribute; + /** 优惠币种 说明:CNY:人民币,境内商户号仅支持人民币。 */ @SerializedName("currency") private String currency; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryOrderAmount.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryOrderAmount.java index 508d9d12..d36a3667 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryOrderAmount.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryOrderAmount.java @@ -20,12 +20,15 @@ public class QueryOrderAmount { /** 订单金额 说明:订单总金额,单位为分,只能为整数,详见支付金额 */ @SerializedName("total") private Long total; + /** 货币类型 说明:符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY */ @SerializedName("currency") private String currency; + /** 用户实际支付金额 说明:用户实际支付金额,单位为分,只能为整数,详见支付金额 */ @SerializedName("payer_total") private Long payerTotal; + /** 折扣 说明:订单折扣 */ @SerializedName("discount_total") private Long discountTotal; diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryPlateServiceRequest.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryPlateServiceRequest.java index 2c9187cb..8bb85caf 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryPlateServiceRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryPlateServiceRequest.java @@ -22,18 +22,22 @@ public class QueryPlateServiceRequest { @SerializedName("appid") @Expose(serialize = false) private String appid; + /** 子商户号 说明:微信支付分配的子商户号,服务商模式下必传 */ @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 车牌号 说明:车牌号,仅包括省份+车牌,不包括特殊字符。 */ @SerializedName("plate_number") @Expose(serialize = false) private String plateNumber; + /** 用户标识 说明:用户在商户对应appid下的唯一标识 */ @SerializedName("openid") @Expose(serialize = false) private String openid; + /** 车牌颜色 说明:车牌颜色 */ @SerializedName("plate_color") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryTransactionRequest.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryTransactionRequest.java index ae50a857..2ecca7b6 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryTransactionRequest.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/QueryTransactionRequest.java @@ -22,6 +22,7 @@ public class QueryTransactionRequest { @SerializedName("sub_mchid") @Expose(serialize = false) private String subMchid; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母,且在同一个商户号下唯一 */ @SerializedName("out_trade_no") @Expose(serialize = false) diff --git a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Transaction.java index 3ac811e2..c93f443b 100644 --- a/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/wexinpayscoreparking/model/Transaction.java @@ -21,18 +21,23 @@ public class Transaction { /** 公众账号id 说明:appid是商户在微信申请公众号或移动应用成功后分配的帐号ID,登录平台为mp.weixin.qq.com或open.weixin.qq.com */ @SerializedName("appid") private String appid; + /** 子商户公众账号id 说明:子商户申请的公众号或移动应用appid,需要在服务商的商户平台为子商户绑定 */ @SerializedName("sub_appid") private String subAppid; + /** 商户号 说明:微信支付分配的商户号 */ @SerializedName("sp_mchid") private String spMchid; + /** 子商户号 说明:微信支付分配的子商户号 */ @SerializedName("sub_mchid") private String subMchid; + /** 服务描述 说明:商户自定义字段,用于交易账单中对扣费服务的描述。 */ @SerializedName("description") private String description; + /** * 订单创建时间 * 说明:订单成功创建时返回,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -40,18 +45,23 @@ public class Transaction { */ @SerializedName("create_time") private String createTime; + /** 商户订单号 说明:商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 */ @SerializedName("out_trade_no") private String outTradeNo; + /** 微信支付订单号 说明:微信支付订单号 */ @SerializedName("transaction_id") private String transactionId; + /** 交易状态 说明:SUCCESS—支付成功 ACCEPTED—已接收,等待扣款 PAY_FAIL–支付失败(其他原因,如银行返回失败) REFUND—转入退款 */ @SerializedName("trade_state") private String tradeState; + /** 交易状态描述 说明:对当前订单状态的描述和下一步操作的指引 */ @SerializedName("trade_state_description") private String tradeStateDescription; + /** * 支付完成时间 * 说明:订单支付完成时间,遵循[rfc3339](https://datatracker.ietf.org/doc/html/rfc3339)标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC @@ -59,27 +69,35 @@ public class Transaction { */ @SerializedName("success_time") private String successTime; + /** 付款银行 说明:银行类型,采用字符串类型的银行标识。BPA:该笔订单由微信进行垫付 */ @SerializedName("bank_type") private String bankType; + /** 用户是否已还款 说明:枚举值: Y:用户已还款 N:用户未还款 注意:使用此字段前需先确认bank_type字段值为BPA以及 trade_state字段值为SUCCESS。 */ @SerializedName("user_repaid") private String userRepaid; + /** 附加数据 说明:附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 */ @SerializedName("attach") private String attach; + /** 交易场景 说明:交易场景值,目前支持 :PARKING:车场停车场景 */ @SerializedName("trade_scene") private String tradeScene; + /** 停车场景信息 说明:返回信息中的trade_scene为PARKING,返回该场景信息 */ @SerializedName("parking_info") private ParkingTradeScene parkingInfo; + /** 支付者信息 说明:支付者信息 */ @SerializedName("payer") private Payer payer; + /** 订单金额信息 说明:订单金额信息 */ @SerializedName("amount") private QueryOrderAmount amount; + /** 优惠信息 说明:优惠信息 */ @SerializedName("promotion_detail") private List promotionDetail; diff --git a/shangmi/src/main/java/com/wechat/pay/java/shangmi/AeadSM4Cipher.java b/shangmi/src/main/java/com/wechat/pay/java/shangmi/AeadSM4Cipher.java index 33a2171e..23ad5cdf 100644 --- a/shangmi/src/main/java/com/wechat/pay/java/shangmi/AeadSM4Cipher.java +++ b/shangmi/src/main/java/com/wechat/pay/java/shangmi/AeadSM4Cipher.java @@ -21,7 +21,9 @@ public final class AeadSM4Cipher extends AbstractAeadCipher { private static final int TAG_LENGTH_BIT = 128; private static final String ALGORITHM = "SM4"; - /** @param apiV3Key APIv3密钥 */ + /** + * @param apiV3Key APIv3密钥 + */ public AeadSM4Cipher(byte[] apiV3Key) { super(ALGORITHM, TRANSFORMATION, TAG_LENGTH_BIT, covertSM4Key(apiV3Key)); } diff --git a/shangmi/src/main/java/com/wechat/pay/java/shangmi/SM2PrivacyDecryptor.java b/shangmi/src/main/java/com/wechat/pay/java/shangmi/SM2PrivacyDecryptor.java index 7090ae72..b2d60c75 100644 --- a/shangmi/src/main/java/com/wechat/pay/java/shangmi/SM2PrivacyDecryptor.java +++ b/shangmi/src/main/java/com/wechat/pay/java/shangmi/SM2PrivacyDecryptor.java @@ -11,7 +11,9 @@ public final class SM2PrivacyDecryptor extends AbstractPrivacyDecryptor { Security.addProvider(new KonaProvider()); } - /** @param privateKey 商户API私钥 */ + /** + * @param privateKey 商户API私钥 + */ public SM2PrivacyDecryptor(PrivateKey privateKey) { super("SM2", privateKey); } diff --git a/shangmi/src/main/java/com/wechat/pay/java/shangmi/SMConfig.java b/shangmi/src/main/java/com/wechat/pay/java/shangmi/SMConfig.java index a06b9522..a6481916 100644 --- a/shangmi/src/main/java/com/wechat/pay/java/shangmi/SMConfig.java +++ b/shangmi/src/main/java/com/wechat/pay/java/shangmi/SMConfig.java @@ -23,10 +23,13 @@ public final class SMConfig implements Config { /** 商户号 */ private final String merchantId; + /** 商户私钥 */ private final PrivateKey privateKey; + /** 商户证书序列号 */ private final String merchantSerialNumber; + /** 微信支付平台证书Provider */ private final CertificateProvider certificateProvider;