Compare commits
8 Commits
feat/viett
...
master
Author | SHA1 | Date |
---|---|---|
sinhluu | af64aeab31 | |
Sinh | 5fc7fa9843 | |
sinhluu | 400aa5fa58 | |
Sinh | dd1d93a020 | |
sinhluu | d1fc6632eb | |
Sinh | a37bcd610d | |
sinhluu | 08029dfd8e | |
Sinh | 3cb41cb650 |
|
@ -66,12 +66,12 @@ func (c *Client) CreateOrder(p CreateOrderRequest) (*CreateOrderResponse, error)
|
||||||
}
|
}
|
||||||
if res.StatusCode >= http.StatusBadRequest {
|
if res.StatusCode >= http.StatusBadRequest {
|
||||||
if err := r.ParseResponseData(&errRes); err != nil {
|
if err := r.ParseResponseData(&errRes); err != nil {
|
||||||
return nil, fmt.Errorf("onpoint.Client.CreateOrder: parse_response_err: %v", err)
|
return nil, fmt.Errorf("onpoint.Client.CreateOrder: parse_response_err: %v. Reason: %s", err, res.Body)
|
||||||
}
|
}
|
||||||
return nil, errRes
|
return nil, errRes
|
||||||
}
|
}
|
||||||
if err := r.ParseResponseData(&dataRes); err != nil {
|
if err := r.ParseResponseData(&dataRes); err != nil {
|
||||||
return nil, fmt.Errorf("onpoint.Client.CreateOrder: parse_response_data: %v", err)
|
return nil, fmt.Errorf("onpoint.Client.CreateOrder: parse_response_data: %v. Raw response: %s", err, res.Body)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &dataRes.Data, nil
|
return &dataRes.Data, nil
|
||||||
|
|
|
@ -28,6 +28,7 @@ type ORPayload struct {
|
||||||
CodType string `json:"cod_type"`
|
CodType string `json:"cod_type"`
|
||||||
Note string `json:"note"`
|
Note string `json:"note"`
|
||||||
OrCode string `json:"or_code"`
|
OrCode string `json:"or_code"`
|
||||||
|
PartnerORCode string `json:"partner_or_code"`
|
||||||
OrType string `json:"or_type"`
|
OrType string `json:"or_type"`
|
||||||
ShippingType string `json:"shipping_type"`
|
ShippingType string `json:"shipping_type"`
|
||||||
CustomerName string `json:"customer_name"`
|
CustomerName string `json:"customer_name"`
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
baseURLStag = "https://stg-gw.viettelpost.vn"
|
baseURLStag = "https://dev-wms-gw.viettelpost.vn"
|
||||||
baseURLAuthStag = "https://stg-keycloak.viettelpost.vn"
|
baseURLAuthStag = "https://stg-keycloak.viettelpost.vn"
|
||||||
|
|
||||||
baseURLProd = "https://gw.viettelpost.vn"
|
baseURLProd = "https://gw.viettelpost.vn"
|
||||||
|
@ -25,7 +25,7 @@ const (
|
||||||
|
|
||||||
pathAuth = "/realms/wms/protocol/openid-connect/token"
|
pathAuth = "/realms/wms/protocol/openid-connect/token"
|
||||||
pathUpdateORLogisticInfo = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/%s"
|
pathUpdateORLogisticInfo = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/%s"
|
||||||
pathCreateOR = "/wms-core/api/v1/obms/outbound-request/outbound-request-partner/hab"
|
pathCreateOR = "/wms-integration/api/v1/obms/outbound-request/outbound-request-partner/hab"
|
||||||
pathCancelOR = "/wms-core/api/v1/obms/outbound-request/cancel"
|
pathCancelOR = "/wms-core/api/v1/obms/outbound-request/cancel"
|
||||||
|
|
||||||
logTarget = "viettel-ffm"
|
logTarget = "viettel-ffm"
|
||||||
|
|
Loading…
Reference in New Issue