From 449cee14c9a549fec6ffdd4d131fa45349fff20d Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 26 Jun 2019 22:33:47 +0800 Subject: [PATCH] - jdapi.CancelAndRefund --- platformapi/jdapi/order.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/platformapi/jdapi/order.go b/platformapi/jdapi/order.go index cbb2a755..318a7813 100644 --- a/platformapi/jdapi/order.go +++ b/platformapi/jdapi/order.go @@ -418,6 +418,23 @@ func (a *API) ConfirmReceiveGoods(orderId string) (err error) { return err } +// 订单取消且退款接口 +// 自配送商家(或转自配送)的订单,由于无法完成订单配送,通过此接口取消订单并退款。 +// https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=169&apiid=6be3f3a811f14f22a83007ab02f23b03 +func (a *API) CancelAndRefund(orderId, operPin, operRemark string) (err error) { + if operRemark == "" { + operRemark = "operRemark" + } + jdParams := map[string]interface{}{ + "orderId": orderId, + "operPin": utils.GetAPIOperator(operPin), + "operRemark": operRemark, + "operTime": utils.GetCurTimeStr(), + } + _, err = a.AccessAPINoPage("orderStatus/cancelAndRefund", jdParams, nil, nil, nullResultParser) + return err +} + // 申请售后单审核接口 // https://openo2o.jddj.com/staticnew/widgets/resources.html?groupid=170&apiid=1690f6efc0144d59823b236e0d8506a1 func (a *API) AfsOpenApprove(afsOrderID string, afsApproveType int, rejectReason string, optPin string) (err error) {