question

MLov avatar image
MLov asked

ValidateIOSReceipt works in sandbox but not in production

Hello,

We have a problem with iOs purchase validation, but we have any clue to resolve it. It works fine in sandbox env, but it didn't work on production env.

We note some OnPlayfabValidationError with:
ErrorMessage: HTTP/1.1 400 Bad Request ApiEndPoint: /Client/ValidateIOSReceipt HttpCode: 400 HttpStatus: BadRequest

But not errors triggered by the client.

In attach our codecapture.png

capture.png (317.6 KiB)
10 |1200

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

Xiao Zha avatar image
Xiao Zha answered

Since you mention the client doesn’t trigger any errors, where you get the error message? In addition, you can try to add some breakpoints in your code to check if the receipt has been obtained in production environment. If the receipt can be obtained, are there any messages returned by the validate IOS Receipt API?

10 |1200

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

MLov avatar image
MLov answered

Sorry about the late response; I try to capture the event from Data Explorer, but is not working. I got stuck on "Loading."


Anyway: for every error from the client side, we send a custom event to Playfab, so we are able to track every problem on the client side.

As you see in our code, at the end of ValidateIOSReceipt we have a Debug.LogError to track validation failure.

But the effect is that on sandbox environment always is working fine, but in production we don't see any error related to that and we don't see the purchase tracking.

Only we got are that message "OnPlayfabValidationError" 400 Bad Request on play stream. I suppose is something generate by the system.

I cannot put a breakpoint in production environment. What I do is publish in production a new version with some kind of log and sent it to playfab before the validation. But it is a very long process, I need to pass throw Apple for review and tooks days.

Any change to have more insight about the cause of that "bad request"? It seems to me like a bad call to an API for some parameters maybe?

Did you see something wrong with our code? Have you some links to examples of Unity IAP and validation to try to compare solutions?

thanks

1 comment
10 |1200

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

Xiao Zha avatar image Xiao Zha commented ·

Since the Data Explorer has been repaired, do you have any log message for us to research.

0 Likes 0 ·

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]