question

brendan avatar image
brendan asked

Validation problems with iTunes receipts

Brendan Vanous
started a topic on Fri, 07 November 2014 at 5:05 PM

I'm having trouble validating receipts for iTunes purchases with ValidateIOSReceipt (http://api.playfab.com/Documentation/Client/method/ValidateIOSReceipt). How can I debug my issue?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Fri, 07 November 2014 at 5:06 PM

First, you should decode the receipt with Apple directly using verifyReceipt on either https://sandbox.itunes.apple.com or https://buy.itunes.apple.com (depending on whether the receipt is from Sandbox or Live). The PlayFab validation API handles receipts from both.

With that, you can then evaluate the error you're getting from PlayFab:

  • InvalidReceipt: Something about the receipt data is incorrect. If it came back correctly from Apple, you should check that the "receipt-data" sent to Apple is the same as the "ReceiptData" sent to PlayFab.

  • ReceiptDoesNotContainInAppItems: The item purchased is not defined as an In-App purchase in iTunes. In-App purchases will show up in an "in_app" subsection of the receipt data.

  • InvalidBundleID: The Bundle ID defined for your title in PlayFab (on the Settings page of the Game Manager) needs to match your game's Bundle ID in iTunes (usually something like "com.company_name.app_name").

  • ReceiptContainsMultipleInAppItems: A receipt should only contain one In-App purchase.

  • ReceiptAlreadyUsed: PlayFab tracks receipt usage, to ensure that your title cannot be hit with a "replay" attack (where players re-send an already used receipt, to get the item multiple times). You'll need to generate a new receipt for the test.

Brendan


15 Comments
Brendan Vanous said on Fri, 07 November 2014 at 5:06 PM

First, you should decode the receipt with Apple directly using verifyReceipt on either https://sandbox.itunes.apple.com or https://buy.itunes.apple.com (depending on whether the receipt is from Sandbox or Live). The PlayFab validation API handles receipts from both.

With that, you can then evaluate the error you're getting from PlayFab:

  • InvalidReceipt: Something about the receipt data is incorrect. If it came back correctly from Apple, you should check that the "receipt-data" sent to Apple is the same as the "ReceiptData" sent to PlayFab.

  • ReceiptDoesNotContainInAppItems: The item purchased is not defined as an In-App purchase in iTunes. In-App purchases will show up in an "in_app" subsection of the receipt data.

  • InvalidBundleID: The Bundle ID defined for your title in PlayFab (on the Settings page of the Game Manager) needs to match your game's Bundle ID in iTunes (usually something like "com.company_name.app_name").

  • ReceiptContainsMultipleInAppItems: A receipt should only contain one In-App purchase.

  • ReceiptAlreadyUsed: PlayFab tracks receipt usage, to ensure that your title cannot be hit with a "replay" attack (where players re-send an already used receipt, to get the item multiple times). You'll need to generate a new receipt for the test.

Brendan


jmeador said on Tue, 21 April 2015 at 4:43 PM

I have a question about the ReceiptContainsMultipleInAppItems error. With the iOS 7 and later receipts, all IAPs are included in the receipt, so it's likely that we will be submitting a receipt with multiple items, including some already processed by PlayFab. What's the proper way to use the iOS receipt (found at [[NSBundle mainBundle] appStoreReceiptURL])?


Brendan Vanous said on Thu, 30 April 2015 at 11:38 AM

Thanks for your patience. We have now update for full support of the iOS7+ receipt format, so you don't have to do anything extra to work with these receipts.

Brendan


dragongamestudio said on Wed, 02 September 2015 at 1:30 AM

hello brendan,

how can playfab determine which one is sandbox or live?

because when i send the receipt that i get from sandbox, i always get error from playfab that saying

its not a valid receipt from

"iTunes validation result: 21002 (InvalidReceiptData) from https://buy.itunes.apple.com/verifyReceipt"

here my POST request

