- 修复AfsSubmit与OrderAddTips的bug
This commit is contained in:
@@ -23,7 +23,7 @@ func init() {
|
||||
// sandbox
|
||||
api = New("df97f334-f7d8-4b36-9664-5784d8ae0baf", "06692746f7224695ad4788ce340bc854", "d6b42a35a7414a5490d811654d745c84")
|
||||
// prod
|
||||
// api = New("ccb10daf-e6f5-4a58-ada5-b97f9073a137", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
|
||||
// api = New("77e703b7-7997-441b-a12a-2e522efb117a", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
|
||||
// 天天果园
|
||||
// api = New("84541069-fbe2-424b-b625-9b2ba1d4c9e6", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26")
|
||||
|
||||
|
||||
@@ -588,6 +588,7 @@ func (a *API) AfsSubmit(OrderID, pin, questionTypeCode, questionDesc, questionPi
|
||||
"orderId": OrderID,
|
||||
"pin": utils.GetAPIOperator(pin),
|
||||
"questionTypeCode": questionTypeCode,
|
||||
"skuList": skuList,
|
||||
}
|
||||
if questionDesc != "" {
|
||||
jdParams["questionDesc"] = questionDesc
|
||||
@@ -625,11 +626,11 @@ func ProcessQuestionPic(questionPic string) (outQuestionPic string) {
|
||||
|
||||
// 订单商家加小费接口
|
||||
// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=ed9e3ca7325c4d4d8ceaf959ed0e7a62
|
||||
func (a *API) OrderAddTips(OrderID string, tips int, pin string) (err error) {
|
||||
func (a *API) OrderAddTips(orderID string, tips int, operator string) (err error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"orderId": OrderID,
|
||||
"tips": tips,
|
||||
"pin": utils.GetAPIOperator(pin),
|
||||
"orderId": orderID,
|
||||
"tips": tips,
|
||||
"operator": utils.GetAPIOperator(operator),
|
||||
}
|
||||
_, err = a.AccessAPINoPage("order/addTips", jdParams, nil, nil, nullResultParser)
|
||||
return err
|
||||
|
||||
@@ -10,7 +10,8 @@ import (
|
||||
)
|
||||
|
||||
func TestQuerySingleOrder(t *testing.T) {
|
||||
retVal, err := api.QuerySingleOrder("815536199000222")
|
||||
retVal, err := api.QuerySingleOrder("918092290000042")
|
||||
t.Log(utils.Format4Output(retVal, false))
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
@@ -218,3 +219,10 @@ func TestOrderShoudSettlementService2(t *testing.T) {
|
||||
}
|
||||
sugarLogger.Debug(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestOrderAddTips(t *testing.T) {
|
||||
err := api.OrderAddTips("918092290000042", 50, "xjh")
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func init() {
|
||||
// prod
|
||||
// api = New("3c0a05d464c247c19d7ec13accc78605", "b1M}9?:sTbsB[OF2gNORnN(|(iy9rB8(`7]|[wGLnbmt`evfM>E:A90DjHAW:UPE")
|
||||
|
||||
api.SetCookie("token", "0seqGSJnhbr4XJ0EaIQL6CoOpnaV1ErgS42uOlzNXYIX7PeuLuyCFQQZKKWGExJ7IMTQQQDe5H6YMmVFnxjCkw")
|
||||
api.SetCookie("token", "jWQx6ao1-BFeuFg1iOHX207ocrPXlJPY-f41EaF1769C13Gw-irr5QnfQzmZOvOqt99cdN4XdQW0n8wvy-Hl_A")
|
||||
}
|
||||
|
||||
func handleError(t *testing.T, err error) {
|
||||
|
||||
Reference in New Issue
Block a user