Can not alter/add data on shopify paid plan store by unlisted public app - shopify

I am facing some weird issue in Shopify app development. I have created app which is working fine on Development store. it is able to add some data on development store.
But for testing purpose I have offered this app to the merchants to test this app on their live store having activated Shopify Paid plan. But app can not add any data. Post/Put requests are auto converted to Get requests.
I have created couple of apps those are published on App store and in past they were being used by Active Paid Plan merchants before app has been published without any issue.
Is there something changed on Shopify side. or I am missing something this time ?
Any help will be appreciated.

every put/post request's endpoint should be on .myshopify version of domain.
I was passing primary domain. and it was working fine in dev stores as dev store. because in dev stores .myshopify version domain and primary domains are same.
I did not get this issue for so long. it was a silly mistake but stops app functionality.
Posting answer just because other people would not make such a blunder.

Related

Xero - Contacts - API Authorization Issue

We have successfully been able to access everything on our developer environment in regards to the Xero API.
However, when we move to our production system, we are able to do every tasks using the API except for accessing the contacts endpoint of xero. We just do not understand what the issue might be.
How can the API work to post bills, invoices, but cannot create or access the contacts? Is there a setting issue? It works find in a connecting to a dev version of the Xero File (a Paid blank file), but when it comes to the production xero File (Our actual live accounting data), we cannot access contacts.
Anyone run into any such problem?
The endpoint in question is:
https://api.xero.com/api.xro/2.0/Contacts?summaryOnly=True
https://api.xero.com/api.xro/2.0/Contacts
Tried recreating the App, even with different users, seen access priveleges inside xero, all set to advisor, still problem seems to be persistent.
Seems uniqiue only to our accounting file.

Shopify Public App - How To Get Key, Token & Url

I am totally new to Shopify Public App development and I will need your help to understand it a bit better.
For a client, I need to build a Shopify Public App that will be used by several Merchants.
This application will have to access the Merchants' store via the Admin API.
If my understanding is correct, in order to access one specific Merchant's store via the Admin API, I need to have 3 pieces of information from that Merchant's store: the Public API Key, Token and URL.
Now, my question:
When the Shopify Public App is installed by a Merchant, how does my app get these 3 pieces of information (specific to that particular merchant) ?
Is there any "magic" trick? Does the Merchant need to input this info? ...
In advance, many thanks for your help
Each merchant will need to install your app. In the installation phase shopify will pass, as an argument, the access token, that is a token that you will need, to use the Admin API.
If we're talking about an embedded app is expected that every request made is authenticated.
Depending on which kind of app you want to create (embedded or not) and language you may want to use, using the Shopify Cli to create the first draft of the app is really reccommended. It will create the base to have an installable app. Here is the documentation https://shopify.dev/apps/getting-started/create
You need to install the Shopify Cli and then run
shopify app create (node | ruby | php)
depending on your language of choice.
For those who might be interested, I finally found the link to the information.
Shopify - Getting started with OAuth

How to display data in Shopify Store from external API using app proxy

My goal is to display data retrieved from a 3rd party (external) API that requires authentication in my Liquid Shopify theme.
I'm looking to access product options data from the Hulk Product Options API, which requires authentication, as documented here: https://productoption.hulkapps.com/api-docs/index.html
My goal would be to send a get request and retrieve data from the Hulk Product Options endpoint.
I've read that an App Proxy is what I need to set up, however I am new to the Shopify app world and am totally lost at how to set this up.
What I've done:
Followed the steps here to create an app and install it on a development store that I created through my partners dashboard.
Went to the partners dashboard, clicked "Apps" and found the app proxy section.
Questions:
What do I put in those fields? I can't find examples for filling out that section with info from an external API.
What code in which file do I need to add to the node app that was generated using shopify node create. Or is this app just necessary to be able to fill out the app proxy info?
What url can I send a GET request to using AJAX / JS in my liquid theme code?
I'm a theme developer new to app development and have never created an app, so if you can provide basic and specific instructions (code would be wonderful!) for someone who knows front-end and is competent but is lost in the app world it's much appreciated. I've asked other theme developers who also have also tried and not been able to figure this out, so there seems to be a gap in the tutorials and resources provided.
Thanks in advance!

What is the Shopify Public App Install Flow?

So I've been building a Shopify App.
Currently I've gotten to the point where I get the permanent access code.
My question lies with the flow of installation.
Currently the store owner would create an account on my website, then click a button to install our shopify app.
taken to shopify app install prompt -> clicks install -> redirects to my site where I exchange code for access code.
This works fine. But where I am having trouble is what if once my app is on the Shopify Store.
A store installs it from shopify directly (meaning they don't have an existing account with me) I then have no account to save the data to.
How do I go about this?
I looked at other apps on the store. Some apps like Shippo can take you straight to their site first to create an account and then install their app.
What's the solution?
You misunderstand the install from Shopify. When someone installs from Shopify, they come knocking on your door. They introduce themselves as being ***.myshopify.com. Once they approve your App and accept your terms of service, you get to confirm their account, and hence you persist their data in your database exactly the same as someone that installed your App outside Shopify.
So when you say you no account to save the data to, well of course. They are a new install. So make a new record. Instead of an update, you to a create.

What url should I use to verify my receipt in In-App Purchase

The above question I found in FAQ in Apple's Tech Notes (QNo: 15). They gave an answer like this:
Use the sandbox URL https://sandbox.itunes.apple.com/verifyReceipt
while testing your application in the sandbox and while your
application is in review.
Use the production URL http://buy.itunes.apple.com/verifyReceipt once your application is live in the App Store.
But in In-App Purchase Programming Guide (Verifying a Receipt with the App Store Section). Apple provides an url like this:
Post the JSON object to the App Store using an HTTP POST request. The
URL for the store is https://buy.itunes.apple.com/verifyReceipt.
Note that first url is using http for live account for verifying In-App Purchase while second one is using https. Which one i should use? My app got rejected because server is not getting correct response, when it sends receipt to Apple. I am using https://buy.itunes.apple.com/verifyReceipt for verifying receipt.
the best way is to first verify with the production server. if you get a 21007 code back you should make another call to the sandbox server. this is needed because during the submission process you're not always sure whether they'll use the live or sandbox server. it needs to work on both.
here's some source code that verifies receipts in safe way (counters the app store hack from last year). i added the above code to this project that will first check with the production server and then fall back to the sandbox server:
https://github.com/evands/iap_validation
EDIT: i wouldn't use that code above anymore in iOS 7. i think there are some problems with it!