{
  "ReceiptData": "<7b0a0922 7369676e 61747572 6522203d 2022416b 66454366 7277644f 6f4d5245 4c762f4b 75785073 6370576f 4248617a 734a5662 57556a74 47626962 57504861 74677473 68667976 4e755938 4d324e72 38454356 6c4a6d30 48706a4c 54523851 78466169 364e7534 2b36346c 686d4365 68653678 39394c73 46503763 72734170 454d3275 3869307a 39686e6c 78786342 325a7550 77707850 414e5377 38775656 4e576647 76457144 37764a30 6570466d 2b45646b 45315062 45357536 615a4141 4144567a 43434131 4d776767 49376f41 4d434151 49434342 7570342b 5041686d 2f4c4d41 30474353 71475349 62334451 45424251 55414d48 3878437a 414a4267 4e564241 5954416c 56544d52 4d774551 59445651 514b4441 70426348 42735a53 424a626d 4d754d53 59774a41 59445651 514c4442 31426348 42735a53 42445a58 4a306157 5a705932 46306157 39754945 46316447 6876636d 6c306554 457a4d44 45474131 55454177 77715158 42776247 55676156 5231626d 567a4946 4e306233 4a6c4945 4e6c636e 52705a6d 6c6a5958 52706232 34675158 56306147 39796158 52354d42 34584454 45304d44 59774e7a 41774d44 49794d56 6f584454 45324d44 55784f44 45344d7a 457a4d46 6f775a44 456a4d43 45474131 55454177 77615548 56795932 68686332 56535a57 4e6c6158 42305132 56796447 6c6d6157 4e686447 5578477a 415a4267 4e564241 734d456b 46776347 786c4947 6c556457 356c6379 42546447 39795a54 45544d42 45474131 55454367 774b5158 42776247 55675357 356a4c6a 454c4d41 6b474131 55454268 4d435656 4d77675a 38774451 594a4b6f 5a496876 634e4151 45424251 41446759 30414d49 474a416f 4742414d 6d544575 4c676a69 6d4c7752 4a787931 6f456630 6573554e 44564549 65367744 736e6e61 6c313468 4e427431 76313935 58366e39 33594f37 6769336f 72505375 78394435 3534536b 4d702b53 61796738 346c5463 33363255 746d594c 70576e62 33346e71 79477839 4b425654 79354f47 56346c6a 45314f77 432b6f54 6e524d2b 514c5243 6d654e78 4d62505a 68533437 542b655a 74444568 56423975 736b332b 4a4d3243 6f676677 6f374167 4d424141 476a636a 42774d42 30474131 55644467 51574242 534a6145 654e7571 39446636 5a664e36 3846652b 49327532 32737344 414d4267 4e564852 4d424166 3845416a 41414d42 38474131 55644977 51594d42 61414644 5964364f 4b646774 4942474c 55796177 37585177 75525745 4d364d41 34474131 55644477 45422f77 51454177 49486744 41514267 6f71686b 69473932 4e6b4267 55424241 49464144 414e4267 6b71686b 69473977 30424151 55464141 4f434151 45416561 4a563255 35317278 66637141 41653543 322f6645 57384b55 6c34694f 346c4d75 7461374e 36587a50 31705a49 7a314e6b 6b437449 49776579 4e6a3555 5259484b 2b486a52 4b535539 524c6775 4e6c306e 6b667871 4f62694d 636b7752 75644b53 7136394e 496e725a 79434436 3652344b 37376e62 396c4d54 41425353 596c734b 74386f4e 746c6867 522f316b 6a535352 5163486b 74734463 53695147 4b4d646b 536c7034 41795866 37766e48 50426534 79437759 56325070 534e3034 6b626f69 4a337042 6c787347 77562f5a 6c4c3236 4d327565 59484b59 43755868 64714677 7856676d 35326833 6f654a4f 4f742f76 59344563 51713765 71486d36 6d30335a 39623750 527a594d 324b4758 48446d4f 4d6b3776 4470654d 566c4c44 50534759 7a312b55 33734478 4a7a6562 53706261 4a6d5437 696d7a55 4b666767 45593778 78663463 7a664830 796a3577 4e7a5347 544f7651 3d3d223b 0a092270 75726368 6173652d 696e666f 22203d20 2265776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7463484e 30496941 39494349 794d4445 314c5441 354c5441 78494449 794f6a51 324f6a45 35494546 745a584a 70593245 76544739 7a583046 755a3256 735a584d 694f776f 4a496e56 75615846 315a5331 705a4756 7564476c 6d615756 79496941 3949434a 6d4e4451 34597a52 695a6a6b 305a6a6c 6d4f474e 6d4f5467 784d446b 324d474d 314f5449 78596a42 6d595441 7a4f545a 695a4441 7a496a73 4b43534a 76636d6c 6e615735 68624331 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4449 7a4d7a63 774f4349 3743676b 69596e5a 79637949 67505341 694d5334 77496a73 4b43534a 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4449 7a4d7a63 774f4349 3743676b 69635856 68626e52 7064486b 69494430 67496a45 694f776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 784e7a49 334e7a6b 354d7a67 694f776f 4a496e56 75615846 315a5331 325a5735 6b623349 74615752 6c626e52 705a6d6c 6c636949 67505341 69525559 774e6b4e 45517a67 744d5445 354e7930 304e5464 474c546b 314e5555 744d7a42 444f5463 304d3051 334e6a51 35496a73 4b43534a 77636d39 6b64574e 304c576c 6b496941 3949434a 70595842 66596d46 7361575a 705a5752 664d4441 34496a73 4b43534a 70644756 744c576c 6b496941 39494349 784d444d 7a4f4441 334d5441 31496a73 4b43534a 69615751 69494430 67496d4e 76625335 6b636d46 6e623235 6e595731 6c633352 315a476c 764c6d4a 6862476c 6d615756 6b643239 795a4764 68625755 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 784e7a49 334e7a6b 354d7a67 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 69494430 67496a49 774d5455 744d446b 744d4449 674d4455 364e4459 364d546b 67525852 6a4c3064 4e564349 3743676b 69634856 79593268 68633255 745a4746 305a5331 77633351 69494430 67496a49 774d5455 744d446b 744d4445 674d6a49 364e4459 364d546b 67515731 6c636d6c 6a595339 4d62334e 66515735 6e5a5778 6c637949 3743676b 6962334a 705a326c 75595777 74634856 79593268 68633255 745a4746 305a5349 67505341 694d6a41 784e5330 774f5330 774d6941 774e546f 304e6a6f 784f5342 4664474d 76523031 55496a73 4b66513d 3d223b0a 0922656e 7669726f 6e6d656e 7422203d 20225361 6e64626f 78223b0a 0922706f 6422203d 20223130 30223b0a 09227369 676e696e 672d7374 61747573 22203d20 2230223b 0a7d>",
  "CurrencyCode": "RM",
  "PurchasePrice": 199
}

