question

Paul Boutros avatar image
Paul Boutros asked

Is IAP for pc game possible?

Hello there,

I am just wondering if the Playfab In-App-purchase can works with a pc game?

My research result always mention Android or Google play...

My game is at a beta demo stage, and I am not dealing with distributors yet... so I don't integrate Steam SDK for example (just to describe my scenario)

Thanks!

2 comments
10 |1200

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

subsoap avatar image subsoap commented ·

I just tested PayPal transactions on PC builds a day ago and they worked. You can either open a link from the game to the PayPal transaction, or if your game engine supports WebView on desktop you could support that then hook the various events.

1 Like 1 ·
Paul Boutros avatar image Paul Boutros subsoap commented ·

Great, you even did some testing. Well, can't wait to do some testing as well then. I will check later to see if I can hook WebView..

0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

> Is IAP for pc game possible?

Yes, it is possible. However, this depends on which OS and framework you are developing. For example, if you are developing with Unity and the game will distribute on Windows, you can follow the below link for the details steps:
https://docs.unity3d.com/Manual/UnityIAPWindowsConfiguration.html

And please share the details, if you still have any concern.

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.

Paul Boutros avatar image Paul Boutros commented ·

hi Junjin Chen thanks for the answer, looks like I will have all need with this doc to move forward . I am using Unity on Windows, also in the meantime I checked out Xsolla as well that have more payment method available, I guess I will add it as well and use Playfab for all the rest(user database, analytics etc...)

0 Likes 0 ·
Paul Boutros avatar image
Paul Boutros answered

Prior Paypal integration I followed along the document to get Facebook payment working.

I don't understand that part found in the documentation:

(Establishing the payment provider: Webhook providers)

https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/economy/non-receipt-payment-processing#setting-up-payment-providers

I am copy/pasting the part I have a problem with:

my question is, where should I copy/past that code example?

At first I though in the game (Desktop app) but no, this does not even seem to be part of Facebook Unity SDK...

C#Copy
FB.ui({
    method: 'pay',
    action: 'purchaseitem',
    product: "https://{
                 {TitleId}}.playfabapi.com/OpenGraphProduct/{
                 {TitleId}}/{
                 {StoreId}}/IAP1_0/BigBagOfGold",
    request_id: "1234567890ABCDEF"
}, function (response) {
    console.log('Payment completed', response);
    print(response);
    if (response.payment_id) {
        facebookPurchaseId = response.payment_id;
        payForOrder(); // This is a function call you need to write
                       // which makes the call to the Client API PayForPurchase
                       // (see below)
    } 

});

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.