You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
643 B
32 lines
643 B
<?php
|
|
|
|
|
|
namespace App\Admin\Common;
|
|
|
|
|
|
use Graze\GuzzleHttp\JsonRpc\Client;
|
|
|
|
class Rpc
|
|
{
|
|
|
|
const SEPARATE_ACCOUNTS = "/separateaccounts/orderOnlineCompleted";
|
|
|
|
|
|
/**
|
|
* 订单完成时分账流水
|
|
* @param $oid
|
|
* @param $uid
|
|
* @return string
|
|
*/
|
|
public static function separateAccounts($oid,$uid){
|
|
$client = Client::factory(env('RPC_SITE_HOST'));
|
|
$request = $client->request(
|
|
uniqid(),
|
|
self::SEPARATE_ACCOUNTS,
|
|
['orderMainId' => $oid,'userId'=>$uid]);
|
|
$response = $client->send($request);
|
|
return $response->getBody()->getContents();
|
|
}
|
|
|
|
|
|
}
|