Brendan Vanous said on Thu, 03 September 2015 at 12:30 AM

We actually do validation against both sandbox and live - this is necessary, since live titles will still have sandbox receipts sent to them by Apple's test team, as part of validation of updates and new content. So regardless of which environment the receipt is from, if it is valid it will work. The issue is that the receipt data isn't valid. If you send it directly to the verifyReceipt API method that Apple exposes (the one we reference), you'll get the same error. Where did this receipt data come from? Looking at it, it's not even correctly formatted, which implies that whatever source is providing this data is modifying it in some way.

Brendan


dragongamestudio said on Thu, 03 September 2015 at 3:39 AM

that receipt was come from corona sdk with sandbox mode, and i didnt change/modifying anything

and here is my complete result that i got from corona after i did some purchase with sandbox id

--- event.transaction =     userdata: 0x1b906a44
----- state purchased
----- productIdentifier iap_balified_001
----- receipt   <7b0a0922 7369676e 61747572 6522203d 2022416c 6432347a 6c505558 714c4d55 72764765 342f357a 4f76306f 3532752b 2b684245 6d6e5831 694c6947 32483753 38765a4a 4a776f67 74747435 65345050 7a375237 45733955 4b6b426c 49433653 4f702f4b 6e675a66 772f5746 50765868 7459696f 4d475a6f 32396335 47456139 45703633 66305271 37797830 4d6b6f58 65705a49 59534933 6362396e 4b2f7931 68527533 52514559 54355578 514d4866 59434c49 4e794f64 78353237 51474141 4144567a 43434131 4d776767 49376f41 4d434151 49434342 7570342b 5041686d 2f4c4d41 30474353 71475349 62334451 45424251 55414d48 3878437a 414a4267 4e564241 5954416c 56544d52 4d774551 59445651 514b4441 70426348 42735a53 424a626d 4d754d53 59774a41 59445651 514c4442 31426348 42735a53 42445a58 4a306157 5a705932 46306157 39754945 46316447 6876636d 6c306554 457a4d44 45474131 55454177 77715158 42776247 55676156 5231626d 567a4946 4e306233 4a6c4945 4e6c636e 52705a6d 6c6a5958 52706232 34675158 56306147 39796158 52354d42 34584454 45304d44 59774e7a 41774d44 49794d56 6f584454 45324d44 55784f44 45344d7a 457a4d46 6f775a44 456a4d43 45474131 55454177 77615548 56795932 68686332 56535a57 4e6c6158 42305132 56796447 6c6d6157 4e686447 5578477a 415a4267 4e564241 734d456b 46776347 786c4947 6c556457 356c6379 42546447 39795a54 45544d42 45474131 55454367 774b5158 42776247 55675357 356a4c6a 454c4d41 6b474131 55454268 4d435656 4d77675a 38774451 594a4b6f 5a496876 634e4151 45424251 41446759 30414d49 474a416f 4742414d 6d544575 4c676a69 6d4c7752 4a787931 6f456630 6573554e 44564549 65367744 736e6e61 6c313468 4e427431 76313935 58366e39 33594f37 6769336f 72505375 78394435 3534536b 4d702b53 61796738 346c5463 33363255 746d594c 70576e62 33346e71 79477839 4b425654 79354f47 56346c6a 45314f77 432b6f54 6e524d2b 514c5243 6d654e78 4d62505a 68533437 542b655a 74444568 56423975 736b332b 4a4d3243 6f676677 6f374167 4d424141 476a636a 42774d42 30474131 55644467 51574242 534a6145 654e7571 39446636 5a664e36 3846652b 49327532 32737344 414d4267 4e564852 4d424166 3845416a 41414d42 38474131 55644977 51594d42 61414644 5964364f 4b646774 4942474c 55796177 37585177 75525745 4d364d41 34474131 55644477 45422f77 51454177 49486744 41514267 6f71686b 69473932 4e6b4267 55424241 49464144 414e4267 6b71686b 69473977 30424151 55464141 4f434151 45416561 4a563255 35317278 66637141 41653543 322f6645 57384b55 6c34694f 346c4d75 7461374e 36587a50 31705a49 7a314e6b 6b437449 49776579 4e6a3555 5259484b 2b486a52 4b535539 524c6775 4e6c306e 6b667871 4f62694d 636b7752 75644b53 7136394e 496e725a 79434436 3652344b 37376e62 396c4d54 41425353 596c734b 74386f4e 746c6867 522f316b 6a535352 5163486b 74734463 53695147 4b4d646b 536c7034 41795866 37766e48 50426534 79437759 56325070 534e3034 6b626f69 4a337042 6c787347 77562f5a 6c4c3236 4d327565 59484b59 43755868 64714677 7856676d 35326833 6f654a4f 4f742f76 59344563 51713765 71486d36 6d30335a 39623750 527a594d 324b4758 48446d4f 4d6b3776 4470654d 566c4c44 50534759 7a312b55 33734478 4a7a6562 53706261 4a6d5437 696d7a55 4b666767 45593778 78663463 7a664830 796a3577 4e7a5347 544f7651 3d3d223b 0a092270 75726368 6173652d 696e666f 22203d20 2265776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7463484e 30496941 39494349 794d4445 314c5441 354c5441 7a494441 7a4f6a4d 794f6a51 79494546 745a584a 70593245 76544739 7a583046 755a3256 735a584d 694f776f 4a496e56 75615846 315a5331 705a4756 7564476c 6d615756 79496941 3949434a 6d4e4451 34597a52 695a6a6b 305a6a6c 6d4f474e 6d4f5467 784d446b 324d474d 314f5449 78596a42 6d595441 7a4f545a 695a4441 7a496a73 4b43534a 76636d6c 6e615735 68624331 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4451 334d6a63 354e4349 3743676b 69596e5a 79637949 67505341 694d5334 77496a73 4b43534a 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4451 334d6a63 354e4349 3743676b 69635856 68626e52 7064486b 69494430 67496a45 694f776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 794e7a59 7a4e6a49 7a4d5449 694f776f 4a496e56 75615846 315a5331 325a5735 6b623349 74615752 6c626e52 705a6d6c 6c636949 67505341 69525559 774e6b4e 45517a67 744d5445 354e7930 304e5464 474c546b 314e5555 744d7a42 444f5463 304d3051 334e6a51 35496a73 4b43534a 77636d39 6b64574e 304c576c 6b496941 3949434a 70595842 66596d46 7361575a 705a5752 664d4441 78496a73 4b43534a 70644756 744c576c 6b496941 39494349 784d444d 7a4f4441 324d5445 30496a73 4b43534a 69615751 69494430 67496d4e 76625335 6b636d46 6e623235 6e595731 6c633352 315a476c 764c6d4a 6862476c 6d615756 6b643239 795a4764 68625755 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 794e7a59 7a4e6a49 7a4d5449 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 69494430 67496a49 774d5455 744d446b 744d444d 674d5441 364d7a49 364e4449 67525852 6a4c3064 4e564349 3743676b 69634856 79593268 68633255 745a4746 305a5331 77633351 69494430 67496a49 774d5455 744d446b 744d444d 674d444d 364d7a49 364e4449 67515731 6c636d6c 6a595339 4d62334e 66515735 6e5a5778 6c637949 3743676b 6962334a 705a326c 75595777 74634856 79593268 68633255 745a4746 305a5349 67505341 694d6a41 784e5330 774f5330 774d7941 784d446f 7a4d6a6f 304d6942 4664474d 76523031 55496a73 4b66513d 3d223b0a 0922656e 7669726f 6e6d656e 7422203d 20225361 6e64626f 78223b0a 0922706f 6422203d 20223130 30223b0a 09227369 676e696e 672d7374 61747573 22203d20 2230223b 0a7d>
----- signature nil
----- identifier    1000000170472794
----- date  2015-09-03 10:32:42 +0000
----- originalReceipt   nil
----- originalIdentifier    nil
----- originalDate  nil
----- errorType none
----- errorString   nil

