bule.go 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package fapiao
  2. import "XT_New/models"
  3. func Blue(config models.FapiaoConfig) (routerAddress string, postData map[string]interface{}) {
  4. routerAddress = "/tax-api/invoice/blue/v1"
  5. postData = map[string]interface{}{
  6. "seller_name": "wkbb invoice blue test",
  7. "seller_taxpayer_num": "your seller_taxpayer_num",
  8. "seller_address": "",
  9. "seller_tel": "",
  10. "seller_bank_name": "",
  11. "seller_bank_account": "",
  12. "title_type": 1,
  13. "buyer_title": "海南高灯科技",
  14. "buyer_taxpayer_num": "",
  15. "buyer_address": "",
  16. "buyer_bank_name": "",
  17. "buyer_bank_account": "",
  18. "buyer_phone": "",
  19. "buyer_email": "",
  20. "taker_phone": "",
  21. "order_id": "fc5fec2d1b6942658c009a151d4cffa5",
  22. "invoice_type_code": "032",
  23. "callback_url": "http://www.test.com",
  24. "drawer": "TEST",
  25. "payee": "TEST",
  26. "checker": "TEST",
  27. "terminal_code": "661234567789",
  28. "user_openid": "ba9ea0bdfa1f460993c990564caab18f",
  29. "special_invoice_kind": "",
  30. "zsfs": "",
  31. "deduction": "",
  32. "amount_has_tax": "66.66",
  33. "tax_amount": "66.66",
  34. "amount_without_tax": "66.66",
  35. "remark": "readme",
  36. }
  37. //项目商品明细
  38. items := make([]map[string]interface{}, 1)
  39. item := make(map[string]interface{})
  40. item["name"] = "海鲜真划算"
  41. item["tax_code"] = "your tax_code"
  42. item["models"] = "zyx"
  43. item["unit"] = "个"
  44. item["total_price"] = "66.66"
  45. item["total"] = "5"
  46. item["price"] = "17.22"
  47. item["tax_rate"] = "66.66"
  48. item["tax_amount"] = "66.66"
  49. item["discount"] = "66.66"
  50. item["preferential_policy_flag"] = "0"
  51. item["zero_tax_flag"] = "0"
  52. item["vat_special_management"] = ""
  53. items[0] = item
  54. postData["items"] = items
  55. return routerAddress, postData
  56. }