How to verify connection and product ID in react-native-iap - react-native

Hello I am trying to understand the documentation of the react-native in app purchases but I cannot find any docs that describe how to properly implement the initConnection function from the module and get the products that have been already approved by the apple store connect platform?
I would like to know how to connect the react native project to the app store connect and the in app purchase features so that I may verify that it is actually working. Because all of the documents as of now have just been showing to use the function RNIap.initConnection() and to console.log the connection but I keep receiving an undefined in the terminal as I log it.
Whenever I try to requestSubscription() I keep getting product ID is not valid as a error and I am not sure as to why ? I am assuming because I am not properly connected to the platform.
I have made a sandbox account to test the in app purchase.

I am in the middle of doing this as well. One of the things I found is that I needed to have the Banking and Tax information set up in App Store Connect and validated before I could do much. Until I did that, I couldn't get very far with testing Subscriptions. Hope that helps.

Related

How to manage changing account balance in a react native app

I am a newbie react native developper working on fintech app. The app basically does transactions and the user should see its balance. But here comes the problem, I cannot update its balance according to transactions because it is not updated automatically but he has to disconnect and then reconnect in order to see the reel balance.
I've tried using async storage, secure store but it doesn't actually work. And also I've heard that redux would help me but I don't really get it to work.
Any help would help me to resolve this issue. Thanks in advance

How is anyone processing payments with React Native apps at present?

Trust me when I say I've tried every single solution people are currently downloading. tipsi-stripe, react-native-payments, react-native-paypal, you name it.
Every single guide says to link the library using link. Or automatically using yarn/npm. I've tried both ways, doesn't work. The new React Native version is certainly preventing this, and all the npm packages are failing. It seems no one can update the packages to work with react native yet.
If this is the case, how is anyone at all processing payments in react native? There doesn't appear to be any workable option here. Going to have to cancel my client's project due to impossible needs, simply payments.
I would think the best solution is to have a server or webservice that calls an API like PayPal v2/checkout/orders, to set up and capture a transaction. See "Create Order" and "Capture Order" here: https://developer.paypal.com/docs/business/checkout/server-side-api-calls/#server-side-api-calls
Then, for the approval flow, you can open a secure browser view to the approval_url the create call returns, having set the return_url in your creation to be a deeplink back to your app, which when opened immediately calls your server or webservice to do the capture and respond with success/failure.

iTunes Connect demo account in existing live database for app submittal?

I'm submitting my first app through iTunes Connect. It is a social networking community so I have to provide a demo account for the submission. My app already has a live database of users as there is currently an active web version.
I'm new to this and confused as to how I should handle this. Should I be creating a demo account that will not show up in any other live user's search results? Are the testers going to be attempting to interact with other live users? I am assuming I will need to show the various functions of the app, like messaging and events. In that case should I be creating a few "demo" users for the testers to interact with?
Alternatively, should I be linking them to the development version and development database? If that's the case, then the build that I send them would only be a development build then?
I am confused on how this is supposed to work and can't seem to find any information to help?
In my experience, you'll need to give them the production version that will go into the store. So not the development build.
When we submit an app for approval, it seems to get installed and activated on a couple of devices, but nothing much ever happens. They barely use it, as far as we can tell. We can tell that it's installed and run. We have previously been rejected when the network connectivity wasn't working right, so we know that they do look at the app after it's installed.
I'd suggest you make them an account that looks relatively anonymous (or even "Test Account" which you real users are hardly likely to try to interact with). You could create another account and say "If you want to send a message, send it to account xxxx". We've never had them interact with our app enough to utilise the suggestions we've made.
If you have an active / inactive flag, you could think about making these accounts inactive once the app is approved, then re-activating it when you next want to submit your app.

Titanium in-app purchase with ti.storekit - product not found

I have my in-app product all set up for purchase in iTunes Connect via ti.storekit:
My Appcelerator 4.0 app compiles and deploys to my device (dev profile). The ti.storekit is linked to my app and it compiles. It also seems to execute correctly, in terms of no unhandled exceptions. But it is telling me that it can't find my In-App purchase product. I have tried handing "15 Keys" and also "15Keys" to ti.storekit. I wasn't sure which one it wanted (Reference Name or Product ID) - but anyway neither works.
Here's the documentation I've been following.
And here is the function in ti.storekit that produces the error message:
function requestProduct(identifier, success)
{
Storekit.requestProducts([identifier], function (evt) {
if (!evt.success) {
alert('ERROR: We failed to talk to Apple!');
}
else if (evt.invalid) {
alert('ERROR: Invalid product: ' + identifier);
}
else {
success(evt.products[0]);
}
});
}
The "else if" line is being executed: alert('ERROR: Invalid product: ' + identifier);
What am I doing wrong? Should I be handing it the Reference Name (15 Keys) or the Product ID (15Keys)? And since I have tried both and neither works, how can I troubleshoot this? What am I doing wrong?
EDIT:
I am unclear on 3 things:
1- Should I go into Settings on my ipad and log in to itunes/store with my TEST USER apple sandbox account? I'm unable to do this because it keeps requiring me to enter a credit card. Test credit cards I've used in the past (on other non-iOS systems), such as 4111111111111111 do not work, and I cannot continue and sign in. Not even sure if I'm supposed to do this. If so, what CC credentials can I use? Should I use a REAL CC for this? Based on everything I'm reading in other articles and posts, it says to never link a test account to a CC number...then WHY won't apple let me log in my test user to my apple device (inside Settings) without entering a credit card?
2- I'm not following the steps in https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js EXACTLY, because in my app there is nothing to download, nothing to host, etc. In my app, users can buy keys, which are just digital entities in my app -- nothing to download. So I have removed all code/steps that have anything to do with downloading/hosting.
3- Version 1.0.0 of my app is awaiting review in the app store. This version has no ti.storekit and no in-app purchase. Nothing. BUT I'm working on a newer version with all the storekit and in-app purchase stuff in my latest appcelerator 4.0 project. Shouldn't this work in my dev environment, on my connected ipad, in a dev build? The fact that I have 1.0.0 awaiting review, with no storekit stuff, should have nothing to do with my new version in my dev account with storekit, right? Also I am puzzled by this message:
Do I need to submit a new build to Apple before my DEV storekit stuff will work? If so, this seems very strange, as though an app-store release candidate is connected with stuff I have in development in my local environment. Is this message indicating why my dev storekit stuff won't work? My in-app purchase product seems correctly configured, but shouldn't I be able to connect with this in dev/sandbox regardless of the 1.0 app (no storekit) awaiting review in the app store?
Thanks everyone for your help...I must be missing some critical step I'm not seeing.
Did you check if you use the Sandbox for testing?
https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js#L86
And are you aware that you have to sign out of your existing App Store account to test?
https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html
You have to use the Product ID (15Keys).

Zendesk App - Agent Call Activity

I'm trying to create an app for my Zendesk that I can put into the ticket_sidebar that will show which of my agents are available on the phones.
The information that I need is already in Zendesk under Admin/channels/voice/Call Activity. Ideally, I would like to have a cut down version of the Agent Activity, Last 24hours section so that in the app it will show the Agents who are on phone support and then the status.
There are three status that I would like to use, they are:
Available
Offline
On Call
I have made a start with just getting the app created and doing a simple hello function to great the current users.
I am new to this, and any help or guidance that anyone can provide would be greatly appreciated
After a lot of trial and error I finally got this work.
It refreshes upon clicking on the app, and shows if my agents are available, on a call or offline