|
@@ -166,6 +166,15 @@ func WriteBytes(c *binding_context.Context, statusCode int, bytes []byte, err er
|
|
c.Writer.Flush()
|
|
c.Writer.Flush()
|
|
}
|
|
}
|
|
|
|
|
|
-func SendMapXMLResponseIgnoreError(c *binding_context.Context, statusCode int, data map[string]any, _ error) {
|
|
|
|
- c.XML(statusCode, data)
|
|
|
|
|
|
+func SendWXOrderResponse(c *binding_context.Context, statusCode int, _ any, err error) {
|
|
|
|
+ if err == nil {
|
|
|
|
+ c.XML(statusCode, map[string]any{
|
|
|
|
+ "return_code": "FAIL",
|
|
|
|
+ "return_msg": err.Error(),
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ c.XML(statusCode, map[string]any{
|
|
|
|
+ "return_code": "SUCCESS",
|
|
|
|
+ })
|
|
}
|
|
}
|