yershop商城系统的支付模块问题

WBOY
Release: 2016-06-23 13:31:46
Original
1263 people have browsed it

这个商城系统是用ThinkPHP框架进行开发的,但是有很多毛病就不吐槽了。最崩溃的毛病是商城的核心功能??支付功能有语法错误导致无法支付。如图:


求教大神,这该怎么改,纠结了好久好久。。。。。
在这里数组中使用C方法就报错。

代码片段:

<?phpnamespace Think\Pay\Driver;class Alipay extends \Think\Pay\Pay {    protected $gateway = 'https://mapi.alipay.com/gateway.do';    protected $verify_url = 'http://notify.alipay.com/trade/notify_query.do';    protected $config = array(               'email' => C('ALIPAYEMAIL'), //这部分报错        'key' =>  C('ALIPAYKEY'),        'partner' =>  C('ALIPAYPARTNER')    );    public function check() {        if (!$this->config['email'] || !$this->config['key'] || !$this->config['partner']) {            E("支付宝账号未开通!");        }        return true;    }
Copy after login


回复讨论(解决方案)

        'email' => C('ALIPAYEMAIL'), //这部分报错
        'key' =>  C('ALIPAYKEY'),
        'partner' =>  C('ALIPAYPARTNER')

ALIPAYEMAIL  是否有预定义 ,有的话去掉单引号,试试吧。

        'email' => C('ALIPAYEMAIL'), //这部分报错
        'key' =>  C('ALIPAYKEY'),
        'partner' =>  C('ALIPAYPARTNER')

ALIPAYEMAIL  是否有预定义 ,有的话去掉单引号,试试吧。



还是这样子。。

有没有懂ThinkPHP的人,很明显,这是个类。出错的地方是在类中使用了C函数。我也不是很懂C函数是怎么个情况,竟然不能在类中使用,求教

刚刚我看那个c方法里面多了一个空格

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template