question

Tadas avatar image
Tadas asked

Xsolla purchase flow in 2022?

Hello,

I have confirmed with Xsolla that Playfab's documentation regarding Xsolla payments is now outdated. (Please kindly remove it or update it as it's been causing confusion for so many people since 2018 or so as I can see from some posts).

The old documentation suggested that upon completing a purchase via Xsolla, Playfab will automatically update the player's inventory, however, that's no longer the case because Xsolla issues a different OrderID. Consequently, Playfab is also not showing total amount of real money spent by the player which I find a crucially important feature.

So, do you have an updated purchase flow for Xsolla?

Many thanks in advance!

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.

Xiao Zha avatar image Xiao Zha commented ·

What do you mean by “Xsolla issues a different OrderID”? At which step in the documentation did you encounter the problem? And if you want to get the total amount of real money spent by the player, PlayFab tracks the information in the player profile model, which is retrieved by calling the GetPlayerProfile API. You can refer to Getting a player's Value-to-Date (VTD) - PlayFab | Microsoft Learn to have more information.

0 Likes 0 ·
Tadas avatar image Tadas Xiao Zha commented ·

(please see my new post for clarification below)

0 Likes 0 ·
Tadas avatar image
Tadas answered

1. Install the Xsolla SDK for Unreal Engine via Github or UE Marketplace.
2. Put the SDK in your project's Plugins folder (as opposed to installing to the Engine's directory), so you can access Xsolla SDK Content with all of the purchase logic and working examples there.
3. Retrieve a JWT token from Playfab using this guide (because we are using Playfab's, not Xsolla's authentication) and feed it into AuthToken of the FetchPaymentToken function (obviously, you will need to have a catalog set up with Xsolla and synchronize it with Playfab, then specify the item SKU which is equivalent to Item ID on Playfab). The callback gives you the AccessToken and OrderID. Load the payment UI in sandbox mode with the following URL: https://sandbox-secure.xsolla.com/paystation3/?access_token=ACCESS_TOKEN
and make a purchase.

Note: OnlineSubsystemSteam plugin needs to be disabled, otherwise the JWT token will not be accepted and return "can't find ID in token payload".

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.

Tadas avatar image Tadas commented ·

Or, alternatively, you could just ask your sales manager to give Xsolla a ring and say "Hey guys, are we promoting your service for nothing? If not, can you at least make sure our webhooks are exchanged after a purchase is done with Xsolla, so that clients can successfully use our services, release their games quicker and bring more revenue for us all?"

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Tadas commented ·

Thanks for bringing this up. We've confirmed with Xsolla that they no longer support the integration PlayFab currently using.

Below link is the Xsolla recommended new integration steps that exist without PlayFab support: Integration with PlayFab.

0 Likes 0 ·
Tadas avatar image
Tadas answered

To clarify, if we follow the current documentation, we end up with a blank Xsolla gateway that doesn't display any purchasable items as described in this post all the way from 2013.

(Please see the screenshot below)




Xsolla's method, on the other hand, works fine, but upon completing the purchase, Playfab's database is never updated (as promised in Playfab's documentation).

(Please see the screenshot below)

If we were to use Playfab's ConfirmPurchase function, it would result in error "OrderID can't be found" because this function only recognizes OrderIDs issued by Playfab's StartPurchase function (which can't even be used for Xsolla purchases, otherwise we get "Failed by provider" error).

So, could you, please, kindly double check on the new recommended method of Xsolla's purchase synchronization with Playfab? I'm already liaising with Xsolla but it's going to take time for them to get to the bottom of this.


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.

Tadas avatar image Tadas commented ·

correction: the post referenced was from July 13, 2022, not 2013. Sorry for the wrongful claim.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha commented ·

Could you share the detailed XSolla method with us so that we can better research.

0 Likes 0 ·
Tadas avatar image
Tadas answered

Guys, it's been nearly a week. It takes up to an hour to test this flow. I need a final conclusion, are you interested in supporting Xsolla payment flow or not anymore?

In the meantime, should I try synchronizing the databases after the purchase is done via Cloudscript? If so, could you please provide me with an example template code? That would be very helpful!

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 ·

Sorry for the late reply, and thanks for sharing the xsolla method. We've reported the issue to the team and will let you know if there are any results.

0 Likes 0 ·
JayZuo avatar image
JayZuo answered

Hi @Tadas, In PlayFab backend, we are using Xsolla Pay Station to support payments with Xsolla. So, the workflow is different from what you've mentioned.

You can check the workflow of Pay Station here: Xsolla Documentation - Get started.

When you call GetPaymentToken API, we are calling Create token method as per Get a token.

In Completing the purchase (Xsolla), we are open the payment UI as per Open payment UI. This payment UI is controlled by Xsolla, that's why we suggest you contact the Xsolla support for help in failed to integrate xsolla into unity - Playfab Community.

Could you please recheck with Xsolla about why the Pay Station Integration flow doesn't work? When you say, "I have confirmed with Xsolla that Playfab's documentation regarding Xsolla payments is now outdated.", do you mean Xsolla has confirmed the Pay Station is outdated?

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.

Tadas avatar image Tadas commented ·

I may have missed the "Set up webhook handling." from the Pay Station Integration flow. I will update this thread if that solves the issue.

So far, using https://{projectid}.playfabapi.com URL fails the "Test a response to an invalid signature" because it's expecting to receive a HTTP code 4xx, and I'm getting HTTP 200 for each and every test scenario. I'm awaiting for Xsolla's response, but in the meantime, I'd like to know whether these IP addresses 185.30.20.0/24, 185.30.21.0/24, 185.30.23.0/24are being listened to by default. Otherwise, I need to know how to enable them.

In any case, Xsolla has confirmed to me that this particular Playfab's documentation is outdated and which is why we are getting blank Pay Station using the Playfab methods as described in my original posts.

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.