File tree Expand file tree Collapse file tree
src/SKIT.FlurlHttpClient.Wechat.TenpayV2/Models/Deposit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,5 +171,18 @@ public class CreateDepositMicroPayResponse : WechatTenpaySignableResponse
171171 [ System . Text . Json . Serialization . JsonPropertyName ( "time_end" ) ]
172172 [ System . Text . Json . Serialization . JsonConverter ( typeof ( System . Text . Json . Serialization . Common . DigitalDateTimeOffsetConverter ) ) ]
173173 public DateTimeOffset ? EndTime { get ; set ; }
174+
175+ /// <inheritdoc/>
176+ /// <remarks>
177+ /// 针对押金支付接口,当押金支付不需要等待用户输入密码时,微信会直接冻结资金并返回表示交易成功的响应体,
178+ /// 此时错误代码 err_code 节点的值为 "SUCCESS",应当被视为成功。
179+ /// </remarks>
180+ public override bool IsSuccessful ( )
181+ {
182+ bool ret1 = GetRawStatus ( ) == 200 && "SUCCESS" . Equals ( ReturnCode ) ;
183+ bool ret2 = string . IsNullOrEmpty ( ErrorCode ) || "0" . Equals ( ErrorCode ) || "SUCCESS" . Equals ( ErrorCode ) ;
184+ bool ret3 = string . IsNullOrEmpty ( ResultCode ) || "SUCCESS" . Equals ( ResultCode ) ;
185+ return ret1 && ret2 && ret3 ;
186+ }
174187 }
175188}
You can’t perform that action at this time.
0 commit comments