Authored by zhangxiaoru

支付成功返回

... ... @@ -35,7 +35,7 @@ class AliwapService
'partner' => $this->config->partner,
'_input_charset' => $this->config->input_charset,
'notify_url' => Yohobuy::SERVICE_NOTIFY . $this->config->notify_url,
'return_url' => Helpers::url($this->config->return_url),
'return_url' => Helpers::transHttpsUrl(Helpers::url($this->config->return_url)),
/* 业务参数 */
'payment_type' => $this->config->payment_type,
'seller_id' => $this->config->partner,
... ... @@ -44,7 +44,7 @@ class AliwapService
'out_trade_no' => $params->orderCode,
'subject' => $params->goodsName,
'total_fee' => $params->totalFee / 100, //单位为元
"show_url" => Helpers::url(''),
"show_url" => Helpers::transHttpsUrl(Helpers::url('')),
);
ksort($parameter);
... ...
This diff could not be displayed because it is too large.
... ... @@ -10,7 +10,9 @@
</div>
<div class="success-btn pt50">
<a href="/">继续逛</a>
<a href="/home/orders/detail?order_code=<?php echo $this->order_code; ?>">查看订单</a>
{{#if order_code}}
<a href="/home/orders/detail?order_code={{order_code}}">查看订单</a>
{{/if}}
</div>
</div>
</div>
... ...
... ... @@ -41,7 +41,7 @@ class PayController extends AbstractAction
/* 判断用户是否登录 */
$uid = $this->getUid(true);
if (!$uid) {
$this->go( Helpers::url('/signin.html', array('refer' => $this->_request->server('HTTP_REFERER'))) );
$this->go( Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
break;
}
... ... @@ -203,6 +203,7 @@ class PayController extends AbstractAction
*/
private function commonShowResult($payResult, $payment)
{
$orderCode = '';
$this->setTitle('支付中心');
$this->setNavHeader('支付中心', Helpers::url('/home/orders'), false);
... ... @@ -210,6 +211,7 @@ class PayController extends AbstractAction
if ($payResult->payResult == 200) {
$view = 'index';
if (!empty($payResult->orderCode)) {
$orderCode = $payResult->orderCode;
//支付成功,发送一次支付确认
$uid = $this->getUid();
OrderData::payConfirm($payResult->orderCode, $payment, $uid);
... ... @@ -218,7 +220,8 @@ class PayController extends AbstractAction
$data = array(
'payBackPage' => true,
'pageFooter' => true
'pageFooter' => true,
'order_code' => $orderCode
);
$this->_view->display($view, $data);
}
... ...