How To Include Authorizenet Into Yii Project ?


I want to add to project Sandbox of as it is written here

I head of my control I wrote :

require_once(Yii::app()->basePath . '/vendor/authorize_net/lib/AuthorizeNetDPM.php');

require_once(Yii::app()->basePath . '/vendor/authorize_net/lib/AuthorizeNetSIM.php');

class PaymentController extends Controller


But I get error :

include(AuthorizeNetSIM_Form.php): failed to open stream: No such file or directory  

class AuthorizeNetSIM_Form is defined in protected/vendor/authorize_net/lib/AuthorizeNetSIM.php file.

Can the reason of error that file name AuthorizeNetSIM and class AuthorizeNetSIM_Fore difft

Which is the correct way to include AuthorizeNet into yii 1.1.15 project ?

try this-


And I get error on first file

require_once(/tybapp/vendor/authorize_net/lib/AuthorizeNetDPM.php): failed to open stream: No such file or directory 

It looks like my first variant was more correct ?

You still missing the real path. just print this -

echo Yii::app()->request->baseUrl;

and specify the correct path.

I suggest you put your vendor directory outside the protected directory and try the same code to specify the path -


will not work he is including a file not sending to the browser.

@mstdmstd I don’t see reference to AuthorizeNetSIM_Form anywhere in your code just double check if the file AuthorizeNetSIM_Form is present in your vendor/authorize_net folder if it is there then include a reference to that too


$vendor = Yii::app()->basePath . '/vendor/authorize_net/lib/';




Actually in class /protected/vendor/authorize_net/lib/AuthorizeNetSIM.php

there are definitions of several classes :

class AuthorizeNetSIM extends AuthorizeNetResponse



class AuthorizeNetSIM_Form



Maybe that is the point that system search file AuthorizeNetSIM_Form.php by class name AuthorizeNetSIM_Form.

I meam 1 file for 1 class definition.

could I to deal with it ?

I used lib in my Symfony 1.4 project, and it was good.

That is why I decided to use in Yii 1.1.15 project…

its likely somebody has done the hardwork look for a ext.

here you go

Thank you for links,

But I my link I used AuthorizeNetDPM, but in

link that is Customer Information Manager (CIM) API.

Is it that CIM as many functional stystem as original AuthorizeNetDPM is simplified version of AuthorizeNet API ?

I read the docd with the ext and has seveal questions :

  1. Difference customer profile and customer payment profile ? Are these buyer and seller?

2)If I want to test it in testMode how to organize them ? I mean have I to make 2 accounts for buyer and seller?

  1. Do I need payments cards for testMode ?

  2. Creating new profile with authNetCreateProfile method have I save returned profileID in database for next using?

If somebody worked with this extension ? Is it good ?