如何在yii2中集成citruspay支付网关

如何在yii2中集成citruspay支付网关,yii2,Yii2,如何在yii2中集成citruspay支付网关?Citruspay提供用于支付集成的库。当我使用该库时,它会给出错误“Class'seller\citruspay\lib\Zend\u Config\u Ini'not found”-请注意 PHP致命错误–yii\base\ErrorException 找不到“卖方\模块\ citruspay \控制器\ citruspay”类 1.在第44行的C:\wamp\www\haggl\seller\modules\citruspay\contro

如何在yii2中集成citruspay支付网关?Citruspay提供用于支付集成的库。当我使用该库时,它会给出错误“Class'seller\citruspay\lib\Zend\u Config\u Ini'not found”-请注意

PHP致命错误–yii\base\ErrorException
找不到“卖方\模块\ citruspay \控制器\ citruspay”类
1.在第44行的C:\wamp\www\haggl\seller\modules\citruspay\controllers\DefaultController.php中
35363738394041424344454647484950515253
“持卡人姓名”=>Yii::$app->request->post(‘持卡人姓名’),
“卡号”=>Yii::$app->request->post('cardname'),
“expiryMonth”=>Yii::$app->request->post('expiryMonth'),
“cardType”=>Yii::$app->request->post('cardType'),
“cvvNumber”=>Yii::$app->request->post('cvvNumber'),
“expiryYear”=>Yii::$app->request->post('expiryYear'),
“returnUrl”=>Yii::$app->request->post('returnUrl'),
“金额”=>Yii::$app->request->post('amount'),
);
CitrusPay::setApiKey(“apikey”,“沙盒”);
$response=Transaction::create($tarr,CitrusPay::getApiKey());
$redirectUrl=$response->get_redirect_url();
$response_code=$response->get_resp_code();
如果($redirectUrl!=''&&$response\u code==200)
{
返回$this->redirect($redirectUrl);
}否则{
$html=“响应代码是“$Response->get_resp_Code()”

”; $html.=“响应消息是“$Response->get_resp_msg()”

”; 2.在C:\wamp\www\haggl\seller\vendor\yiisoft\yii2\base\InlineAction.php中,在第55行调用_user\u func\u数组:{C:\wamp\www\haggl\seller\vendor\yiisoft\yiiii12\base\InlineAction.php:55}() 3.在C:\wamp\www\haggl\seller\vendor\yiisoft\yii2\base\Controller.php–yii\base\InlineAction::runWithParams()中,第151行 4.在C:\wamp\www\haggl\seller\vendor\yiisoft\yii2\base\Module.php–yii\base\Controller::runAction()中,第455行 5.在C:\wamp\www\haggl\seller\vendor\yiisoft\yii2\web\Application.php–yii\base\Module::runAction()中,第83行 6.在C:\wamp\www\haggl\seller\vendor\yiisoft\yii2\base\Application.php–yii\web\Application::handleRequest()中,第375行 7.在C:\wamp\www\haggl\seller\index.php–yii\base\Application::run()中,第22行 16171819202122 require(_DIR__.'/../common/config/main local.php'), require(_DIR__.'/config/main.php'), require(_DIR__.'/config/main local.php')) ); $application=new yii\web\application($config); $application->run();
解决方案:

在Yii2文件夹中的“index.php”文件中,按如下所示进行更改


我认为您必须提供更多信息。显示一些代码,这些代码是在哪里启动类的,可能还有您的代码启动库的文件夹结构,以及库的存储位置。我已经在index.phpdefined('yi_DEBUG')或define('yi_DEBUG',true);defined('yi_ENV')或define('yi ENV',dev')中安装了库;set_include_path(DIR.'/citruspay/lib'.path_分隔符.get_include_path());require_once(DIR.'/citruspay/lib/citruspay.php');require(DIR.'/vendor/autoload.php');require(DIR.'/../common/config/alias.php'));当我在控制器中调用api时,它会出错为什么不…我正在编辑我的问题