and here is the result that i got from apple with POST method

{
"receipt":{"original_purchase_date_pst":"2015-09-03 03:32:42 America/Los_Angeles", "purchase_date_ms":"1441276362312", "unique_identifier":"f448c4bf94f9f8cf9810960c5921b0fa0396bd03", "original_transaction_id":"1000000170472794", "bvrs":"1.0", "transaction_id":"1000000170472794", "quantity":"1", "unique_vendor_identifier":"EF06CDC8-1197-457F-955E-30C9743D7649", "item_id":"1033806114", "product_id":"iap_balified_001", "purchase_date":"2015-09-03 10:32:42 Etc/GMT", "original_purchase_date":"2015-09-03 10:32:42 Etc/GMT", "purchase_date_pst":"2015-09-03 03:32:42 America/Los_Angeles", "bid":"com.dragongamestudio.balifiedwordgame", "original_purchase_date_ms":"1441276362312"}, "status":0}

which i sent to "https://sandbox.itunes.apple.com/verifyReceipt" not to "https://buy.itunes.apple.com/verifyReceipt"

like what you mean in this forum

First, you should decode the receipt with Apple directly using verifyReceipt on either https://sandbox.itunes.apple.com or https://buy.itunes.apple.com (depending on whether the receipt is from Sandbox or Live). The PlayFab validation API handles receipts from both.
but i always get error like playfab always
validate my receipt to "https://buy.itunes.apple.com" even the receipt that i send was from sandbox id,

that

thank you

Chandra


Brendan Vanous said on Thu, 03 September 2015 at 2:29 PM

So the receipt in your post is actually the hex encoding of the full receipt data. Converting it to a string yields this:

