Exemple #1
0
 /**
  * 
  * "userId":"c00055685346","mobile":"13166361023","email":"","userName":"","cardList":[{"cardNo":"196222***********9533","issuerName":"\u4e2d\u56fd\u5de5\u5546\u94f6\u884c"}]}
  * @param unknown_type $mobile
  * @return 如果成功返回array, 如果失败返回状态码
  */
 public function get_union_user($mobile)
 {
     $response = $this->unionpay->getUserByMobile($mobile);
     $response = json_decode($response, true);
     $respCd = $response['respCd'];
     if ($respCd == '000000') {
         return $response['data'];
     } else {
         return $respCd;
     }
 }
 /**
  * 
  * 测试服务器
  * https://120.204.69.183:8090/PreWallet/restlet/outer/getUserByMobile
  * {"appId":"ALLPERM","version":"1.0","data":{"mobile":"13166361023"},"signToken":"48cb3a35ca9bf9338a0058ff46673b082dd1f47e9ed10b157da293f2a1425646a824e8a0c9513c4eb4dab178ab5a8f240c354579016f3ff6a034dbeb956e3553ff5ce7cc0f41db0e2b6fe1eeeb0e8f82aba8e84417d404cb202c7087b591b85b256a3c13b59ebf030b43beb16ff01298d2c62d421ae4b1f46c7bd66a3bd55386"}
  * 
  * curl -X POST -H 'Content-Type: application/json' -k -d '{"appId":"ALLPERM","version":"1.0","data":{"mobile":"13166361023"},"signToken":"48cb3a35ca9bf9338a0058ff46673b082dd1f47e9ed10b157da293f2a1425646a824e8a0c9513c4eb4dab178ab5a8f240c354579016f3ff6a034dbeb956e3553ff5ce7cc0f41db0e2b6fe1eeeb0e8f82aba8e84417d404cb202c7087b591b85b256a3c13b59ebf030b43beb16ff01298d2c62d421ae4b1f46c7bd66a3bd55386"}' https://120.204.69.183:8090/PreWallet/restlet/outer/getUserByMobile
  * ====
  * 正式服务器
  * 
  * 
  * https://esb.unionpay.com/cardholder/PREWALLET/PREWALLETOuterService/PREWALLETOuterServiceProxy/getUserByMobile
  * {"appId":"C0000048","version":"1.0","data":{"mobile":"13166361023"},"signToken":"b76448431d852df32afdad028cdfc1036c1a3bb0f16af78f10c535ebe83874373ff44b80110796b98ee772b9dae730bc65be66d4bc60c7d4b26847a540b5bb5c1494ba17e00d8108cc7baa3b16a5711cbf2f6ca8ac41073bfc3c9e801c5500ba39047138158b684e932febfdd152deec34c7a010645bdd1577a35cefb3db1517"}
  *
  *curl -v -X POST -H 'Content-Type: application/json' -k -d '{"appId":"C0000048","version":"1.0","data":{"mobile":"13166361023"},"signToken":"b76448431d852df32afdad028cdfc1036c1a3bb0f16af78f10c535ebe83874373ff44b80110796b98ee772b9dae730bc65be66d4bc60c7d4b26847a540b5bb5c1494ba17e00d8108cc7baa3b16a5711cbf2f6ca8ac41073bfc3c9e801c5500ba39047138158b684e932febfdd152deec34c7a010645bdd1577a35cefb3db1517"}' https://esb.unionpay.com/cardholder/PREWALLET/PREWALLETOuterService/PREWALLETOuterServiceProxy/getUserByMobile
  * 用户信息查询-手机号码方式
  */
 function testGetUserByMobile()
 {
     header('Content-Type:text/html;charset=utf-8');
     //		header( 'Content-Type:application/json;charset=utf-8');
     //		$mobile = '15166412996';
     if (empty($mobile)) {
         $mobile = '13166361023';
         //			$mobile = '15166412996';
     }
     $response = $this->unionpay->getUserByMobile($mobile);
     echo $response;
 }