0

Pass via Mail をウォレットに正常に追加しました。ウォレット アプリにパスが表示されますが、パスの裏面を引っ張って更新すると、更新されたパスが表示されません。ログは次のとおりです。

passd[119] <Warning>: Verifying structure and signature for pass pass.com.test.pass/‎1
passd[119] <Warning>: Signature validation: succeeded
passd[119] <Warning>: Generating POST request with URL <my_https_url/api/PassRegistration/v1/devices/70e435342e38df4e4346e779c6dff6e3/registrations/pass.com.test.pass/%25E2%2580%258E1>
passd[119] <Warning>: Request contains header field <Authorization: ApplePass my_token>
passd[119] <Warning>: Request contains body dictionary {
        pushToken = 93b5d5cxxxxxxxxxxxxxxxxxxxxxxxxxxx_similar;
    }
passd[119] <Warning>: Register task (for device 70e435342e38df4e4346e779c6dff6e3, pass type pass.com.test.pass, serial number ‎1; with web service url my_https_url/api/PassRegistration/) got response with code 201

passd[119] <Warning>: Generating GET request with URL <my_https_url/api/PassRegistration/v1/devices/70e435342e38df4e4346e779c6dff6e3/registrations/pass.com.test.pass>
passd[119] <Warning>: Get serial #s task (for device 70e435342e38df4e4346e779c6dff6e3, pass type pass.com.test.pass, last updated (null); with web service url my_https_url/api/PassRegistration/) got response with code 200
passd[119] <Warning>: Get serial numbers task completed with update tag 1459943482, serial numbers (
        1
    )
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_urlapi/PassRegistration/) got response with code 200
passd[119] <Warning>: Verifying structure and signature for pass pass.com.test.pass/1
passd[119] <Warning>: Signature validation: succeeded
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_url/api/PassRegistration/) encountered error: Requested serial number ‎1, received serial number 1
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_url/api/PassRegistration/) will retry after 60 seconds

私のパスの一部は次のようになります。

 "storeCard": {
    "headerFields": [
      {
        "key": "lessons",
        "label": "Points",
        "value": "200"
      }
    ],

更新 Web サービス呼び出しで、同じパスをバイナリ形式で渡しましたが、ポイント値は 500 です。期待される出力は、ポイントが 200 ではなく 500 として表示されることです。リフレッシュが完了すると、 「パスを更新できませんでした」というメッセージが表示されます。IOS 9.2.1 を搭載した iPhone4s でテストしています。

私が参照した: https://github.com/yuchaoonline/ytoo.service/blob/master/dotnet-passbook-master/Passbook.Sample.Web/Controllers/PassRegistrationController.cs

メソッドBinaryFormatter()が機能しなかったので、 https://github.com/horizo​​n-institute/AffectiveComputingCloud/blob/master/AffectiveComputingCloud/RestAPIWebRole/Formatter/BinaryMediaTypeFormatter.cs からの参照に従って変更しましBinaryMediaTypeFormatter()

次のヘッダーパラメーターを試しました:

response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.apple.pkpass");
response.Content.Headers.LastModified = DateTime.UtcNow;
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment");
response.Content.Headers.ContentDisposition.FileName = "pass.pkpass";
response.Content.Headers.ContentDisposition.Name = "pass.pkpass";
4

1 に答える 1

1

There seems multiple issues like wrong content-type. Changing content type to application/vnd.apple.pkpass and passing updated pass with updated date fixed the issue.

于 2016-04-12T06:56:53.747 に答える