public function actionIndex() { Yii::import("application.extensions.payment.alipayNotify", true); $alipaySubmit = new alipayNotify(); $html_text = $alipaySubmit->buildRequestHttp(aaa); $this->render('/test/index'); exit; echo "<pre>"; $list = ProductAttributes::model()->findAllByAttributes(array('id' => 2)); User::find()->where('status=:status', [':status' => User::STATUS_ACTIVATED])->indexBy('id')->all(); $zine_ids = array(1, 2, 3); $list = Yii::app()->byguitar->createCommand()->select('*')->from('bg_zine')->where('id in (' . implode(',', $zine_ids) . ')')->queryAll(); print_r($list); exit; echo "this is a test page <br>"; echo Yii::getVersion(); exit; }
/** * 通知支付宝接口 * @param $data * @return 支付宝处理结果 * @throws exception */ private function sendNotifyToAlipay($data) { //构造要请求的参数数组,无需改动 $parameter = array("service" => "send_goods_confirm_by_platform", "trade_no" => trim($data['trade_no']), "logistics_name" => trim($data['logistics_name']), "invoice_no" => trim($data['invoice_no']), "transport_type" => trim($data['transport_type']), "_input_charset" => 'utf-8'); try { //建立请求 Yii::import("application.extensions.payment.alipayNotify"); $alipaySubmit = new alipayNotify(); $html_text = $alipaySubmit->buildRequestHttp($parameter); } catch (exception $e) { throw new exception('发货接口失败!【' . $e->getMessage() . '】'); } return $html_text; }