{

 "signature" = "Ald24zlPUXqLMUrvGe4/5zOv0o52u++hBEmnX1iLiG2H7S8vZJJwogttt5e4PPz7R7Es9UKkBlIC6SOp/KngZfw/WFPvXhtYioMGZo29c5GEa9Ep63f0Rq7yx0MkoXepZIYSI3cb9nK/y1hRu3RQEYT5UxQMHfYCLINyOdx527QGAAADVzCCA1MwggI7oAMCAQICCBup4+PAhm/LMA0GCSqGSIb3DQEBBQUAMH8xCzAJBgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSYwJAYDVQQLDB1BcHBsZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEzMDEGA1UEAwwqQXBwbGUgaVR1bmVzIFN0b3JlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTE0MDYwNzA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lmOGNmOTgxMDk2MGM1OTIxYjBmYTAzOTZiZDAzIjsKCSJvcmlnaW5hbC10cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDE3MDQ3Mjc5NCI7CgkiYnZycyIgPSAiMS4wIjsKCSJ0cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDE3MDQ3Mjc5NCI7CgkicXVhbnRpdHkiID0gIjEiOwoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUtbXMiID0gIjE0NDEyNzYzNjIzMTIiOwoJInVuaXF1ZS12ZW5kb3ItaWRlbnRpZmllciIgPSAiRUYwNkNEQzgtMTE5Ny00NTdGLTk1NUUtMzBDOTc0M0Q3NjQ5IjsKCSJwcm9kdWN0LWlkIiA9ICJpYXBfYmFsaWZpZWRfMDAxIjsKCSJpdGVtLWlkIiA9ICIxMDMzODA2MTE0IjsKCSJiaWQiID0gImNvbS5kcmFnb25nYW1lc3R1ZGlvLmJhbGlmaWVkd29yZGdhbWUiOwoJInB1cmNoYXNlLWRhdGUtbXMiID0gIjE0NDEyNzYzNjIzMTIiOwoJInB1cmNoYXNlLWRhdGUiID0gIjIwMTUtMDktMDMgMTA6MzI6NDIgRXRjL0dNVCI7CgkicHVyY2hhc2UtZGF0ZS1wc3QiID0gIjIwMTUtMDktMDMgMDM6MzI6NDIgQW1lcmljYS9Mb3NfQW5nZWxlcyI7Cgkib3JpZ2luYWwtcHVyY2hhc2UtZGF0ZSIgPSAiMjAxNS0wOS0wMyAxMDozMjo0MiBFdGMvR01UIjsKfQ==";

 "environment" = "Sandbox";

 "pod" = "100";

 "signing-status" = "0";

}

The portion which we consider the receipt is the purchase-info, which is a base64-encoded representation of the receipt. This should be passed in as the receipt when calling receipt validation in PlayFab. Converting it from base64 gets us this:

{

 "original-purchase-date-pst" = "2015-09-03 03:32:42 America/Los_Angeles";

 "unique-identifier" = "f448c4bf94f9f8cf9810960c5921b0fa0396bd03";

 "original-transaction-id" = "1000000170472794";

 "bvrs" = "1.0";

 "transaction-id" = "1000000170472794";

 "quantity" = "1";

 "original-purchase-date-ms" = "1441276362312";

 "unique-vendor-identifier" = "EF06CDC8-1197-457F-955E-30C9743D7649";

 "product-id" = "iap_balified_001";

 "item-id" = "1033806114";

 "bid" = "com.dragongamestudio.balifiedwordgame";

 "purchase-date-ms" = "1441276362312";

 "purchase-date" = "2015-09-03 10:32:42 Etc/GMT";

 "purchase-date-pst" = "2015-09-03 03:32:42 America/Los_Angeles";

 "original-purchase-date" = "2015-09-03 10:32:42 Etc/GMT";

}

Which does match the result you got from Apple. Does that make sense?

Brendan


dragongamestudio said on Thu, 03 September 2015 at 4:00 PM

you mean i have to send

"purchase-info" = "ewoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUtcHN0IiA9ICIyMDE1LTA5LTAzIDAzOjMyOjQyIEFtZXJpY2EvTG9zX0FuZ2VsZXMiOwoJInVuaXF1ZS1pZGVudGlmaWVyIiA9ICJmNDQ4YzRiZjk0ZjlmOGNmOTgxMDk2MGM1OTIxYjBmYTAzOTZiZDAzIjsKCSJvcmlnaW5hbC10cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDE3MDQ3Mjc5NCI7CgkiYnZycyIgPSAiMS4wIjsKCSJ0cmFuc2FjdGlvbi1pZCIgPSAiMTAwMDAwMDE3MDQ3Mjc5NCI7CgkicXVhbnRpdHkiID0gIjEiOwoJIm9yaWdpbmFsLXB1cmNoYXNlLWRhdGUtbXMiID0gIjE0NDEyNzYzNjIzMTIiOwoJInVuaXF1ZS12ZW5kb3ItaWRlbnRpZmllciIgPSAiRUYwNkNEQzgtMTE5Ny00NTdGLTk1NUUtMzBDOTc0M0Q3NjQ5IjsKCSJwcm9kdWN0LWlkIiA9ICJpYXBfYmFsaWZpZWRfMDAxIjsKCSJpdGVtLWlkIiA9ICIxMDMzODA2MTE0IjsKCSJiaWQiID0gImNvbS5kcmFnb25nYW1lc3R1ZGlvLmJhbGlmaWVkd29yZGdhbWUiOwoJInB1cmNoYXNlLWRhdGUtbXMiID0gIjE0NDEyNzYzNjIzMTIiOwoJInB1cmNoYXNlLWRhdGUiID0gIjIwMTUtMDktMDMgMTA6MzI6NDIgRXRjL0dNVCI7CgkicHVyY2hhc2UtZGF0ZS1wc3QiID0gIjIwMTUtMDktMDMgMDM6MzI6NDIgQW1lcmljYS9Mb3NfQW5nZWxlcyI7Cgkib3JpZ2luYWwtcHVyY2hhc2UtZGF0ZSIgPSAiMjAxNS0wOS0wMyAxMDozMjo0MiBFdGMvR01UIjsKfQ=="

to playfab right?

