我有兴趣为android和ios开发一个移动应用程序,连接到我的magento商店。
我目前正在使用appgyver composer来完成这个任务,但是我无法用appgyver正确地配置magento来接收和发送数据到我的magento存储区。有人能告诉我magento REST与appgyver composer集成的过程吗?
发布于 2016-03-30 16:36:18
在使用Postman应用程序查看生成的代码Magento并将其与Appgyver示例进行比较后,我意识到格式是不同的。幸运的是,我在Magento的Github上遇到了一个REST扩展,它扩展了Magento的REST功能,并提供了我需要的格式。你找不到它,这里。
然后,我能够轻松地使用Appgyver Composer REST配置页面将Magento链接到我正在创建的应用程序。
发布于 2017-08-04 06:15:12
How to integrate magento api, It's getting 500 error but it working on postman, we request volley get request and put parameter in url and header also but it still not working....pls help me
RequestQueue requestQueue = Volley.newRequestQueue(HomeProductActivity.this);
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, "http://128.199.158.123/Devtest/api/rest/categories/?oauth_consumer_key=87fb627751a50a2666e9c4501a4bc85f&oauth_token=f4cb9148deb67e05a3531e05b9edf923&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1501669923&oauth_nonce=VcTJZa&oauth_version=1.0&oauth_signature=xIrlLY0D1CGXkD49OduVqZhIVec=", "",
new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
// display response
Log.d("Response", response.toString());
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.d("Error.Response", "hfjf");
}
}) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
final Map<String, String> headers = new HashMap<>();
headers.put("Authorization", "OAuth oauth_consumer_key=\"87fb627751a50a2666e9c4501a4bc85f\",oauth_token=\"f4cb9148deb67e05a3531e05b9edf923\",oauth_signature_method=\"HMAC-SHA1\",oauth_timestamp=\"1501750716\",oauth_nonce=\"Imh2HF\",oauth_version=\"1.0\",oauth_signature=\"b%2F5UoepFy6QL7oFDBMAh9ij0yGM%3D\"");
return headers;
}
};
getRequest.setRetryPolicy(new DefaultRetryPolicy(80000,
DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
DefaultRetryPolicy.DEFAULT_TIMEOUT_MS));
requestQueue.add(getRequest);
requestQueue.add(getRequest);https://stackoverflow.com/questions/36145600
复制相似问题