|
@@ -20,9 +20,13 @@ var (
|
|
)
|
|
)
|
|
|
|
|
|
type PayOrderDTO struct {
|
|
type PayOrderDTO struct {
|
|
- ProductOrderNo string
|
|
|
|
- TradeOrderNo string
|
|
|
|
- PaymentToken string
|
|
|
|
|
|
+ ProductTitle string
|
|
|
|
+ ProductDescription string
|
|
|
|
+ BuyId int
|
|
|
|
+ PayType []int
|
|
|
|
+ ProductOrderNo string
|
|
|
|
+ TradeOrderNo string
|
|
|
|
+ PaymentToken string
|
|
}
|
|
}
|
|
|
|
|
|
func PayOrder(userId, templateUserId int, productOrder order.ProductOrderDTO) (payOrderDTO PayOrderDTO, err error) {
|
|
func PayOrder(userId, templateUserId int, productOrder order.ProductOrderDTO) (payOrderDTO PayOrderDTO, err error) {
|
|
@@ -50,5 +54,10 @@ func PayOrder(userId, templateUserId int, productOrder order.ProductOrderDTO) (p
|
|
payOrderDTO.TradeOrderNo = tradeOrderNo
|
|
payOrderDTO.TradeOrderNo = tradeOrderNo
|
|
payOrderDTO.PaymentToken = token
|
|
payOrderDTO.PaymentToken = token
|
|
payOrderDTO.ProductOrderNo = productOrder.OrderID
|
|
payOrderDTO.ProductOrderNo = productOrder.OrderID
|
|
|
|
+ payOrderDTO.ProductTitle = productOrder.ProductName
|
|
|
|
+ payOrderDTO.ProductDescription = productOrder.ProductDescription
|
|
|
|
+ //微信用户的ID
|
|
|
|
+ payOrderDTO.BuyId = templateUserId
|
|
|
|
+ payOrderDTO.PayType = []int{1, 2}
|
|
return
|
|
return
|
|
}
|
|
}
|