- 三大平台添加退款与部分退款相关的API
This commit is contained in:
@@ -69,6 +69,13 @@ type PrivateMobileInfo struct {
|
||||
ExpireDate *time.Time `json:"expire_date"`
|
||||
}
|
||||
|
||||
type RefundSku struct {
|
||||
SkuID string `json:"sku_id,omitempty"`
|
||||
Upc string `json:"upc,omitempty"`
|
||||
CustomeSkuID string `json:"custom_sku_id,omitempty"`
|
||||
Number string `json:"number"`
|
||||
}
|
||||
|
||||
// 提供给合作方确认订单所用。 注:1、10分钟内未确认的订单系统自动取消。2、确认失败的订单请不要做餐。 2016年7月4号起,将由百度外卖负责完成订单。届时,对接方无需调用完成订单接口,继续调用可能导致订单结算有问题。
|
||||
func (a *API) OrderConfirm(orderID string) (err error) {
|
||||
_, err = a.AccessAPI("order.confirm", map[string]interface{}{
|
||||
@@ -216,3 +223,26 @@ func (a *API) SmartOrderIdConvert(orderID string) (convertedOrderID string, err
|
||||
func isOrderIDEleme(orderID string) bool {
|
||||
return len(orderID) == len("3026328756122155111")
|
||||
}
|
||||
|
||||
func (a *API) OrderAgreeRefund(orderID string) (err error) {
|
||||
_, err = a.AccessAPI("order.agreerefund", map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *API) OrderDisagreeRefund(orderID, refuseReason string) (err error) {
|
||||
_, err = a.AccessAPI("order.disagreerefund", map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
"refuse_reason": refuseReason,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *API) OrderPartRefund(orderID string, removeSkuList []*RefundSku) (err error) {
|
||||
_, err = a.AccessAPI("order.partrefund", map[string]interface{}{
|
||||
"order_id": orderID,
|
||||
"products": removeSkuList,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user