Skip to content

Commit 9b768c5

Browse files
authored
Merge pull request #42 from alipay/feature-pay-update
pay - update
2 parents c7bf735 + 7cc4578 commit 9b768c5

File tree

10 files changed

+88
-2
lines changed

10 files changed

+88
-2
lines changed

CHANGE.log

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,9 @@ align antom doc and library
111111
add PspCustomerInfo add extendInfo
112112

113113
33、Version:2.0.38
114-
add:ScopeType add TAOBAO_REBIND
114+
add:ScopeType add TAOBAO_REBIND
115+
116+
34、Version:2.0.40
117+
update:alipayPayRequest
118+
add:payments/syncArrear
119+
add:payments/createDeviceCertificate

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.alipay.global.sdk</groupId>
55
<artifactId>global-open-sdk-java</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.0.39</version>
7+
<version>2.0.40</version>
88
<name>global-open-sdk-java</name>
99
<url>https://github.com/alipay/global-open-sdk-java</url>
1010
<description>

src/main/java/com/alipay/global/api/example/SubscriptionDemoCode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public static void createSubscription() {
5050
alipaySubscriptionCreateRequest.setSubscriptionDescription("desc");
5151
alipaySubscriptionCreateRequest.setSubscriptionStartTime("2024-03-19T12:01:01+08:00");
5252
alipaySubscriptionCreateRequest.setSubscriptionEndTime("2024-06-27T12:01:01+08:00");
53+
// The duration of subscription preparation process should be less than 48 hours
5354
alipaySubscriptionCreateRequest.setSubscriptionExpiryTime("2024-03-20T18:20:06+08:00");
5455

5556
PeriodRule periodRule = PeriodRule.builder().periodType("MONTH").periodCount(1).build();

src/main/java/com/alipay/global/api/model/constants/AntomPathConstants.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public class AntomPathConstants {
7272
*/
7373
public static final String CANCEL_PATH = "/ams/api/v1/payments/cancel";
7474

75+
public static final String SYNC_ARREAR_PATH = "/ams/api/v1/payments/syncArrear";
76+
77+
public static final String CREATE_DEVICE_CERTIFICATE_PATH = "/ams/api/v1/payments/createDeviceCertificate";
78+
7579

7680
/**
7781
* see <a href="https://global.alipay.com/docs/ac/ams/create_sub">create subscription</a>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.alipay.global.api.request.ams.pay;
2+
3+
import com.alipay.global.api.model.constants.AntomPathConstants;
4+
import com.alipay.global.api.request.AlipayRequest;
5+
import com.alipay.global.api.response.ams.pay.AlipayDeviceCertificateResponse;
6+
import lombok.Data;
7+
import lombok.EqualsAndHashCode;
8+
9+
@EqualsAndHashCode(callSuper = true)
10+
@Data
11+
public class AlipayDeviceCertificateRequest extends AlipayRequest<AlipayDeviceCertificateResponse> {
12+
13+
private String devicePublicKey;
14+
15+
private String deviceRequestId;
16+
17+
18+
public AlipayDeviceCertificateRequest() {
19+
this.setPath(AntomPathConstants.CREATE_DEVICE_CERTIFICATE_PATH);
20+
}
21+
22+
@Override
23+
public Class<AlipayDeviceCertificateResponse> getResponseClass() {
24+
return AlipayDeviceCertificateResponse.class;
25+
}
26+
27+
}

src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public class AlipayPayRequest extends AlipayRequest<AlipayPayResponse> {
101101
*/
102102
private String merchantAccountId;
103103

104+
private Boolean dualOfflinePayment;
105+
104106
public AlipayPayRequest() {
105107
this.setPath(AntomPathConstants.PAYMENT_PATH);
106108
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.alipay.global.api.request.ams.pay;
2+
3+
import com.alipay.global.api.model.constants.AntomPathConstants;
4+
import com.alipay.global.api.request.AlipayRequest;
5+
import com.alipay.global.api.response.ams.pay.AlipaySyncArrearResponse;
6+
import lombok.Data;
7+
import lombok.EqualsAndHashCode;
8+
9+
@EqualsAndHashCode(callSuper = true)
10+
@Data
11+
public class AlipaySyncArrearRequest extends AlipayRequest<AlipaySyncArrearResponse> {
12+
13+
private String paymentId;
14+
private String paymentRequestId;
15+
16+
17+
public AlipaySyncArrearRequest() {
18+
this.setPath(AntomPathConstants.SYNC_ARREAR_PATH);
19+
}
20+
21+
@Override
22+
public Class<AlipaySyncArrearResponse> getResponseClass() {
23+
return AlipaySyncArrearResponse.class;
24+
}
25+
}

src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCreateRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class AlipaySubscriptionCreateRequest extends
4646

4747
/**
4848
* A specific date and time after which the created subscription expires.
49+
* The duration of subscription preparation process should be less than 48 hours
4950
*/
5051
private String subscriptionExpiryTime;
5152

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.alipay.global.api.response.ams.pay;
2+
3+
import com.alipay.global.api.response.AlipayResponse;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
7+
@EqualsAndHashCode(callSuper = true)
8+
@Data
9+
public class AlipayDeviceCertificateResponse extends AlipayResponse {
10+
private String deviceCertificate;
11+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.alipay.global.api.response.ams.pay;
2+
3+
import com.alipay.global.api.response.AlipayResponse;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
7+
@EqualsAndHashCode(callSuper = true)
8+
@Data
9+
public class AlipaySyncArrearResponse extends AlipayResponse {
10+
}

0 commit comments

Comments
 (0)