question

Sarah Zhang avatar image
Sarah Zhang asked

Processing Payment Through Steam: PurchaseInitializationFailure

@rugbugredfern Apologies for the delayed reply. Since the system reasons, we didn't answer the question: Processing Payment Through Steam: PurchaseInitializationFailure. We will discuss the question in this thread.

Please discuss the question in this thread.

The original question:

I'm trying to use PlayFab to make a purchase through Steam, but am getting an error: "PurchaseInitializationFailure".

The StartPurchase request fires successfully, the only issue is in the PayForPurchase section. I have the Steam module enabled and set up with the correct web API key.

If I loop through the payment options like so:

void PayForPurchase(StartPurchaseResult obj)
{
    for (int i = 0; i < obj.PaymentOptions.Count; i++)
    {
        Debug.Log("Payment options: " + obj.PaymentOptions[i].ProviderName);
    }
}

There is only one named "Test". Any ideas?

(Title ID is D1D05)
public void BuyDLC() // Called from a UI button
{
    PlayFabClientAPI.StartPurchase(new StartPurchaseRequest()
        {
            CatalogVersion = "Primary",
            Items = new List<ItemPurchaseRequest>() {
                new ItemPurchaseRequest() {
                    ItemId = "blood_red_dlc",
                    Quantity = 1,
                    Annotation = "Purchased via in-game store"
                }
            } },
        PayForPurchase,
                    BuyDLCError
                    );
}


void PayForPurchase(StartPurchaseResult obj)
{
    Debug.Log("Started purchasing item: " + obj.Contents[0].DisplayName + " Order ID: " + obj.OrderId);
    PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest
        {
            OrderId = obj.OrderId,
            ProviderName = "Steam",
            Currency = "RM"
        },
        OnPayForPurchase,
        OnPayForPurchaseError);
}
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

Could you please follow this thread -- Failed to initiate transaction with payment provider(Steam) - Playfab Community to check have you meet the necessary requirements? Please notice that Steam payments do require you have an application in the Steam, and you need to integrate the Steamworks SDK with your Unity project. You need to log the player in the Steam before you use the purchasing flow, since the Steam client is part of the flow.

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.