qrcode.go 712B

123456789101112131415161718192021222324252627
  1. package fapiao
  2. import "gdyb/models"
  3. func GetQRCode(config models.FapiaoConfig) (routerAddress string, postData map[string]interface{}) {
  4. routerAddress = "/tax-api/invoice/auth/get-qrcode/v1"
  5. postData = map[string]interface{}{
  6. "taxpayer_id": config.TaxpayerId,
  7. "terminal_code": config.TerminalCode,
  8. }
  9. return routerAddress, postData
  10. }
  11. func GetQRStatus(auth_id string, config models.FapiaoConfig) (routerAddress string, postData map[string]interface{}) {
  12. routerAddress = "/tax-api/invoice/auth/query-qrcode-status/v1"
  13. postData = map[string]interface{}{
  14. "taxpayer_id": config.TaxpayerId,
  15. "terminal_code": config.TerminalCode,
  16. "auth_id": auth_id,
  17. }
  18. return routerAddress, postData
  19. }