Example #1
0
 public function submit($info)
 {
     global $CONFIG;
     $sdk = new SDK(OpenSdkConfig::APPID, OpenSdkConfig::KEYSECRET, OpenSdkConfig::SOURCENO);
     $mainParams = array('timestamp' => time() * 1000, 'channel' => 'PC', 'ipAddress' => '', 'sessionId' => '', 'deviceFinger' => '', 'deviceToken' => '', 'longitude' => '', 'latitude' => '');
     $arr = array();
     $arr["urlKey"] = "cash_desk";
     $arr["loginName"] = $info["mobile"];
     $arr["mobile"] = $info["mobile"];
     $arr["outCustomerId"] = $info["mobile"];
     $arr["outTradeNo"] = $info["order_no"];
     $arr["merchantNo"] = OpenSdkConfig::SOURCENO;
     $arr["childMerchantNo"] = OpenSdkConfig::SOURCENO;
     $arr["amount"] = 1;
     //$info["price"];
     $arr["currency"] = "CNY";
     $arr["orderBeginTime"] = date('Y-m-d H:i:s');
     $arr["orderExpireTime"] = date('Y-m-d H:i:s', time() + 3600);
     $arr["orderName"] = $info["order_no"];
     $arr["orderNotifyUrl"] = $CONFIG["xbt"]["notify"];
     $arr["orderFrontNotifyUrl"] = $CONFIG["xbt"]["return"];
     $arr["productNo"] = "DOCREMOTE";
     $arr["productName"] = "远程医疗服务";
     $arr["paySource"] = "ANDROID";
     $call = $sdk->cashDesk($mainParams, $arr);
     //echo $call;
     $json = json_decode($call, true);
     //print_r($json);
     if ($json["code"] == "1") {
         logger_mgr::logInfo("xbt:return={$call}");
         return $json["data"]["resultInfo"]["widgetPageUrl"];
     } else {
         logger_mgr::logError("xbt:return={$call}");
         return "ERROR";
     }
 }
Example #2
0
 private function getShareButton()
 {
     $appID = SDK::instance()->facebook->getApp()->getId();
     return "\n\t\t\t<div id='fb-root'></div>\n\t\t\t<script>(function(d, s, id) {\n\t\t\t  var js, fjs = d.getElementsByTagName(s)[0];\n\t\t\t  if (d.getElementById(id)) return;\n\t\t\t  js = d.createElement(s); js.id = id;\n\t\t\t  js.src = '//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=" . $appID . "';\n\t\t\t  fjs.parentNode.insertBefore(js, fjs);\n\t\t\t}(document, 'script', 'facebook-jssdk'));</script>\n\t\t\t<!-- Your share button code -->\n\t\t\t<div align='right'>\n\t\t\t\t<div class='fb-share-button' data-href='" . $this->Data['share-url'] . "'data-layout='button' data-mobile-iframe='false'></div>\n\t\t\t</div>\n\t\t";
 }
Example #3
0
 public function __construct($api_key)
 {
     parent::__construct();
     $this->params = ['key' => $api_key];
 }
Example #4
0
 /**
  * Authorize requests with a username and token
  *
  * @param  string  $username
  * @param  string  $token
  * @return void
  */
 public function __construct($username, $token)
 {
     parent::__construct();
     $this->username = $username;
     $this->token = $token;
 }
Example #5
0
 public function getFacebookData($fields)
 {
     //Allow other classes to get Facebook Data if they require it, rather than
     //restricting it to the data we get from the functions
     return SDK::instance()->facebook->get("me?fields={$fields}", $this->getToken());
 }
Example #6
0
			<meta property="og:title" <?php 
    echo "content=\"" . $this->Data['share-title'] . "\"";
    ?>
 />
			<meta property="og:description" <?php 
    echo "content=\"" . $this->Data['share-description'] . "\"";
    ?>
 />
			<meta property="og:image" <?php 
    echo "content=\"" . $this->Data['share-image-url'] . "\"";
    ?>
 />
			<meta property="og:image:width" content="475"/>
			<meta property="og:image:height" content="256"/>
			<meta property="fb:app_id" <?php 
    echo "content=\"" . SDK::instance()->facebook->getApp()->getId() . "\"";
    ?>
 />
		<?php 
}
?>
		<meta name="description" content="FaceBook Analyser - What type of Facebook user are you?">
		<meta name="keywords" content="facebook, analyser, cardiff, uni, university, group, project">
		<meta name="viewport" content="width=720, maximum-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="IE=9">
		<meta http-equiv="X-UA-Compatible" content="IE=8">
		<?php 
echo $this->getGeneratedTitle($template, true);
//Assume we're in our public directory
$template->addMultipleCSS(array("css/main.css", "css/opensans/stylesheet.css", "https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css", "css/social-buttons.css", "css/centerstage.css"));
$template->addMultipleJS(array("js/jquery-1.11.2.min.js"));
Example #7
0
 /**
  * Convert relative URL to full URL
  *
  * @param  string  $url
  * @return string
  */
 protected function baseUrl($url)
 {
     return parent::baseUrl($url) . '.json';
 }
Example #8
0
<?php

require '../include/common.inc.php';
require ROOT . '/classes/datamgr/order.cls.php';
require ROOT . "/libs/xbt_lib/SDK.php";
$sdk = new SDK(OpenSdkConfig::APPID, OpenSdkConfig::KEYSECRET, OpenSdkConfig::SOURCENO);
$mainParams = array('timestamp' => time() * 1000, 'channel' => 'PC', 'ipAddress' => '', 'sessionId' => '', 'deviceFinger' => '', 'deviceToken' => '', 'longitude' => '', 'latitude' => '');
$order_no = $_REQUEST["order_no"];
$info = $orderMgr->getOrderByOrderNo($order_no);
$time = date("YmdHis");
$price = $info["price"] * 100;
$price = 1;
$arr = array();
$arr["urlKey"] = "cash_desk";
$arr["loginName"] = $info["mobile"];
$arr["mobile"] = $info["mobile"];
$arr["outCustomerId"] = $info["mobile"];
$arr["outTradeNo"] = $info["order_no"];
$arr["merchantNo"] = "mer500220160000011801093094151";
$arr["childMerchantNo"] = "mer500220160000011801093094151";
$arr["amount"] = $price;
$arr["currency"] = "CNY";
$arr["orderBeginTime"] = date('Y-m-d H:i:s');
$arr["orderExpireTime"] = date('Y-m-d H:i:s', time() + 3600);
$arr["orderName"] = $info["order_no"];
$arr["orderNotifyUrl"] = "http://www.myhkdoc.com/PaymentGateway/XBT/notify_url.php";
$arr["orderFrontNotifyUrl"] = "http://www.myhkdoc.com/PaymentGateway/XBT/return_url.php";
$arr["productNo"] = "DOCREMOTE";
$arr["productName"] = "远程医疗服务";
$arr["paySource"] = "ANDROID";
print_r($arr);