Amazon in-app-purchases how to test payments - android

I am working with Amazon In-app-purchases for Android on flash using native extentions. So, I have implemented purchase flow in sandbox ( I was using their file InAppSDK-SandboxData.json for debug). But now, I have an amazon account. I have created purchase items in my developers account, and I want to test flow of buying them.
String requestId = PurchasingManager.initiatePurchaseRequest(product_id);
but it throws an exception, it try to open file "InAppSDK-SandboxData.json", but I have deleted in hope that it will go to product servers, but it does not. I found that I can only make purchases when I will commit my app to Amazon app store((
So, how can I test my real payments to product servers and how can I debug this process?? Thanks.

Right now, you can't :(
I've implemented Amazon In-app-purchases for Android in my last project and the only way you have to test is using InAppSDK-SandboxData.json. Once everything works fine then you commit the app to Amazon App Store and they'll debug for you.
My advise, if it's working fine using InAppSDK-SandboxData.json and you can't wait a month or two (I'm sorry but I can't tell you anymore because I'm still under NDA. I'll edit my response soon), you don't be afraid and commit the app. I did it ;)
UPDATE:
It's official right now, you have a test app in the developer site, you only must use it ;)

Now you can test in-app purchasing using "LiveApp testing" before publishing to customers.
Check this link
https://developer.amazon.com/public/resources/development-tools/live-app-testing/docs/getting-started

Related

Android - Testing in-app subscriptions?

I'm currently trying to test in-app subscriptions using the In-app Billing Version 3 API. I have downloaded the TrivialDrive test project and successfully tested in-app purchases using static responses (android.test.purchased etc). The problem I'm facing is that static responses are only supported for testing in-app purchasing NOT in-app subscriptions. The only viable way I have found so far to test in-app subscriptions is to publish the app as beta on the developer console, assign a tester email and then download the beta apk via the opt in URL. This is a slow process as it takes a while for every iteration of the product to be published. Is there any way where in-app subscriptions can be tested in a more 'classical' way? i.e. insert breakpoints in Android Studio and see what is actually happening? Am I missing something? Thanks in advance!
about testing you don't have to upload an apk everytime to the playstore and download it, you have to do it once
then you can configure you app to signed everytime you run it on you device doing that you can see the log messages by the tag you specified
hope that helps :)

How to test in-app-purchases easily, without publishing or signing it first?

Background
My app has some in-app billing (like this one), and I wish to test it out before publishing it.
I've watched some google IO lectures and read some articles, and prepared everything.
According to what i've learnt (talked about here), all I need to do is just add my email to the test accounts, and it won't be charged.
The problem
It seems that in the developer console, the in app items cannot be activated.
I think it's because the app isn't published yet, but that's the whole point of testing - I want to test the app before publishing it...
As I've also found out, in order to test in-app billing, I have to do a lot of things to take care of for making it work, also having many restrictions and annoyances:
sign the app and upload it to the play store . if you don't use a signed app, you get this message ("This version of the application is not configured for Market Billing...") .
make credit cards be used to the devices, even if they won't cost anything.
let others do the testing instead of myself, as my account cannot be used for that. not only that, but instead of adding exactly which you wish to add, you have to create a google group and there put the people who will be able to use the app, and all will have to have a google+ account... You will also need to wait some time till the testers will be able to use in-app-billing of your app and till then they will get an error "User is not eligible for this purchase" .
because of #1, I need to have some kind of mechanism to reset the purchases, within the app itself, but i also shouldn't forget to remove/hide this features for the end users, so that they won't reset it by mistake
because of #1, if I wish to be able to debug the app, I need to change it on the manifest, and choose to debug the app within Eclipse, and also remember to uncheck this flag before actually releasing the app.
since the app is on the play store, you cannot modify in-app purchases items (their Id for example), as opposed to many thing you can modify before publishing the app. It's no longer a development as flexible as it can be using simple development. It's like your app should be sealed with what you choose even though you haven't published it yet.
The question
Why is it this way?
How come there isn't a simple way to allow to test the in-app-billing ?
How would you deal with the problems I've written about?
Is it possible to test the in-app purchases before the app is published?
How come I can't use my own google account ?
Also, suppose I do make a (fake) purchase, how do I reset it (all/specific purchases) in order to check it out again? Is it true I can't do it anywhere besides the app itself?
Am I missing anything?
you dont have to publish the app inorder to test it all you have to do is upload the apk to your developer console, just dont publish it. If your account is linked to your developer console you cannot use that account and have to create a test account to test the IAP's
You will have to public the app but publish in beta mode so that you can test the in app purchases. Beta mode will enable to test the functionality with limited user set.
Yes, you can test your app without publish (and without publish in beta mode too). There are instruction http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test. Please remember that after 1 point it's maybe need to wait about hour or two.
It seems that in the developer console, the in app items cannot be activated.
it's ok, just check that you mark it as active. It look like not active before you publish the app, but you can test it.
I can use my own google account, right?
I strongly recommended have additional account only for test purchases.
Also, suppose I do make a (fake) purchase, how do I reset it (all/specific purchases) in order to check it out again?
You'll must to fill billing information for your test account. But when you make test purchase, there are no any real money transaction. Every in-app can be tested once again after the app consume it.
I'm also working on how to test In-App-Billing for Android in best way since days.
With real transactions to me it seems to be really too complicated and a lot too much effort. So i'm currently thinking of 'only' testing this stuff with static responses (http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-static).
In theory i guess once this works, it should also be fine in production as in the source code only the SKU id gets changed for live release..

How to add in app purchase in one feature of an application of android?

I have prepared an application which has several features. To one feature of them, I want to add in app purchase option. Can anyone inform me the simplest way to implement this? As far I know it can't be tested using emulator. Then How can I test it after adding this option?
you can make a test account in your developer console under setting, upload the apk with in-app billing permissions but don't publish it.
Add in-app products in developer console.
Login with the same test account you have added in developer console as primary account to your android device.
then install the signed apk into your device
and you are ready for testing
you can also refer to android.developer for more details
http://developer.android.com/google/play/billing/billing_testing.html
At last, I have implemented in app purchase in my application with the help of bellow's website which contains brief but clear explanation of in app purchase with a simple example. Possibly this site will be helpful for the novice android programmers to learn how to implement in app purchase.
techotopia-In app purchase

Android - to test in-app billing do I need to release a test application to android market?

I am reading this tutorial http://developer.android.com/guide/google/play/billing/billing_testing.html and it is really confusing me :)
In one part of the tutorial, it discusses that I should make a test app and release it into google play. And in another part of the tutorial, it discusses setting up static return values so I can mimic what google play returns to my app.
What is the right approach here if I want to test out the flow of someone buying access to a certain page?
I already have the code to buy the stuff. I just need to test that the transactions would work and the return value would be ok.
Thanks!
If you want to test with real server you need to upload your apk file as draft version no need to publish it.
as they says
Note: Making in-app billing requests with the reserved product IDs overrides the usual
Google Play production system. When you send an in-app billing request for a reserved product
ID, the quality of service will not be comparable to the production environment.
so...If you want to test with your product ID you need to upload the signed version of your app on market (offcourse as draft) and also you need to pay! :)

Android: How to test in-app billing

I have an app in the market without in-app billing. Now the new version should have in-app billing. Of course I am not ready yet and cannot upload the new version to the market, but how can I test and debug my unfinished code?
as a first step you need to test it using test requests. This testing is limited but will give you idea if the flow works correct or not.
Second step - real testing. You have to upload your app to Play (NOT publish, just upload), create another account (you can't buy things from yourself) and enable this account in your dev. console. Then you can purchase (for real money) the app and test how well it goes. Of course you can cancel/refund this anytime using your main account.
As a person implementing this in a couple of my apps I can tell you it's a pain.
Refer here for more info:
In-App Billing reference
You can use the test product id's set up by Google to test your app. Check out this link
Firstly,You can use four reserved product IDs to test static in-app billing responses
Secondly,Using a test account and upload you app as a draft,then you can test it using your own product IDs

Categories

Resources