I encountered a problem about importing php files.
Why this works:
include( Yii::getPathOfAlias( 'ext.payu.payU').'.php' );
but that don’t:
Yii::import( 'ext.payu.payU');
?
file payU.php:
include_once( dirname(__FILE__) . "/sdk/openpayu.php"); //this is a valid path
class payU{ }
Try to do
Yii::import('ext.payu.payU', true)because default one-parameterYii::import()function call means:and you have to do
new payU()for this to work.