Browse Source

支付宝支付

yijia
v-Brocloni 3 years ago
parent
commit
c76391308e
1 changed files with 0 additions and 9 deletions
  1. +0
    -9
      addons/epay/library/Service.php

+ 0
- 9
addons/epay/library/Service.php View File

@@ -51,7 +51,6 @@ class Service
$config[$type]['return_url'] = $returnurl;

if ($type == 'alipay') {
echo 1;
//创建支付对象
$pay = new Pay($config);
//支付宝支付,请根据你的需求,仅选择你所需要的即可
@@ -65,21 +64,16 @@ class Service

switch ($method) {
case 'web':
echo 4;die;
//电脑支付,跳转
$html = $pay->driver($type)->gateway('web')->pay($params);
print_r($html);die;
Response::create($html)->send();
break;
case 'wap':
echo 2;die;
//手机网页支付,跳转
$html = $pay->driver($type)->gateway('wap')->pay($params);
print_r($html);die;
Response::create($html)->send();
break;
case 'app':
echo 3;die;
//APP支付,直接返回字符串
$html = $pay->driver($type)->gateway('app')->pay($params);
break;
@@ -124,7 +118,6 @@ class Service
case 'web':
//电脑支付,跳转到自定义展示页面(FastAdmin独有)
$html = $pay->driver($type)->gateway('web')->pay($params);
print_r($html);die;
Response::create($html)->send();
break;
case 'mp':
@@ -142,7 +135,6 @@ class Service
"mweb_url"=>$html,
"referer"=>Request::instance()->server('HTTP_REFERER')
];
print_r($html);die;
return $result;
break;
case 'app':
@@ -170,7 +162,6 @@ class Service
}
//返回字符串
// $html = is_array($html) ? json_encode($html) : $html;
print_r($html);die;
return $html;
}



Loading…
Cancel
Save