访问京东API,获取结账必要信息。

This commit is contained in:
lyb
2018-08-10 11:02:06 +08:00
parent dad4ab5d73
commit 3bc6608e1f
3 changed files with 6 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ func (c *WaybillController) onWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (
order.Status = model.WaybillStatusNew
case jdapi.DeliveryStatusAccepted:
if result, err := api.JdAPI.QuerySingleOrder(msg.OrderID); err == nil {
order.DesiredFee = utils.Interface2Int64WithDefault(result["orderFreightMoney"], 0) +
order.DesiredFee = utils.Interface2Int64WithDefault(result["orderReceivableFreight"], 0) +
utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0) +
utils.Interface2Int64WithDefault(result["tips"], 0)
}