okay, i will try, thank you :)


Brendan Vanous said on Thu, 03 September 2015 at 4:15 PM

Hmm... actually, I get a number format exception from Apple on that one. Can you try this with a fresh receipt?

Brendan


dragongamestudio said on Thu, 03 September 2015 at 7:30 PM

2015-09-04 10:28:10.164 Balified[1416:712699]  --- event.transaction =  userdata: 0x1b68ec94
2015-09-04 10:28:10.165 Balified[1416:712699]  ----- state  purchased
2015-09-04 10:28:10.165 Balified[1416:712699]  ----- productIdentifier  iap_balified_001
2015-09-04 10:28:10.168 Balified[1416:712699]  ----- receipt    <7b0a0922 7369676e 61747572 6522203d 20224172 48387a62 6c57374a 6b314b46 336e7351 58764545 46444348 4a745a53 576e5949 65416870 51646d36 2b787658 37684773 4c45324c 4244374c 62705a75 73474c56 75727268 61592b62 73763066 4c63716e 556e5652 58564261 54442f35 72447066 716b694a 2f466743 7449796c 65597942 51474d67 54724872 4e4c4535 416a4f38 582b394b 34484e7a 2b653536 525a4844 6a453162 65643358 35757037 4b664857 36584d38 5341364e 5a6f4141 4144567a 43434131 4d776767 49376f41 4d434151 49434342 7570342b 5041686d 2f4c4d41 30474353 71475349 62334451 45424251 55414d48 3878437a 414a4267 4e564241 5954416c 56544d52 4d774551 59445651 514b4441 70426348 42735a53 424a626d 4d754d53 59774a41 59445651 514c4442 31426348 42735a53 42445a58 4a306157 5a705932 46306157 39754945 46316447 6876636d 6c306554 457a4d44 45474131 55454177 77715158 42776247 55676156 5231626d 567a4946 4e306233 4a6c4945 4e6c636e 52705a6d 6c6a5958 52706232 34675158 56306147 39796158 52354d42 34584454 45304d44 59774e7a 41774d44 49794d56 6f584454 45324d44 55784f44 45344d7a 457a4d46 6f775a44 456a4d43 45474131 55454177 77615548 56795932 68686332 56535a57 4e6c6158 42305132 56796447 6c6d6157 4e686447 5578477a 415a4267 4e564241 734d456b 46776347 786c4947 6c556457 356c6379 42546447 39795a54 45544d42 45474131 55454367 774b5158 42776247 55675357 356a4c6a 454c4d41 6b474131 55454268 4d435656 4d77675a 38774451 594a4b6f 5a496876 634e4151 45424251 41446759 30414d49 474a416f 4742414d 6d544575 4c676a69 6d4c7752 4a787931 6f456630 6573554e 44564549 65367744 736e6e61 6c313468 4e427431 76313935 58366e39 33594f37 6769336f 72505375 78394435 3534536b 4d702b53 61796738 346c5463 33363255 746d594c 70576e62 33346e71 79477839 4b425654 79354f47 56346c6a 45314f77 432b6f54 6e524d2b 514c5243 6d654e78 4d62505a 68533437 542b655a 74444568 56423975 736b332b 4a4d3243 6f676677 6f374167 4d424141 476a636a 42774d42 30474131 55644467 51574242 534a6145 654e7571 39446636 5a664e36 3846652b 49327532 32737344 414d4267 4e564852 4d424166 3845416a 41414d42 38474131 55644977 51594d42 61414644 5964364f 4b646774 4942474c 55796177 37585177 75525745 4d364d41 34474131 55644477 45422f77 51454177 49486744 41514267 6f71686b 69473932 4e6b4267 55424241 49464144 414e4267 6b71686b 69473977 30424151 55464141 4f434151 45416561 4a563255 35317278 66637141 41653543 322f6645 57384b55 6c34694f 346c4d75 7461374e 36587a50 31705a49 7a314e6b 6b437449 49776579 4e6a3555 5259484b 2b486a52 4b535539 524c6775 4e6c306e 6b667871 4f62694d 636b7752 75644b53 7136394e 496e725a 79434436 3652344b 37376e62 396c4d54 41425353 596c734b 74386f4e 746c6867 522f316b 6a535352 5163486b 74734463 53695147 4b4d646b 536c7034 41795866 37766e48 50426534 79437759 56325070 534e3034 6b626f69 4a337042 6c787347 77562f5a 6c4c3236 4d327565 59484b59 43755868 64714677 7856676d 35326833 6f654a4f 4f742f76 59344563 51713765 71486d36 6d30335a 39623750 527a594d 324b4758 48446d4f 4d6b3776 4470654d 566c4c44 50534759 7a312b55 33734478 4a7a6562 53706261 4a6d5437 696d7a55 4b666767 45593778 78663463 7a664830 796a3577 4e7a5347 544f7651 3d3d223b 0a092270 75726368 6173652d 696e666f 22203d20 2265776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7463484e 30496941 39494349 794d4445 314c5441 354c5441 7a494445 354f6a49 344f6a41 30494546 745a584a 70593245 76544739 7a583046 755a3256 735a584d 694f776f 4a496e56 75615846 315a5331 705a4756 7564476c 6d615756 79496941 3949434a 6d4e4451 34597a52 695a6a6b 305a6a6c 6d4f474e 6d4f5467 784d446b 324d474d 314f5449 78596a42 6d595441 7a4f545a 695a4441 7a496a73 4b43534a 76636d6c 6e615735 68624331 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4455 324e4449 354e4349 3743676b 69596e5a 79637949 67505341 694d5334 77496a73 4b43534a 30636d46 75633246 6a64476c 76626931 705a4349 67505341 694d5441 774d4441 774d4445 334d4455 324e4449 354e4349 3743676b 69635856 68626e52 7064486b 69494430 67496a45 694f776f 4a496d39 79615764 70626d46 734c5842 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 7a4d7a4d 324f4451 774d4445 694f776f 4a496e56 75615846 315a5331 325a5735 6b623349 74615752 6c626e52 705a6d6c 6c636949 67505341 69525559 774e6b4e 45517a67 744d5445 354e7930 304e5464 474c546b 314e5555 744d7a42 444f5463 304d3051 334e6a51 35496a73 4b43534a 77636d39 6b64574e 304c576c 6b496941 3949434a 70595842 66596d46 7361575a 705a5752 664d4441 78496a73 4b43534a 70644756 744c576c 6b496941 39494349 784d444d 7a4f4441 324d5445 30496a73 4b43534a 69615751 69494430 67496d4e 76625335 6b636d46 6e623235 6e595731 6c633352 315a476c 764c6d4a 6862476c 6d615756 6b643239 795a4764 68625755 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 7462584d 69494430 67496a45 304e4445 7a4d7a4d 324f4451 774d4445 694f776f 4a496e42 31636d4e 6f59584e 6c4c5752 68644755 69494430 67496a49 774d5455 744d446b 744d4451 674d4449 364d6a67 364d4451 67525852 6a4c3064 4e564349 3743676b 69634856 79593268 68633255 745a4746 305a5331 77633351 69494430 67496a49 774d5455 744d446b 744d444d 674d546b 364d6a67 364d4451 67515731 6c636d6c 6a595339 4d62334e 66515735 6e5a5778 6c637949 3743676b 6962334a 705a326c 75595777 74634856 79593268 68633255 745a4746 305a5349 67505341 694d6a41 784e5330 774f5330 774e4341 774d6a6f 794f446f 774e4342 4664474d 76523031 55496a73 4b66513d 3d223b0a 0922656e 7669726f 6e6d656e 7422203d 20225361 6e64626f 78223b0a 0922706f 6422203d 20223130 30223b0a 09227369 676e696e 672d7374 61747573 22203d20 2230223b 0a7d>
2015-09-04 10:28:10.177 Balified[1416:712699]  ----- signature  nil
2015-09-04 10:28:10.177 Balified[1416:712699]  ----- identifier 1000000170564294
2015-09-04 10:28:10.178 Balified[1416:712699]  ----- date   2015-09-04 02:28:04 +0000
2015-09-04 10:28:10.179 Balified[1416:712699]  ----- originalReceipt    nil
2015-09-04 10:28:10.179 Balified[1416:712699]  ----- originalIdentifier nil
2015-09-04 10:28:10.180 Balified[1416:712699]  ----- originalDate   nil
2015-09-04 10:28:10.180 Balified[1416:712699]  ----- errorType  none
2015-09-04 10:28:10.181 Balified[1416:712699]  ----- errorString    nil
2015-09-04 10:28:10.393 Balified[1416:712699] preparePostData   b64encode=  ewoJInNpZ25hdHVyZSIgPSAiQXJIOHpibFc3SmsxS0YzbnNRWHZFRUZEQ0hKdFpTV25ZSWVBaHBRZG02K3h2WDdoR3NMRTJMQkQ3TGJwWnVzR0xWdXJyaGFZK2JzdjBmTGNxblVuVlJYVkJhVEQvNXJEcGZxa2lKL0ZnQ3RJeWxlWXlCUUdNZ1RyS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JtRnNMWEIxY21Ob1lYTmxMV1JoZEdVdGJYTWlJRDBnSWpFME5ERXpNek0yT0RRd01ERWlPd29KSW5WdWFYRjFaUzEyWlc1a2IzSXRhV1JsYm5ScFptbGxjaUlnUFNBaVJVWXdOa05FUXpndE1URTVOeTAwTlRkR0xUazFOVVV0TXpCRE9UYzBNMFEzTmpRNUlqc0tDU0p3Y205a2RXTjBMV2xrSWlBOUlDSnBZWEJmWW1Gc2FXWnBaV1JmTURBeElqc0tDU0pwZEdWdExXbGtJaUE5SUNJeE1ETXpPREEyTVRFMElqc0tDU0ppYVdRaUlEMGdJbU52YlM1a2NtRm5iMjVuWVcxbGMzUjFaR2x2TG1KaGJHbG1hV1ZrZDI5eVpHZGhiV1VpT3dvSkluQjFjbU5vWVhObExXUmhkR1V0YlhNaUlEMGdJakUwTkRFek16TTJPRFF3TURFaU93b0pJbkIxY21Ob1lYTmxMV1JoZEdVaUlEMGdJakl3TVRVdE1Ea3RNRFFnTURJNk1qZzZNRFFnUlhSakwwZE5WQ0k3Q2draWNIVnlZMmhoYzJVdFpHRjBaUzF3YzNRaUlEMGdJakl3TVRVdE1Ea3RNRE1nTVRrNk1qZzZNRFFnUVcxbGNtbGpZUzlNYjNOZlFXNW5aV3hsY3lJN0Nna2liM0pwWjJsdVlXd3RjSFZ5WTJoaGMyVXRaR0YwWlNJZ1BTQWlNakF4TlMwd09TMHdOQ0F3TWpveU9Eb3dOQ0JGZEdNdlIwMVVJanNLZlE9PSI7CgkiZW52aXJvbm1lbnQiID0gIlNhbmRib3giOwoJInBvZCIgPSAiMTAwIjsKCSJzaWduaW5nLXN0YXR1cyIgPSAiMCI7Cn0=    
password=   cd41f8cca3594ac89cfb036d632e8ef3
2015-09-04 10:28:11.935 Balified[1416:712699] {
"receipt":{"original_purchase_date_pst":"2015-09-03 19:28:04 America/Los_Angeles", "purchase_date_ms":"1441333684001", "unique_identifier":"f448c4bf94f9f8cf9810960c5921b0fa0396bd03", "original_transaction_id":"1000000170564294", "bvrs":"1.0", "transaction_id":"1000000170564294", "quantity":"1", "unique_vendor_identifier":"EF06CDC8-1197-457F-955E-30C9743D7649", "item_id":"1033806114", "product_id":"iap_balified_001", "purchase_date":"2015-09-04 02:28:04 Etc/GMT", "original_purchase_date":"2015-09-04 02:28:04 Etc/GMT", "purchase_date_pst":"2015-09-03 19:28:04 America/Los_Angeles", "bid":"com.dragongamestudio.balifiedwordgame", "original_purchase_date_ms":"1441333684001"}, "status":0}
2015-09-04 10:28:11.937 Balified[1416:712699] validateReceiptListener   {
"receipt":{"original_purchase_date_pst":"2015-09-03 19:28:04 America/Los_Angeles", "purchase_date_ms":"1441333684001", "unique_identifier":"f448c4bf94f9f8cf9810960c5921b0fa0396bd03", "original_transaction_id":"1000000170564294", "bvrs":"1.0", "transaction_id":"1000000170564294", "quantity":"1", "unique_vendor_identifier":"EF06CDC8-1197-457F-955E-30C9743D7649", "item_id":"1033806114", "product_id":"iap_balified_001", "purchase_date":"2015-09-04 02:28:04 Etc/GMT", "original_purchase_date":"2015-09-04 02:28:04 Etc/GMT", "purchase_date_pst":"2015-09-03 19:28:04 America/Los_Angeles", "bid":"com.dragongamestudio.balifiedwordgame", "original_purchase_date_ms":"1441333684001"}, "status":0}
2015-09-04 10:28:11.938 Balified[1416:712699] validateReceiptListener   0
2015-09-04 10:28:11.938 Balified[1416:712699] validateReceiptListener   No Error
2015-09-04 10:28:11.938 Balified[1416:712699] validateReceiptListener   table: 0x17594870

