query.go 779B

12345678910111213141516171819202122232425262728
  1. package fapiao
  2. import "XT_New/models"
  3. func Query(seller_taxpayer_num string, order_sn string, order_id string) (routerAddress string, postData map[string]interface{}) {
  4. routerAddress = "/tax-api/invoice/query/v1"
  5. postData = map[string]interface{}{
  6. "seller_taxpayer_num": seller_taxpayer_num,
  7. "order_sn": order_sn,
  8. "order_id": order_id,
  9. "is_red": 0,
  10. }
  11. return routerAddress, postData
  12. }
  13. func QueryStock(config models.FapiaoConfig) (routerAddress string, postData map[string]interface{}) {
  14. routerAddress = "/tax-api/invoice/query-stock/v1"
  15. postData = map[string]interface{}{
  16. "taxpayer_id": config.TaxpayerId,
  17. "terminal_code": config.TerminalCode,
  18. "invoice_type_code": "026",
  19. }
  20. return routerAddress, postData
  21. }