question

Nicholas Causey avatar image
Nicholas Causey asked

Is there Beginner Steam IAP ?

documentation
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.

Nicholas Causey avatar image Nicholas Causey commented ·

I've tried following the non - receipt tutorial but i keep getting.

void Buy() { PlayFabClientAPI.StartPurchase(new StartPurchaseRequest()

{

CatalogVersion = "IAP1_0",

Items = new List<ItemPurchaseRequest>()

{

new ItemPurchaseRequest()

{

ItemId = "BigBagOfGold",

Quantity = 1,

Annotation = "Purchased via in-game store" }

}

}, result =>

{

// Handle success

}, error =>

{

// Handle error

});

}

error CS1955: Non-invocable member 'PlayFabClientAPI.StartPurchase' cannot be used like a method.

Its not making any sense to me.

I have also seen another unity/playfab/android but i am looking for steam

...........................................

Looking for Basic tutorial from beginning to end for steam IAP

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

Try to call the API like below:

PlayFabClientAPI.StartPurchase(
    new StartPurchaseRequest
    {
        CatalogVersion = "IAP1_0",
        Items = new List<ItemPurchaseRequest>
        {
            new ItemPurchaseRequest
            {
                ItemId = "BigBagOfGold",
                Quantity = 1,
                Annotation = "Purchased via in-game store"
            }
            
        }
    },
    result =>{},
    error =>{}
    );

Be aware that ItemPurchaseRequest is a class and cannot be used as a method.

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.