Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
增加网关支付功能
  • Loading branch information
BCloudOne authored May 25, 2020
1 parent 976d3a3 commit a0dee68
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/BCloudOne/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,50 @@ public function WithdrawApply($user_tag, $order_id, $coin, $amount, $address, $a
return $res;
}

/**
* 发起网关支付订单
* @param $title
* @param $currency_type
* @param $value
* @param $callback_url
* @param $return_url
* @param $merc_order_id
* @param $order_type
* @param $is_convert
* @return mixed
* @throws BCloudException
*/
public function GatewayApply($title, $currency_type, $value, $callback_url, $return_url, $merc_order_id, $order_type, $is_convert)
{
$param = [
'title' => $title,
'currency_type' => $currency_type,
'value' => $value,
'callback_url' => $callback_url,
'return_url' => $return_url,
'merc_order_id' => $merc_order_id,
"order_type" => $order_type,
"is_convert" => $is_convert
];
$res = $this->post("gateway/apply", $param);
return $res;
}

/**
* 根据商户订单号查询网关订单信息
* @param $order_id
* @return mixed
* @throws BCloudException
*/
public function getGatewayOrderById($order_id)
{
$param = [
'order_id' => $order_id,
];
$res = $this->post("gateway/order_info", $param);
return $res;
}

/**
* 根据币种和交易hash查询充值订单信息
* @param string $coin
Expand Down

0 comments on commit a0dee68

Please sign in to comment.