public function getCallData() { return parent::getCallData(); }
function sendPost($params) { $argToken =& $params[0]; $otherPartyUsername =& $params[1]; $sendMessage =& $params[2]; $sendConfirm = false; $tokenObject = new NodeToken(); $tokenObject->retrieveToken($argToken); if ($tokenObject->valid) { $sourceUserId = $tokenObject->uid; $otherPartyUid = Planworld::nameToId($otherPartyUsername); Send::sendMessage($sourceUserId, $otherPartyUid, $sendMessage); /* The sendMessage function currently has no return code, so we fake it.*/ $sendConfirm = true; statusCode(201); } else { $sendConfirm = false; statusCode(401); } return $sendConfirm; /* Please see the API notes towards bottom for ways in which this function will change soon. */ }
protected static function process($arParameters = array(), $arExtend = array()) { //宣告付款方式物件 $PaymentMethod = 'ECPay_' . $arParameters['ChoosePayment']; self::$PaymentObj = new $PaymentMethod(); //檢查參數 $arParameters = self::$PaymentObj->check_string($arParameters); //檢查商品 $arParameters = self::$PaymentObj->check_goods($arParameters); //檢查各付款方式的額外參數&電子發票參數 $arExtend = self::$PaymentObj->check_extend_string($arExtend, $arParameters['InvoiceMark']); //過濾 $arExtend = self::$PaymentObj->filter_string($arExtend, $arParameters['InvoiceMark']); //合併共同參數及延伸參數 return array_merge($arParameters, $arExtend); }
/** * 普通接口发短信 * apikey 为云片分配的apikey * text 为短信内容 * mobile 为接收短信的手机号 */ function send_sms($content, $mobile) { $path = "/v1/sms/send.json"; return Send::sendSms($path, $GLOBALS['sms_options']['apikey'], str_replace(C('site_name'), $GLOBALS['sms_options']['signature'], $content), $mobile); }
public function actionSend($id) { $model = new Send(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $nos1 = Nos::findOne($id); $nos1->nayte_lahetetty = 'Kyllä'; $nos1->update(); $model->henkilo_id = Yii::$app->user->getId(); $model->save(); //return $this->redirect(['view', 'id' => $model->nos_id]); } else { //$snimi =Yii::$app->user->identity->sukunimi; //$enimi = Yii::$app->user->identity->etunimi; //$model->henkilo_id = $enimi . ' ' . $snimi; $model->nos_id = $id; $model->lahetyspvm = date('Y-m-d'); return $this->renderAjax('sendView', ['model' => $model]); } }
/** * Get Upload Urls * * @param recipients - required - * Comma separated email addresses of the recipients. * Maximum 300 email addresses can be provided. * The maximum length of an email address is 128 characters. * @param filecount - optional - * The number of files to be sent. Maximum 20 files can be sent at a time. * @param subject - optional - * The subject for the email notification. Maximum 200 characters are allowed in the subject. * @param message - optional - * The message for the email body. * Maximum 2000 characters are allowed in the message. * @param verifyIdentity - optional - * If true, the recipients are required to login to access the files. * @param returnReceipt - optional - * If true, an email notification is sent to the sender, when someone downloads the file. * @param password - optional - * If set, the recipients are asked to enter the password before they can access the files. The minimum length of the password is 5 characters. * @return An Upload object with upload URLs or the error code and message thrown by the server. * */ public function getUploadURLs($recipients, $filecount = '', $subject = '', $message = '', $verifyIdentity = '', $returnReceipt = '', $password = '') { $parameters = array('recipients' => $recipients); if ($filecount !== '') { $parameters['fileCount'] = $filecount; } if ($subject !== '') { $parameters['subject'] = $subject; } if ($message !== '') { $parameters['message'] = $message; } if ($verifyIdentity !== '') { $parameters['verifyIdentity'] = $verifyIdentity; } if ($returnReceipt !== '') { $parameters['returnReceipt'] = $returnReceipt; } if ($password !== '') { $parameters['password'] = $password; } $urld = 'dpi/v1/item/send'; $this->response = $this->_restTransportInstance->sendRequest($urld, $parameters, 'POST', $this->_authToken); $responseBody = simplexml_load_string($this->response); $returnObject = new Send(); if ($responseBody === false) { $errorCode = 'N/A'; $errorMessage = 'The server has encountered an error, please try again.'; $errorObject = new ErrorStatus($errorCode, $errorMessage); $returnObject->setErrorStatus($errorObject); } else { if (empty($responseBody->errorStatus)) { $itemId = (string) $responseBody->itemId; $returnObject->setItemId($itemId); $urls = array(); foreach ($responseBody->uploadUrl as $child) { $urls[] = (string) $child; } $returnObject->setUploadUrl($urls); } else { $errorCode = (string) $responseBody->errorStatus->code; $errorMessage = (string) $responseBody->errorStatus->message; $errorObject = new ErrorStatus($errorCode, $errorMessage); $returnObject->setErrorStatus($errorObject); } } return $returnObject; }
<?php /** * [华夏君拓短讯服务接口] * 创建时间 2015-12-21 15.16 */ require 'config.php'; require CLASSLIB . '/auth.class.php'; require SERVER . '/send.class.php'; $Send = new Send(); $Send->send_email("*****@*****.**", "ninhao", "神鼎飞丹砂理发店");
function xmlrpc_clientSendWrite($method_name, $params) { $argToken =& $params[0]; $otherPartyUsername =& $params[1]; $sendMessage =& $params[2]; $tokenObject = new NodeToken(); $tokenObject->retrieveToken($argToken); $sourceUserId = $tokenObject->uid; $otherPartyUid = Planworld::nameToId($otherPartyUsername); $sendConfirm = Send::sendMessage($sourceUserId, $otherPartyUid, $sendMessage); return $sendConfirm; /* Add error checking and remote support (maybe included here), like every other routine above. */ /* BUG: sendConfirm is empty. See if we can fix that. Probably not. */ }