2016-04-06 23 views
0

Mail to wallet üzerinden başarıyla geçiş ekledim. Cüzdan uygulamasında Geçişi görüyorum, ancak geçişin arka tarafındaki yenilemeyi yaptığımda güncellenmiş geçişi göremiyorum. İşte günlükleri:PK Geçti Cüzdan uygulamasında güncellemeyi yenilemek için çekin

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 

Geçmişim bazıları kısmı aşağıdaki gibidir: Beklenen çıkışı

güncelleme web hizmeti görüşmesinde
"storeCard": { 
    "headerFields": [ 
     { 
     "key": "lessons", 
     "label": "Points", 
     "value": "200" 
     } 
    ], 

, ben 500'e puan değeri ikili formatta fakat aynı geçiş geçti 200 yerine 500 olarak Puanları göstermeye. Yenileme bittikten sonra "Geçiş güncellenemedi" iletisini görüyorum. IPhone4'lerde IOS 9.2.1 ile test ediyorum.

Ben anılacaktır: https://github.com/yuchaoonline/ytoo.service/blob/master/dotnet-passbook-master/Passbook.Sample.Web/Controllers/PassRegistrationController.cs

aşağıdaki başlık parametreleri ile çalıştı ben https://github.com/horizon-institute/AffectiveComputingCloud/blob/master/AffectiveComputingCloud/RestAPIWebRole/Formatter/BinaryMediaTypeFormatter.cs

gelen referans uyarınca BinaryMediaTypeFormatter() değiştirildi BinaryFormatter() yüzden işe yaramadı yöntemi:

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"; 
+0

Konsol çıktısının son bildirimi, web hizmetinizin yeni bir .pkpass paketi ile yanıt vermediğini bildiriyor. "İkili formatta cevap" dediğinizde, son çağrıya cevap olarak ne gönderiyorsunuz? – PassKit

+0

ÜretilenPass bayt dizisini şu şekilde yanıtlıyorum: response.Content = new ObjectContent (createdPass, new BinaryMediaTypeFormatter()); – bunty

+0

Başlıkları nasıl ayarlıyorsunuz? - içerik türün nedir? – PassKit

cevap

1

birden görünüyor Yanlış içerik türü gibi sorunlar. İçerik türünü application/vnd.apple.pkpass olarak değiştirmek ve güncelleştirilmiş geçmişe aktarma geçmişini geçirmek sorunu çözdü.

+0

neyin yanlış olduğunu listeleyebilir misiniz .. veya güncelleme yapan api denetleyicisinin kodunu paylaşabilirsiniz? –

İlgili konular