Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 为什么我的存折无效或过期?_Ruby On Rails_Passbook - Fatal编程技术网

Ruby on rails 为什么我的存折无效或过期?

Ruby on rails 为什么我的存折无效或过期?,ruby-on-rails,passbook,Ruby On Rails,Passbook,我在rails中使用生成了一个passbook,它可以正常工作,但当我打开passbook.pkpass文件时,我看到以下消息: 它是西班牙语的,但基本上说这张卡已经失效了 这是我的JSON: { "formatVersion" : 1, "passTypeIdentifier" : "{MY PASS ID HERE}", "serialNumber" : "E5982H-I2", "teamIdentifier" : "{MY TEAM ID HERE}", "webSe

我在rails中使用生成了一个passbook,它可以正常工作,但当我打开passbook.pkpass文件时,我看到以下消息:

它是西班牙语的,但基本上说这张卡已经失效了

这是我的JSON:

{
  "formatVersion" : 1,
  "passTypeIdentifier" : "{MY PASS ID HERE}",
  "serialNumber" : "E5982H-I2",
  "teamIdentifier" : "{MY TEAM ID HERE}",
  "webServiceURL" : "https://example.com/passes/",
  "authenticationToken" : "vxwxd7J8AlNNFPS8k0a0FfUFtq0ewzFdc",
  "barcode" : {
    "message" : "123456789",
    "format" : "PKBarcodeFormatPDF417",
    "messageEncoding" : "iso-8859-1"
  },
  "locations" : [
    {
      "longitude" : -122.3748889,
      "latitude" : 37.6189722
    },
    {
      "longitude" : -122.03118,
      "latitude" : 37.33182
    }
  ],
  "organizationName" : "CROCANTICKETS SL",
  "description" : "Paw Planet Coupon",
  "logoText" : "Paw Planet",
  "foregroundColor" : "rgb(255, 255, 255)",
  "backgroundColor" : "#FF4B33",
  "coupon" : {
    "primaryFields" : [
      {
        "key" : "offer",
        "label" : "Any premium dog food",
        "value" : "20% off"
      }
    ],
    "auxiliaryFields" : [
      {
        "key" : "expires",
        "label" : "EXPIRES",
        "value" : "2016-04-24T10:00-05:00",
        "isRelative" : true,
        "dateStyle" : "PKDateStyleShort"
      }
    ]
  }
}

有什么想法吗?谢谢

根据中的过期键检查过期日期和作废键。由于您的JSON中没有这些内容,因此您正在使用的gem可能会添加这些内容