提交 99dd54fa authored 作者: zhanglibo's avatar zhanglibo

京东发票类型

上级 c4901562
...@@ -38,6 +38,11 @@ type client struct { ...@@ -38,6 +38,11 @@ type client struct {
AccessToken string AccessToken string
} }
type InvoiceType string
const EI InvoiceType = "4" //电子发票
const VAT InvoiceType = "2" //增值税发票
var server *client var server *client
const CacheKey = "jingdong:token" const CacheKey = "jingdong:token"
......
...@@ -39,12 +39,13 @@ type PriceSnap struct { ...@@ -39,12 +39,13 @@ type PriceSnap struct {
//PlaceOrderReq 下单 //PlaceOrderReq 下单
type PlaceOrderReq struct { type PlaceOrderReq struct {
OrderSn string //订单单号 OrderSn string //订单单号
SkuNums []*SkuNums SkuNums []*SkuNums
Consignee string //收货人姓名,最多20个字符 Consignee string //收货人姓名,最多20个字符
Phone string //手机号,最多20个字符 Phone string //手机号,最多20个字符
Address *PlaceOrderAddress Address *PlaceOrderAddress
PriceSnap []*PriceSnap PriceSnap []*PriceSnap
InvoiceType InvoiceType
} }
//PlaceOrderAddress 下单地址 //PlaceOrderAddress 下单地址
...@@ -164,7 +165,7 @@ func (orderJD) PlaceOrder(ctx context.Context, req *PlaceOrderReq) (res *PlaceOr ...@@ -164,7 +165,7 @@ func (orderJD) PlaceOrder(ctx context.Context, req *PlaceOrderReq) (res *PlaceOr
"submitState": server.SubmitState, "submitState": server.SubmitState,
"invoicePhone": server.Mobile, "invoicePhone": server.Mobile,
"invoiceState": "2", "invoiceState": "2",
"invoiceType": "4", "invoiceType": req.InvoiceType,
"selectedInvoiceTitle": "5", "selectedInvoiceTitle": "5",
"invoiceContent": "1", "invoiceContent": "1",
"paymentType": "4", "paymentType": "4",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论