本文整理匯總了PHP中Tygh\Http::put方法的典型用法代碼示例。如果您正苦於以下問題:PHP Http::put方法的具體用法?PHP Http::put怎麽用?PHP Http::put使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tygh\Http
的用法示例。
在下文中一共展示了Http::put方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createBill
public function createBill($order_transaction, $order_info)
{
$order_total = fn_format_rate_value($order_info['total'], 'F', 2, '.', '', '');
$user = str_replace(array('+', ' ', '(', ')', '-'), '', $order_info['payment_info']['phone']);
$data = array('user' => 'tel:+' . $user, 'amount' => $order_total, 'comment' => !empty($order_info['notice']) ? $order_info['notice'] : '');
$url = $this->_url . $order_transaction;
$data['ccy'] = $this->_currency;
$data['lifetime'] = $this->_lifetime;
$extra = array('headers' => $this->_headers, 'basic_auth' => array($this->_login, $this->_password));
$this->_response = Http::put($url, $data, $extra);
$this->_response = json_decode($this->_response, true);
if (!empty($this->_response['response']['result_code'])) {
$this->_error_code = $this->_response['response']['result_code'];
$this->_error_text = $this->_response['response']['description'];
}
return $this->_response;
}