Answer the question
In order to leave comments, you need to log in
Yii how to connect extension paypal?
Good afternoon!
Tell me how to connect rest-api-sdk-php in Yii v1? https://github.com/paypal/PayPal-PHP-SDK
Added to composer in extensions folder
{
"require": {
"paypal/rest-api-sdk-php": "*"
}
}
protected/extensions/vendor/paypal/rest-api-sdk-php/
'import'=>array(
'application.models.*',
'application.components.*',
'application.extensions.*',
'application.extensions.PayPal.*'
),
...
$apiContext = new \PayPal\Rest\ApiContext(
...
Fatal error: Class 'PayPal\Rest\ApiContext' not found in /var/DEV/www/est.loc/web/protected/controllers/AccountController.php on line 26
Answer the question
In order to leave comments, you need to log in
Did not work from the first version, but:
www.yiiframework.com/doc/guide/1.1/en/extension.in...
Here is the path to the extension: protected/vendors/Zend/Search/Lucene.php
PayPal: protected/ extensions/vendor/paypal/rest-api-sdk-php/
Next, at the very beginning of the file containing the controller class, add the line:
Yii::import('application.vendors.*');
require_once('Zend/Search/Lucene.php');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question