Steam OSS' RegisterServerLink causes include of private header resulting in compile error

The comments inside `OnlinePurchaseInterfaceSteam.h` say to implement `ISteamPurchasingServerLink`. However, when doing so in my own module, when I include the `#include OnlinePurchaseInterfaceSteam.h`, that includes the private header file `OnlineSubsystemSteamPrivate.h` at the top of `OnlinePurchaseInterfaceSteam.h`.

Due to the above, it’s not clear how exactly we’re supposed to implement `ISteamPurchasingServerLink` and call register if including the header required to implement the interface causes compile issues.

Any help here is greatly appreciated, thanks!

Steps to Reproduce

  1. In a separate module, add OnlineSubsystemSteam to PrivateDependencyModuleNames
  2. Create a new .h called FMySteamPurchasingServerLink:

`#pragma once
include “OnlinePurchaseInterfaceSteam.h”

struct FSteamPurchaseDef;

class FMySteamPurchasingServerLink
: public ISteamPurchasingServerLink
{
virtual void InitiateTransaction(const FUniqueNetId& UserId, TArray Mtxns, const FOnPurchaseCheckoutComplete& Delegate) override;
virtual void FinalizePurchase(const FUniqueNetId& UserId, const FString& ReceiptId) override;
};`1. Try and compile, resulting in the following error:

OnlinePurchaseInterfaceSteam.h(5): Error C1083 : Cannot open include file: ‘OnlineSubsystemSteamPrivate.h’: No such file or directory

Hi,

Thank you for bringing this to our attention! This seems to be an oversight with including OnlineSubsystemSteamPrivate.h in OnlinePurchaseInterfaceSteam.h, and I’ve opened a new issue for this, UE-273830, which should be visible in the public tracker in a day or so.

Thanks,

Alex

Thanks for getting back to me and glad the issue is confirmed! Is there any workaround at the moment?

Hi,

Unfortunately, I’m not sure there’s any workaround at the moment, outside of making modifications to the engine.

For projects that intended to implement purchasing purely in the OSS, the intent for ISteamPurchasingServerLink was to allow this kind of project to support Steam with minimal modifications. If Steam is the only platform you intend to support (or you already have your own purchasing flow), another option could be to handle purchasing in your own project code instead of using this interface.

Thanks,

Alex