Skip to content

Commit 2e427fb

Browse files
committed
内部转换沙箱链接
1 parent 8450227 commit 2e427fb

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Changelog## 2.1.2 - 2025-09-2- 内部转换沙箱链接## 2.1.1 - 2025-07-09- update 0709## 2.1.0 - 2025-04-10* [#14](https://github.com/alipay/global-open-sdk-dotnet/pull/13) feature-250410 - Antom 印度渠道接入AMS拒付相关接口的标准变更 - Antom印度渠道接入(UPI/CARD/NETBAKING)相关接口标准变更 - CKP二期支持商户传入支付方式地区和支付方式要素## 2.0.9 - 2025-02-05* [#13](https://github.com/alipay/global-open-sdk-dotnet/pull/13) feature-250205 - 支付、查询、支付结果通知新增卡相关信息字段## 2.0.8 - 2025-01-22* [#12](https://github.com/alipay/global-open-sdk-dotnet/pull/12) feature-250122 - update promotionResults## 2.0.7 - 2025-01-06* [#11](https://github.com/alipay/global-open-sdk-dotnet/pull/11) feature-250106 - 订阅支付新增“更新接口”## 2.0.6 - 2024-12-24* [#11](https://github.com/alipay/global-open-sdk-dotnet/pull/10) feature-241224 - CKP二期支持商户传入可选支付方式列表 - AMS独立绑卡支持MIT交易## 2.0.5 - 2024-12-16* [#10](https://github.com/alipay/global-open-sdk-dotnet/pull/10) feature-241216 - RDR拒付通知优化通用能力变更 - Antom新增ApplePay支付方式## 2.0.4 - 2024-12-02* [#9](https://github.com/alipay/global-open-sdk-dotnet/pull/9) feature-241202 - update AlipayDisputeNotify - update AlipayPayQueryResponse## 2.0.3 - 2024-11-25* [#8](https://github.com/alipay/global-open-sdk-dotnet/pull/8) feature-241125 - update AlipayPayResultNotify - update AlipayPayQueryRequest## 2.0.3 - 2024-11-25* [#7](https://github.com/alipay/global-open-sdk-dotnet/pull/7) feature-241125 - update Leg## 2.0.2 - 2024-11-04* [#6](https://github.com/alipay/global-open-sdk-dotnet/pull/6) feature-notify - add notify## 2.0.1 - 2024-10-23 * [#5](https://github.com/alipay/global-open-sdk-dotnet/pull/5) feature-p2 - add MARKETPLACE - add vaulting - add Dispute - add risk - add Notify - add MARKETPLACE_demo - add subscription_demo - add vaulting_demo - add Dispute_demo## 2.0.0 - 2024-09-04* [#4](https://github.com/alipay/global-open-sdk-dotnet/pull/4) Init object library * Add pay - request response * Add auth - request response * Add customs - request response * Add subscription - request response * Add example - auth customs pay * Add Changelog## 1.0.0 - 2021-08-02* Init object library
1+
# Changelog## 2.1.3 - 2025-09-2- 内部转换沙箱链接## 2.1.1 - 2025-07-09- update 0709## 2.1.0 - 2025-04-10* [#14](https://github.com/alipay/global-open-sdk-dotnet/pull/13) feature-250410 - Antom 印度渠道接入AMS拒付相关接口的标准变更 - Antom印度渠道接入(UPI/CARD/NETBAKING)相关接口标准变更 - CKP二期支持商户传入支付方式地区和支付方式要素## 2.0.9 - 2025-02-05* [#13](https://github.com/alipay/global-open-sdk-dotnet/pull/13) feature-250205 - 支付、查询、支付结果通知新增卡相关信息字段## 2.0.8 - 2025-01-22* [#12](https://github.com/alipay/global-open-sdk-dotnet/pull/12) feature-250122 - update promotionResults## 2.0.7 - 2025-01-06* [#11](https://github.com/alipay/global-open-sdk-dotnet/pull/11) feature-250106 - 订阅支付新增“更新接口”## 2.0.6 - 2024-12-24* [#11](https://github.com/alipay/global-open-sdk-dotnet/pull/10) feature-241224 - CKP二期支持商户传入可选支付方式列表 - AMS独立绑卡支持MIT交易## 2.0.5 - 2024-12-16* [#10](https://github.com/alipay/global-open-sdk-dotnet/pull/10) feature-241216 - RDR拒付通知优化通用能力变更 - Antom新增ApplePay支付方式## 2.0.4 - 2024-12-02* [#9](https://github.com/alipay/global-open-sdk-dotnet/pull/9) feature-241202 - update AlipayDisputeNotify - update AlipayPayQueryResponse## 2.0.3 - 2024-11-25* [#8](https://github.com/alipay/global-open-sdk-dotnet/pull/8) feature-241125 - update AlipayPayResultNotify - update AlipayPayQueryRequest## 2.0.3 - 2024-11-25* [#7](https://github.com/alipay/global-open-sdk-dotnet/pull/7) feature-241125 - update Leg## 2.0.2 - 2024-11-04* [#6](https://github.com/alipay/global-open-sdk-dotnet/pull/6) feature-notify - add notify## 2.0.1 - 2024-10-23 * [#5](https://github.com/alipay/global-open-sdk-dotnet/pull/5) feature-p2 - add MARKETPLACE - add vaulting - add Dispute - add risk - add Notify - add MARKETPLACE_demo - add subscription_demo - add vaulting_demo - add Dispute_demo## 2.0.0 - 2024-09-04* [#4](https://github.com/alipay/global-open-sdk-dotnet/pull/4) Init object library * Add pay - request response * Add auth - request response * Add customs - request response * Add subscription - request response * Add example - auth customs pay * Add Changelog## 1.0.0 - 2021-08-02* Init object library

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Alipay AMS(Alipay Merchant Services) C# Bindings
22
```
33
Language:C#
4-
Releass ^2.1.2
4+
Releass ^2.1.3
55
Copyright:Ant financial services group
66
```
77

ams-dotnet/ams-dotnet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<PackageId>global-open-sdk-dotnet</PackageId>
6-
<Version>2.1.2</Version>
6+
<Version>2.1.3</Version>
77
<Authors>wangzunjiao</Authors>
88
<Company>antom</Company>
99
<OutputType>Exe</OutputType>

ams-dotnet/src/com/alipay/ams/api/DefaultAlipayClient.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public TAMSResponse Execute<TAMSResponse>(request.AMSRequest<TAMSResponse> requ
5151

5252

5353
var ret = client.SendAsync(requestMessage).ConfigureAwait(false).GetAwaiter().GetResult(); ;
54+
5455

55-
return AMSResponse.ParseResponse<TAMSResponse>(ret, request.GetRequestURI(), this.ClientId,this.AlipayPublicKey);
56+
return AMSResponse.ParseResponse<TAMSResponse>(ret, BuildRequestUri(request.GetRequestURI()), this.ClientId,this.AlipayPublicKey);
5657
}
5758

5859
public string BuildRequestUrl(string originPath)
@@ -67,5 +68,15 @@ public string BuildRequestUrl(string originPath)
6768
var fullUri = new Uri(baseUri, originPath);
6869
return fullUri.ToString();
6970
}
71+
72+
public string BuildRequestUri(string originPath)
73+
{
74+
75+
if (ClientId != null && ClientId.StartsWith("SANDBOX_", StringComparison.Ordinal))
76+
{
77+
originPath = originPath.Replace("/ams/api", "/ams/sandbox/api");
78+
}
79+
return originPath;
80+
}
7081
}
7182
}

0 commit comments

Comments
 (0)