链街Dcat后台
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

5 years ago
  1. <?php
  2. namespace App\Admin\Common;
  3. use Graze\GuzzleHttp\JsonRpc\Client;
  4. class Rpc
  5. {
  6. const SEPARATE_ACCOUNTS = "/separateaccounts/orderOnlineCompleted";
  7. /**
  8. * 订单完成时分账流水
  9. * @param $oid
  10. * @param $uid
  11. * @return string
  12. */
  13. public static function separateAccounts($oid,$uid){
  14. $client = Client::factory(env('RPC_SITE_HOST'));
  15. $request = $client->request(
  16. uniqid(),
  17. self::SEPARATE_ACCOUNTS,
  18. ['orderMainId' => $oid,'userId'=>$uid]);
  19. $response = $client->send($request);
  20. return $response->getBody()->getContents();
  21. }
  22. }