2016-03-22 11 views
0

私はマジックストアに接続されているアンドロイドとiosのモバイルアプリを作成することに興味があります。Magento APIをAppgyver Composerで設定するには?

私は現在、これを行うためにappgyver作曲家を使用していますが、私はmaggyoストアとの間でデータを送受信するappgyverでmagento APIを正しく設定できません。誰かが私にmagento REST APIをappgyver作曲家と統合するプロセスを教えてもらえますか?

答えて

0

Magento APIが生成したコードを調べるためにPostmanアプリを使用し、Appgyver APIの例と比較した後、私はフォーマットが異なっていることに気付きました。幸運にもMagentoのREST API拡張機能をGithubに追加しました。これはMagentoのREST API機能を拡張し、必要なフォーマットも提供しています。あなたはそれを見つけることができませんhere

私は、Appgyver Composer REST API設定ページを使ってMagentoを作成しようとしているアプリに簡単にリンクすることができました。

0
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); 
関連する問題