diff --git a/app/common.php b/app/common.php index 93f519ee7..ee2817d0a 100755 --- a/app/common.php +++ b/app/common.php @@ -1186,7 +1186,6 @@ function HexToRgb($hex_color) { 'b' => hexdec(substr($color, 4, 2)) ]; } else { - $color = $hex_color; $r = substr($color, 0, 1) . substr($color, 0, 1); $g = substr($color, 1, 1) . substr($color, 1, 1); $b = substr($color, 2, 1) . substr($color, 2, 1); diff --git a/app/service/OrderService.php b/app/service/OrderService.php index e755e1703..b180e2c3a 100755 --- a/app/service/OrderService.php +++ b/app/service/OrderService.php @@ -356,7 +356,7 @@ class OrderService return $ret; } - return DataReturn(empty($ret['msg']) ? '支付接口异常' : $ret['msg'], -1); + return DataReturn(empty($ret['msg']) ? '支付接口异常' : $ret['msg'], isset($ret['code']) ? $ret['code'] : -1, isset($ret['data']) ? $ret['data'] : ''); } /** diff --git a/extend/payment/CashPayment.php b/extend/payment/CashPayment.php index 948a4df6c..806cab663 100755 --- a/extend/payment/CashPayment.php +++ b/extend/payment/CashPayment.php @@ -124,77 +124,73 @@ class CashPayment // 是否开启了自定义支付信息 if(!empty($this->config) && isset($this->config['is_custom_pay']) && $this->config['is_custom_pay'] == 1) { - $html = ' - - - - 支付信息 - - - -

按照以下支付信息进行打款

-
'; + if(APPLICATION == 'web') + { + $h1_margin = '50px;'; + $margin = '50px;'; + $padding = '30px;'; + $radius = '2px;'; + } else { + $h1_margin = '10px;'; + $margin = '20px;'; + $padding = '10px;'; + $radius = '10px;'; + } + $html = '

按照以下支付信息进行打款

+
'; // 文本信息 if(!empty($this->config['content'])) { - $html .= '
- - '; + if(APPLICATION == 'web') + { + $home_url = __MY_URL__; + $order_url = MyUrl('index/order/index'); + $html .= '
回到首页进入我的订单
'; + $html .= '
'; + } - die($html); + // app则返回固定错误码和html代码、返回固定错误码 + if(APPLICATION == 'app') + { + return DataReturn('success', -6666, $html); + } + + // web端直接输出html + die('支付信息'.$html.''); } // 默认方式 @@ -202,7 +198,7 @@ class CashPayment $url .= 'out_trade_no='.$params['order_no']; $url .= '&subject='.$params['name']; $url .= '&total_price='.$params['total_price']; - return DataReturn('处理成功', 0, $url); + return DataReturn('success', 0, $url); } /** @@ -216,7 +212,7 @@ class CashPayment */ public function Respond($params = []) { - return DataReturn('处理成功', 0, $params); + return DataReturn('success', 0, $params); } } ?> \ No newline at end of file