|
|
|
@ -11,6 +11,7 @@ class Rpc |
|
|
|
|
|
|
|
const SEPARATE_ACCOUNTS = "/order/onlineComplete"; |
|
|
|
const ORDER_REFUND = "/order/onlineRefund"; |
|
|
|
const GET_DISTANCE = "/location/getDistanceByTencent"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -30,6 +31,12 @@ class Rpc |
|
|
|
return $response->getBody()->getContents(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 订单整笔退款 |
|
|
|
* @param $global_order_id |
|
|
|
* @param $uid |
|
|
|
* @return string |
|
|
|
*/ |
|
|
|
public static function orderRefund($global_order_id,$uid){ |
|
|
|
$client = Client::factory(env('RPC_SITE_HOST')); |
|
|
|
$request = $client->request( |
|
|
|
@ -39,4 +46,14 @@ class Rpc |
|
|
|
$response = $client->send($request); |
|
|
|
return $response->getBody()->getContents(); |
|
|
|
} |
|
|
|
|
|
|
|
public static function getDistance($lng1, $lat1, $lng2, $lat2){ |
|
|
|
$client = Client::factory(env('RPC_SITE_HOST')); |
|
|
|
$request = $client->request( |
|
|
|
uniqid(), |
|
|
|
self::GET_DISTANCE, |
|
|
|
['lng1' => $lng1,'lat1'=>$lat1,'lng2'=>$lng2,'lat2'=>$lat2]); |
|
|
|
$response = $client->send($request); |
|
|
|
return json_decode($response->getBody()->getContents(),true); |
|
|
|
} |
|
|
|
} |