question

Useong Kim avatar image
Useong Kim asked

Issue with Google Play Purchase

Hello, When I'm using [PlayFabClientAPI.ValidateGooglePlayPurchase], sometimes client can't get a result. but on dashboard of playfab, it shows that receipt and items are succesfully delivered. Is there an any other case like this? How can i fix it?

Here's the script I'm talking about.

public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
{


    ...Script...




    PlayFabClientAPI.ValidateGooglePlayPurchase(new ValidateGooglePlayPurchaseRequest()
    {
        // Pass in currency code in ISO format
        CurrencyCode = e.purchasedProduct.metadata.isoCurrencyCode,
        // Convert and set Purchase price
        PurchasePrice = (uint)(e.purchasedProduct.metadata.localizedPrice * 100),
        // Pass in the receipt
        ReceiptJson = googleReceipt.PayloadData.json,
        // Pass in the signature
        Signature = googleReceipt.PayloadData.signature
    },
    result =>
    {
        Debug.Log("Validation successful!");
    },
    error =>
    {
        Debug.Log("Validation failed: " + error.GenerateErrorReport());
    });
}
apis
10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Do you mean you can’t log the success messages on Unity’s console window? If the dashboard shows that receipt and items are successfully delivered, PlayFab should work fine. Please check your Unity’s console window, does the [Collapse] be selected? If it is selected, the console window will show only the first instance of recurring messages. If you meet any other issue when you request these items via PlayFab API, please feel free to let us know.

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.