DeanCode Posted November 30, 2020 Posted November 30, 2020 Hi, I'm trying to implement (non-subscription) IAPs but I can't see where in the portal I should register them? In the "In-App Purchase" section I see only entries for getting my API key, registering a webhook URL and setting up subscription based IAPs. Am I missing something? or am I miss-understanding how IAPs should be setup? Kind regards, Dean @Corvus
Corvus Posted November 30, 2020 Posted November 30, 2020 @DeanCode For Viveport non-subscription IAP you will implement it via code not the dev console. IAP management via dev console is on the roadmap for later release. https://developer.vive.com/resources/viveport/sdk/documentation/english/viveport-sdk/apis/-app-purchase-iap-api/function-usage/
DeanCode Posted November 30, 2020 Author Posted November 30, 2020 Ah I see, thanks for that. Would you mind pointing me towards which call registers the available IAPs? The documentation isn't quite clear on the flow of calls to make, if you get my meaning? @Corvus
Corvus Posted November 30, 2020 Posted November 30, 2020 @DeanCode There is sample code for Unity/Unreal here: https://developer.vive.com/resources/viveport/sdk/documentation/english/viveport-sdk/apis/-app-purchase-iap-api/sample-code/ What engine are you using? With Unity the current flow is to Viveport Init, check IAP is ready, add items, create Request (with price), and send Purchase. ... Api.Init(InitStatusHandler, VIVEPORT_ID); ... IAPurchase.IsReady(mListener, API_KEY); mListener.mItem.items = new string[3]; mListener.mItem.items[0] = "sword"; mListener.mItem.items[1] = "knife"; mListener.mItem.items[2] = "medicine"; IAPurchase.Request(mListener, "1"); ... IAPurchase.Purchase(mListener, mListener.mItem.ticket); ...
DeanCode Posted November 30, 2020 Author Posted November 30, 2020 Thanks I understand better now. I am using Unity. The sample code is good, it's just the expected flow that I struggled to grasp from it. Thanks again for the help, Dean @Corvus
aderpg Posted March 9, 2023 Posted March 9, 2023 I tried it but i can't create "Result" type variable
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now