Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by csabatoth · Feb 17, 2015 at 04:33 AM · pluginiapamazon

Amazon IAP works in sandbox mode, but not in real life

I'm trying to enable Amazon IAP using Amazon's Unity plugin for IAP v1.0. The game uses Prime31 for Android and iOS stores, I'm implementing the Amazon IAP side-by-side with that. The purchase works fine with Amazon's SDK Tester (which provides a sandbox), but when I try it on the released game it fails. I don't have a Kindle Fire or such, but I install the game using the Amazon Store App onto my Android phone. Here is relevant logcat:

 I/AmazonAppstore.BackoffRetryHandler(26295): Got a retry request
 I/AmazonAppstore.BackoffRetryHandler(26295): Not retrying client error: 400
 I/AmazonAppstore.BackoffRetryHandler(26295): Retrying request? false
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): Received a service error in response: status code=400, message=1 validation error detected: Value '[]' at 'vendorSkuList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length greater than or equal to 1]
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): com.amazon.iap.client.exception.ServiceException: 1 validation error detected: Value '[]' at 'vendorSkuList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length greater than or equal to 1]
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.iap.client.interceptor.IAPErrorTypeInterceptor.after(IAPErrorTypeInterceptor.java:71)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.iap.client.util.Web.after(Web.java:295)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.iap.client.util.Web.execute(Web.java:317)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.iap.IAPClient.request(IAPClient.java:442)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.iap.IAPClient.getProductsByVendorSku(IAPClient.java:328)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl$GetProductsByVendorSku.getItems(CatalogManagerImpl.java:129)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl.getItems(CatalogManagerImpl.java:103)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl.getItems(CatalogManagerImpl.java:52)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.mas.client.iap.purchase.AbstractPurchaseFragment$PurchaseInitiateMetric.doInBackground(AbstractPurchaseFragment.java:598)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at com.amazon.mas.client.iap.purchase.AbstractPurchaseFragment$PurchaseInitiateMetric.doInBackground(AbstractPurchaseFragment.java:593)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at android.os.AsyncTask$2.call(AsyncTask.java:288)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/AmazonAppstore.IAPErrorTypeInterceptor(26295): at java.lang.Thread.run(Thread.java:841)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): Error determining item type when creating detail page
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): com.amazon.mas.client.iap.catalog.CatalogRequestException: com.amazon.iap.client.exception.ServiceException: 1 validation error detected: Value '[]' at 'vendorSkuList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length greater than or equal to 1]
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl.getItems(CatalogManagerImpl.java:105)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl.getItems(CatalogManagerImpl.java:52)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.purchase.AbstractPurchaseFragment$PurchaseInitiateMetric.doInBackground(AbstractPurchaseFragment.java:598)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.purchase.AbstractPurchaseFragment$PurchaseInitiateMetric.doInBackground(AbstractPurchaseFragment.java:593)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at android.os.AsyncTask$2.call(AsyncTask.java:288)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at java.lang.Thread.run(Thread.java:841)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): Caused by: com.amazon.iap.client.exception.ServiceException: 1 validation error detected: Value '[]' at 'vendorSkuList' failed to satisfy constraint: Member must satisfy constraint: [Member must have length greater than or equal to 1]
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.iap.client.interceptor.IAPErrorTypeInterceptor.after(IAPErrorTypeInterceptor.java:71)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.iap.client.util.Web.after(Web.java:295)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.iap.client.util.Web.execute(Web.java:317)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.iap.IAPClient.request(IAPClient.java:442)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.iap.IAPClient.getProductsByVendorSku(IAPClient.java:328)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl$GetProductsByVendorSku.getItems(CatalogManagerImpl.java:129)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): at com.amazon.mas.client.iap.catalog.CatalogManagerImpl.getItems(CatalogManagerImpl.java:103)
 E/AmazonAppstore.IAP/AbstractPurchaseFragment(26295): ... 8 more
 W/BroadcastQueue( 831): Permission Denial: receiving Intent { act=com.amazon.venezia.command.analytics.LifecycleEvent flg=0x10 (has extras) } to com.amazon.venezia/com.amazon.mas.client.analytics.TailwindBroadcastReceiver requires com.amazon.mas.client.GLOBAL_BROADCAST-com.amazon.mShop.android due to sender com.amazon.mShop.android (uid 10016)
 I/AmazonAppstore.BasicUserPreferences(26295): Reading from content://com.amazon.mas.client.settings/boolean/com.amazon.mas.client.framework.SettingsService.Collect3pAppUsage

It's coming from the guts of the Amazon IAPplugin parts from Unity. I call AmazonIAP.initiateItemDataRequest in the beginning of the game, with the list of the SKUs of my inventory. Seems like it returns fine. What else can I do? Any help is appreciated.

A fellow Unity developer advised to hack Amazon IAP 2.0 into the IAP 1.0 plugin. But it's not that easy, I'd have to replace the encompassed jar, rewrite the bindings...

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by csabatoth · Feb 19, 2015 at 11:43 PM

Refresh in-app-purchasing-1.0.3.jar in the guts of the Unity plugin supplied by Amazon with in-app-purchasing-1.0.20.jar. Besides that I added a call to initiateGetUserIdRequest, not sure how much that matters: initiateItemDataRequest worked before without that. So one of these changes or both of them made the headache go away. No I have 3 calls in the Unity game/app:

  1. AmazonIAP.initiateItemDataRequest (QueryInventory ()); // QueryInventory is my own function, I know my inventory right now, I don't build it dynamically.

  2. AmazonIAP.initiateGetUserIdRequest (); // Still during IAP initialization

  3. AmazonIAP.initiatePurchaseRequest(itemID); // itemId is the SKU string

I utilize the AmazonIAPEventListener.cs supplied by the IAP plugin almost as it is, I just needed to wire in the increase of the game's virtual currency:

 void purchaseSuccessfulEvent( AmazonReceipt receipt ) {
     AmazonIAP.Log("purchaseSuccessfulEvent: " + receipt );
     PlayerCredits.AddPlayerCredits (receipt.sku);
 }

Hope this helps others!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image csabatoth · Feb 19, 2015 at 11:36 PM 0
Share

It's crazy that I can only test if the real IAP works well only if I publish the game and in production. It always worked fine with the Tester sandbox.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

How do I implement In-App purchases for Windows/Windows Phone? 2 Answers

How to get local currency u3dxt 1 Answer

Windows Universal IAP 0 Answers

I am using U3DXT plugin for iOS IAPs and I am receiving the following error which results in purchase process not occurring. Any ideas? 0 Answers

Where to put the Amazon App id to Unity 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges