为了账号安全,请及时绑定邮箱和手机立即绑定

Square API Search user by Email - 旧版 Sandbox 不支持端点

Square API Search user by Email - 旧版 Sandbox 不支持端点

PHP
拉风的咖菲猫 2022-05-27 14:31:55
浏览此文档时,我无法弄清楚如何使搜索功能正常工作,并且出现错误:$json = '{}';$url = 'https://connect.squareup.com/v2/customers/search';$curl_handle = curl_init($url);$request_headers = array();$request_headers[] = 'Accept: application/json';$request_headers[] = 'Authorization: Bearer '.$token;$request_headers[] = 'Content-Length: '.strlen($json);$request_headers[] = 'Content-Type: application/json';curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, 'POST');curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $request_headers);curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $json);curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);if (substr($_SERVER['HTTP_HOST'],0,4) !== 'www.') {curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);}$result = curl_exec($curl_handle);$json_response = json_decode($result,1);curl_close($curl_handle);我得到以下信息:[category] => INVALID_REQUEST_ERROR[code] => SANDBOX_NOT_SUPPORTED[detail] => This endpoint is not supported in legacy Sandbox.Learn more about the new Sandbox at https://developer.squareup.com/docs/testing/sandbox.我希望能够通过电子邮件地址进行搜索。我尝试在页面上使用 JSON,但仍然收到相同的错误消息。请问有什么想法吗?
查看完整描述

1 回答

?
小唯快跑啊

TA贡献1863条经验 获得超2个赞

不幸的是,目前无法通过电子邮件地址查询客户搜索。



查看完整回答
反对 回复 2022-05-27
  • 1 回答
  • 0 关注
  • 78 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信