如何集成第三方类库

浏览:1624 发布日期:2015/02/25 分类:求助交流 关键字: 第三方 类库
最近自己开发一款APP,里面用到了支付功能。使用了pingpp sdk 集成到 thinkphp 框架中。可惜本人对php 了解甚少,集成报错,肯定是弱智错误。
:(
Class 'Api\Org\lib\Pingpp\Pingpp' not found
错误位置
FILE: /Users/liming/Documents/svn/apimassage/2/App/Api/Controller/PayController.class.php  LINE: 20
ThinkPHP3.2.1 { Fast & Simple OOP PHP framework } -- [ WE CAN DO IT JUST THINK ]

以下是代码=======
<?php
namespace Api\Controller;
use Api\Controller\CommonController;

//require_once(dirname(__FILE__) . '../../Org/lib/Pingpp.php');

import('Org.lib.Pingpp.Pingpp',dirname(__FILE__),'.php');

use Api\Org\lib\Pingpp\Pingpp;


/**
* PUSH模块
*/
class PayController extends CommonController{

public function retrieve(){


Pingpp::setApiKey("YOUR-KEY");
$ch = Pingpp_Charge::retrieve("ch_id");
}

public function refund(){

Pingpp::setApiKey("YOUR-KEY");
$ch = Pingpp_Charge::retrieve("ch_id");
$ch->refunds->create(
array(
"amount" => 10,
"description" => "apple"
)
);
}

=================
有没有大拿帮忙解决一下。
最佳答案
评论( 相关
后面还有条评论,点击查看>>