this is new receipt, and yes i will try with new receipt


dragongamestudio said on Thu, 03 September 2015 at 7:40 PM

hai, thanks, now it works after i decode it

and i got result from playfab

    {
        "code": 200,
        "status": "OK",
        "data":
        {
        }
    }

dragongamestudio said on Thu, 03 September 2015 at 8:18 PM

im sorry one more question, is cloudscript support this validation fot android and IOS?


Brendan Vanous said on Thu, 03 September 2015 at 9:06 PM

Excellent - glad to hear this is working for you, now.

For Cloud Script, what is the scenario you have in mind? Right now, we don't support Client API calls from Cloud Script, but that's because they shouldn't be necessary. Receipt validation in our service works like so:

  • You send us the receipt

  • We confirm that it has never been used before and that it is valid

  • We take the item from your catalog matching the item specified in the receipt (Product ID) and put it in the player's inventory

That way, a player can only get the things for which they have valid receipts - it's all secure.

Brendan


dragongamestudio said on Thu, 03 September 2015 at 11:19 PM

you mean, i just need to send the decoded receipt, and the item will be automatically added into the player inventory?

we have scenario like promotion that we want to change the price for premium member or the amount of coins that player will get after player bought the IAP, but we dont want player have to update their application to get the promo.

and since once our application approved by apple we cannot edit the IAP, so we decide to have some IAP with different price and we only need to change the IAP code in playfab catalog.
and with that we hope we can change the price and ammount of the coin easly from playfab only, and not change it in itunes

thank you

Chandra


Brendan Vanous said on Fri, 04 September 2015 at 12:38 AM

Correct - the design is to ensure a complete transaction, based upon the receipt. So long as you've configured your catalog with the items associated with the products in the receipts, you should be fine.

For your promotion, the thing to understand is that Apple requires that all real money purchases take place using their system - there's no getting around that. However, you can sell just your virtual currency for real money, and sell everything else in your game for virtual currency. That gives you a lot more control over how you manage the cost of items in your game. You could, for example, set up Stores in PlayFab with discount prices for various purposes, and present those to users based upon whatever criteria you set.

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ah@portalone.com avatar image
ah@portalone.com answered

@Brendan We face issues with the ReceiptAlreadyUsed scenario (while testing it in the sandbox or testflight environment)

You are mentioning receipt regeneration, can you please bring more light to it? How can I regenerate the receipt as this is the info I've got from the Apple?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.