收藏
回答

创建微信代金券fixed_begin _term字段有问题,求解

调用创建代金券接口,代金券类型为“CASH”,在data_info中设置type为2或DATETYPE FIX_TERM时,fixed_begin _term字段设置为0一直提示时间错误:invalid time :



但是设置为非0的正整数就可以验证通过:



官方文档上说是可以为0的,请问一下各位大神,这到底是什么情况?

最后一次编辑于  02-18
回答关注问题邀请回答
收藏

1 个回答

  • 微信支付技术助手
    微信支付技术助手
    02-19

    您好,请将您的所有请求参数发出来。

    02-19
    赞同
    回复 10
    • Hello Detto
      Hello Detto
      02-19

      请求内容:

      {
          "card": {
              "card_type": "CASH",
              "cash": {
                  "base_info": {
                      "logo_url": "http://mmbiz.qpic.cn/mmbiz_png/9ZAVsjRuwHRfcptr1IAJs15pbiaqbttBYswAZs2A5njajd8qlljTJfjaLfy6s7J1PNmFY1kcgZLeoicfrs3Zw4tA/0",
                      "pay_info": {
                          "swipe_card": {
                              "create_mid": "1521068011",
                              "use_mid_list": [
                                  "1521068011"
                              ],
                              "is_swipe_card": true
                          }
                      },
                      "brand_name": "测试",
                      "code_type": "CODE_TYPE_QRCODE",
                      "title": "测试领取后有效",
                      "color": "Color010",
                      "notice": "请出示二维码",
                      "service_phone": null,
                      "description": "",
                      "date_info": {
                          "type": "DATE_TYPE_FIX_TERM",
                          "fixed_term": 2,
                          "fixed_begin_term": 0
                      },
                      "can_share": false,
                      "center_title": "立即使用",
                      "center_url": "http://www.baidu.com",
                      "center_app_brand_user_name": null,
                      "center_app_brand_pass": null,
                      "custom_url_name": null,
                      "custom_url": null,
                      "custom_url_sub_title": null,
                      "custom_app_brand_user_name": null,
                      "custom_app_brand_pass": null,
                      "promotion_url_name": null,
                      "promotion_url": null,
                      "promotion_url_sub_title": null,
                      "promotion_app_brand_user_name": null,
                      "promotion_app_brand_pass": null,
                      "can_give_friend": false,
                      "sku": {
                          "quantity": 10
                      },
                      "get_limit": 1
                  },
                  "advanced_info": {
                      "use_condition": {
                          "accept_category": "测试",
                          "reject_category": "无",
                          "can_use_with_other_discount": false,
                          "least_cost": "1100"
                      },
                      "abstract": null,
                      "text_image_list": null
                  },
                  "reduce_cost": 1000,
                  "least_cost": 1100
              }
          }
      }

      返回提示:

      {
          "errcode": 40079,
          "errmsg": "invalid time hint: [NTnbNA07045320]"
      }


      02-19
      回复
    • 微信支付技术助手
      微信支付技术助手
      02-19回复Hello Detto

      您好,您的跟时间有关的字段都没有写。

      02-19
      回复
    • Hello Detto
      Hello Detto
      02-19回复微信支付技术助手


      按照官方文档写的参数,难道是type为2或DATETYPE FIX_TERM时,begin_timestamp和end_timestamp也要写吗?如果写的话,这两个冗余字段应该是什么值呢?

      02-19
      回复
    • Hello Detto
      Hello Detto
      02-19回复微信支付技术助手

      其他参数一模一样,fixed_begin_term 参数为 1 就可以请求成功,但是为 0 就不行

      02-19
      回复
    • 微信支付技术助手
      微信支付技术助手
      02-19回复Hello Detto

      您好,首先您要明白,不管是何种类型,他都有开始结束时间,这是必传字段,你选择2,就是在开始结束时间里面做文章,请仔细阅读文档。

      02-19
      回复
    查看更多(5)