Skip to content

Loading…

verifyTransaction method failure block always gets called for Sandbox receipts #1

Closed
mrakowski opened this Issue · 2 comments

2 participants

@mrakowski

Using the verifyTransaction example from the readme results in the failure block always being called due to receiving a content type of text/plain from the Apple receipt server.

This is the error I get in the failure block of verifyTransaction:

Error -1016 (Expected content type {(
"text/json",
"application/json",
"text/javascript"
)}, got text/plain)

Could the http client in CargoBay be made less strict so that it can accept a text/plain response? Seems like the json from Apple may be valid but doesn't have the correct header.

Only tested this in the Sandbox environment so maybe it's not an issue in production.

@mattt
Owner

Oh geez. Apple.... Y U NO send the right content type? Will fix right away.

@mattt mattt added a commit that referenced this issue
@mattt [Issue #1] Adding text/plain as an acceptable content type for JSON, …
…because Apple is doing it wrong
d09522a
@mattt
Owner

Fixed in d09522a. Thanks for pointing this out to me.

@mattt mattt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.