S2S REST request not working on some users
So I have a backend for my game and I want to call some S2S requests to get user's data, purchaes and verify purchases. I am using the end point https://graph.oculus.com/${APP_ID}/viewer_purchases to get user's purchases. I provide access_token, user_id, and fields. Just like it mentions in the documention for IAP here https://developers.meta.com/horizon/documentation/native/ps-iap-s2s. The requests are working just fine with some users, but sometimes i enter a user id and get this error: here is an example of it working: if i just enter a random user id: (translation: it says thats an invalid user id) This is not just for this user, it happens for many users. Also it is happing for other requests like https://graph.oculus.com/${USER_ID} to get verified org_id and in consuming and verifying requests. I know that some of these requests dont work for meta test users (users that meta itself uses to test the game) but these users are real players. If anyone has any idea why this is happening please let me know. Side note: the consume_entitlement request also doesn't work sometimes where it throws a 500 is_transient error with code 2 but it still consumes the purchase correctly. weird...36Views0likes0CommentsConsume entitlement on the server error
I'm trying create servers side logic to consume entitlement, like in this documentation: https://developers.meta.com/horizon/documentation/unreal/ps-iap-s2s#consume-an-iap-item I test calls on my computer first, using cmd. And when I try to consume - it returns an error. But consumable item is consumed in the end. Full log is shown on the screenshot Verify that user has this item - true All user purchases Consume - error Verify that user has this item - false73Views0likes0CommentsGetViewerPurchases returns PurchaseList with 0 count
I have a subscription setup and its checkoutflow seems to be working perfectly as expected, but when i try to fetch the viewers purchases at the start of the game it returns PurchaseList with the count of 0 although they certainly seemed to have the purchased product (in this case its a re-accuring monthly/yearly subscription) so how can I fix that issue? Any help in this regard is highly appreciated Note: This issue was occuring when tested production build with real users. The SKU ids and everything else is checked properly. Here is the example implementation: private void StartOfTheGame() { IAP.GetViewerPurchases().OnComplete( HandlePurchaseListResponse ); } private void HandlePurchaseListResponse( Message<PurchaseList> msg ) { if( msg.IsError ) { LogAssertion( $"Error: {msg}" ); return; } hasSubscription = false; Log( $"purchase list count: {msg.GetPurchaseList().Count}" ); // This returns 0 as a result hence the for loop doesn't even start although I have made sure that the user do have the product purchased if( msg.GetPurchaseList().Count <= 0 ) { _currentAttempts++; if( _currentAttempts >= _initializationMaxAttempts ) return; IAP.GetViewerPurchasesDurableCache().OnComplete( HandlePurchaseListResponse ); Log( $"No purchases found, tyring to get cache purchases" ); return; } foreach( Purchase p in msg.GetPurchaseList() ) { LogPurchasedProductDetails( p ); if( p.Sku is ProSubscriptionYearlySKU or ProSubscriptionSixMonthSKU or ProSubscriptionMonthlySKU ) { SetSubscriptionAsActive( p ); } } if( !hasSubscription ) { Log( "Pro subscription not active." ); } }945Views0likes4CommentsGetting application logs from a test user account
Has anyone had any luck accessing logs created with a test user account that isn't the device owner? I am working on IAP at the moment and to test purchases, I need to use a test account. This works fine but If I am logged into this other account on my device, no logs are created on the device. This makes it a massive pain to debug as I have no logs that i can read to debug. It seems like only the "Device Owner" account actually saves any application logs. Is there a way to give permission to my test account to behave like my main account? This seems like a really annoying and stupid design decision when you prevent Test accounts from creating logs... What are you supposed to be testing if you have no logging!1.1KViews0likes2CommentsTest User IAP Checkout Flow Stopped Working
We've run into an issue when testing our IAP purchase flow. Up until this week, when we'd click on an In-App purchase (durable level addon), it would open the Meta App Lap Purchase window, where it would give a price and ask to purchase or cancel, then ask for PIN. This was great for testing functionality. Now, when we click on the IAP purchase, the Purchase flow just automatically succeeds and the level gets purchased without prompting with the Purchase Flow window (no confirm purchase, no pin). This happens even after removing the Test Users IAP entitlements. If we turn off the "Inherit organizations entitlements", then the purchase flow just fails with the test user - doesn't even pop up the window. Has anyone else noticed a change in the IAP Checkout flow functionality starting this week? It would be nice to test the checkout flow with our test users before releasing our updates.Solved17KViews0likes15CommentsIAPs Not working second time
I have a consumable item setup in my Meta Dashboard and have it implemented in my game. When you go buy it in-game for the first time, the pop ups to purchase appears and you can purchase it. Then the next time you try to purchase, there's no popup. But the purchase is successful and the currency is being given. Support saying "go on forums" but no one ever answers me. Can anybody help me? im pretty sure my script IS okay. Unity 2021.3.19f1Solved4.1KViews0likes15CommentsRequest Failed of IAP Function
I'm doing IAP function and testing purchase but when I'm click on buy button the system get error message as below. Also I'm testing paid my app has been released on app lab and also get similar message Can anyone explain and give solution for this problem? Thanks457Views0likes0CommentsIn-app purchase failed. errorCode=0
Hi, I have been trying to integrate IAPs into a Unity VR project using the Oculus SDK. I have a free consumable add-on defined in the developer console (I haven't set up payment info) and then in my C# code I have: IAP.LaunchCheckoutFlow(product.Sku).OnComplete((res) => { LaunchCheckoutFlowCallback(res, callback); }); Everything up to this point - retrieving the add-on etc. - works perfectly, but then when I try to run this, a popup opens and instantly closes and then I get this error in the android logcat [AndroidPlatformIntegration] In-app purchase failed. errorCode=0, httpStatusCode=0, errorMessage={"category":"user_canceled","code":0,"message":"The purchase has been canceled."} and the Message<Purchase> (res) IsError is set to true in the LaunchCheckoutFlowCallback function, But I am not sure why. This is a build from Unity, not an uploaded build and I haven't tested if that would work. But other than that I don't know why I am getting this error. Thanks for any help!5KViews4likes11CommentsCan't test IAP: "something went wrong"
Hello, I completed following steps to integrate IAP into the app: - Data Use Checkup is completed and approved; - IAP are enabled on dashboard; - Addons are created, all of them have SKU, name, price, description and published status; - On the app's side, I use IAP.LaunchCheckoutFlow(sku) function to purchase the item (sku might be hardcoded); - I use test user which is added to my organization; - The build is uploaded to release channel; age group is set; test user is added to channel; - The "Always succeeds" card is added to test user. Then in the app I can call the dialogue window and pick the test card. After that I receive the message: "Something went wrong. We're having trouble completing your request. Try again." It doesn't matter how many times I try, it is the same message without any error or information. If I pick "cancel", now it gives me an error: "The purchase has been canceled." I checked everything but can't understand what I am doing wrong. How to deal with that problem? In what direction should I move to detect the problem? Free items are possible to acquire.1.8KViews3likes1CommentSubscription webhook
Are there any plans to work on subscription webhooks where our servers could subscribe to subscription-related events such as subscription cancellation (cancellation reason, date canceled, etc.), subscription purchase attempt (used promo codes, subscription type, success status, etc.), and similar? With that in place, especially in terms of cancellation events, it would allow us to better understand why the users are leaving and it would also give us an opportunity to win them back.482Views0likes0Comments