【问题标题】:Why my PassBook isn't valid or outdate?为什么我的 PassBook 无效或过期?
【发布时间】:2014-11-25 14:33:27
【问题描述】:

我在 rails 中使用 this gem 生成了一本存折,它看到它有效,但是当我打开存折 .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"
      }
    ]
  }
}

有什么想法吗?谢谢!

【问题讨论】:

    标签: ruby-on-rails passbook


    【解决方案1】:

    根据Passbook Package Format Reference 中的到期密钥检查expirationDatevoided 密钥。由于您的 JSON 中没有这些,因此它可能由您正在使用的 gem 添加。

    【讨论】:

      猜你喜欢
      • 2013-12-04
      • 2019-07-05
      • 2013-01-08
      • 2019-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-08
      • 1970-01-01
      相关资源
      最近更新 更多