{"action":"opened","issue":{"url":"https://api.github.com/repos/mercadopago/sdk-android/issues/21","repository_url":"https://api.github.com/repos/mercadopago/sdk-android","labels_url":"https://api.github.com/repos/mercadopago/sdk-android/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/mercadopago/sdk-android/issues/21/comments","events_url":"https://api.github.com/repos/mercadopago/sdk-android/issues/21/events","html_url":"https://github.com/mercadopago/sdk-android/issues/21","id":173071602,"number":21,"title":"getCustomer($params) ejemplo PHP server side","user":{"login":"FSoruco","id":11147677,"avatar_url":"https://avatars.githubusercontent.com/u/11147677?v=3","gravatar_id":"","url":"https://api.github.com/users/FSoruco","html_url":"https://github.com/FSoruco","followers_url":"https://api.github.com/users/FSoruco/followers","following_url":"https://api.github.com/users/FSoruco/following{/other_user}","gists_url":"https://api.github.com/users/FSoruco/gists{/gist_id}","starred_url":"https://api.github.com/users/FSoruco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FSoruco/subscriptions","organizations_url":"https://api.github.com/users/FSoruco/orgs","repos_url":"https://api.github.com/users/FSoruco/repos","events_url":"https://api.github.com/users/FSoruco/events{/privacy}","received_events_url":"https://api.github.com/users/FSoruco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-24T22:19:19Z","updated_at":"2016-08-24T22:19:19Z","closed_at":null,"body":"Como se tendria que modificar el getCustomer PHP para que funcione con el ejemplo del sdk de ANDROID\r\n\r\n**getCustomer de Android**\r\n\r\n```\r\nMerchantServer.getCustomer(this, mMerchantBaseUrl, mMerchantGetCustomerUri, mMerchantAccessToken);\r\n\r\n public void success(Response<Customer> response) {\r\n\r\n                mCards = response.body().getCards();   **me devuelve null**\r\n                LayoutUtil.showRegularLayout(mActivity);\r\n            }\r\n```\r\n\r\n**getCustomer del server-side**\r\n\r\n```\r\npublic function getCustomer($params) {\r\n....\r\n\r\n$merchant_data = array(\r\n\t\t\t\t\"customer\" => array(\r\n\t\t\t\t\t\"email\" => \"fgsoruco@gmail.com\"\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n$result = $this->mp->get(array(\r\n\t\t\t\t\"uri\" => \"/v1/customers/search\",\r\n\t\t\t\t\"params\" => array(\"email\" => $merchant_data[\"customer\"][\"email\"])\r\n\t\t\t));\r\n\r\nif ($result[\"status\"] == 200) {\r\n\t\t\t\t/*\r\n\t\t\t\tValidate that one (and just one) customer was returned.\r\n\t\t\t\t*/\r\n\t\t\t\t$customer = $result[\"response\"][\"paging\"][\"total\"] == 1 ? $result[\"response\"][\"results\"][0] : null;\r\n\r\n\t\t\t\t$result[\"response\"] = $customer;\r\n\t\t\t}\r\n....\r\n}\r\n\r\n```\r\nsoy nuevo en esto de php "}}
{"actor":{"display_login":"FSoruco"}}