Showing results for 
Search instead for 
Did you mean: 

Extreme Newbie In Serach of Help with Integrating AIM with Joomla 1.7...

Well, I feel like a complete failure as a developer and I need some help. I am very very new to and e-commerce as a whole on this level. My client that I am building a site for has an account with for the payment gateway and this is what I am to use to build the product pages, cart, and checkout.

I was hoping that it was going to be much easier to integrate and/or at least that there might be some step-by-step tutorials on "how to." I was wrong. I have been searching for answers, but have not found what I am looking for....thus this cry for help.


I have no idea what I am doing to integrate this and feel so overwheled with this product. It seems more complicated than it should be and I'm sure it's much simpler than I am making it out to be. Please bare with me, I feel stupid enough at this point and have a lot of questions.



Setting and Situation


  • I am using Joomla 1.7 to develop the site (building the site currently on Apache localhost xampp)
  • I have a product page with descriptions of the products: sizes, colors, price.
  • I need to have an add to cart button that then takes me to another page ("article" in Joomla) with this information on it, asking the user if they want to continue shopping or check out.
  • If continue shoping, then return to product page or such. If check out, then create payment page.
  • I downloaded the Server Integration Method (SIM) because it seems to handle most of the transaction process for the user. Plus, I believe it allows me to put additional fields such as a color drop-down.
  • Do I need to download the Advanced Integration Method (AIM) instead to keep all the activity on the website?




  • I cannot afford to use a Joomla plugin for They are all Commercial plugins and cost capital that I don't have, so suggesting this is not an option / solution for me.
  • Where do I begin? (I know that is a broad question, but I have no clue where to put what where)
  • I placed the SIM SDK into the htdocs folder on the same level as the site this correct on it's location or do I put it into the site folder itself?
  • Do I need to place specific files in different places? Coding from SDK files into one of my pages/articles?
  • Basically, when it comes down to do i go about integrating the SDK to get the desired result below?
  • I have a page/article created for the cart...Do you know how I would go about integrating SIM and parse that information to the payment gateway, Then have the payment gateway create a page/article for the payment do I get the form from to display on the site? Etc.



Thank you so much for your help in advance! I very much appreciate it.


Humble Regards,



AIM is going to be the simplest to implement. You just call internally and the transaction either succeeds or fails. Only one small piece of code needed. Download the PHP SDK, look in the doc folder for a file called AIM.markdown. It will give you all the code examples you need.


If you want less in the way of PCI requirements, you could use DPM instead, which is essentially an upgraded form of SIM and allows you to keep the form on your site while having the data submit through If you download the DPM documentation and look at the PHP section, it's relatively simple, though it does require multiple pages and is therefore slightly more complex than AIM.


-  The SIM SDK can be placed anywhere on your server as long as it's referenced correctly. It's just like any other code library. I generally prefer to place it in a Library folder inside my public_html along with all my other library files, but that's just personal preference, and I suppose it might not hurt anything to have it outside of the web folder, especially if you edit some of the defaults in the SDK (not a good idea probably, but still...)


- Not sure what you're asking about specific places. You just call the master SDK file at the top of your page and you're good to go. Nothing has to be at a specific place, though in the case of relay response, silent post, receipt URL's, etc., you do have to make sure those URL's are configured in your control panel to match the URL's you're using on your site.


- If you want the form to display on your site, and you're doing single payments only (as opposed to subscriptions), you want to use either AIM or DPM. See above. SIM isn't documented as simply and people fill out their credit card info on, which is probably not what you're looking for.


I am using DPM.., so could I use this for php as well?  all I need to do is call the SDK 

require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK


at the top of my php page also?  


if so, what about using my form instead of the one in the sdk?

Correct. Every page that references should have that at the top. Except the path needs to be modified if you don't have the library in the same folder. For instance, if your page is in the root of your web folder, and the SDK is one level back from that, you'd need to use:


require_once '../anet_php_sdk/AuthorizeNet.php';

Where .. means you want to reference the parent directory of the current directory. Or if you have pages all over in various levels of directories and you don't want to have to constantly keep changing the path, you might use DOCUMENT_ROOT. Something like this, if I've worked it out correctly:


require_once "{$_SERVER['DOCUMENT_ROOT']}/../anet_php_sdk/AuthorizeNet.php";

Regarding using your own form, see my post in reply to this thread:


You should be able to take it from there, I hope.


Thanks for the reply TJPride!

Alright I will go with the AIM. I originally downloaded it, but wasn't sure that was the way to go (the "Advanced" part of the API was kind of intimidating, but I get where you are coming from).


So I just do the same as you responded below? Where ever I place the SDK I just call to the "require_once"?


Correct. Every page that references should have that at the top. Except the path needs to be modified if you don't have the library in the same folder. For instance, if your page is in the root of your web folder, and the SDK is one level back from that, you'd need to use:


require_once '../anet_php_sdk/AuthorizeNet.php'; 


Okay so just to make sure let me get this breakdown of the tree right...


From a product page with an add to cart button I have to create three additional pages:

  1. Cart Page (this page has a checkout button that directs to the payment code needed from the AIM.markdown, correct?)
  2. Payment Page (this page has a checkout button that when clicked sends the info to by way of the SDK. Correct?
    • Is this where I place the "require_once" code mentioned above?
    • Do I call to the authorizeAndCapture() method metioned in the  AIM.markdown?
    • I'm using Joomla how do I put this at the "TOP" of my page or do I just put it at the top of the article I am working on and surround it by the <?php...(code)...?> in my editor?
  3. Thank You Page (after the payment gateway has handeled the transaction I use the "Transaction Response" in the AIM.markdown code on this page to call that from the gateway? I also place the "require_once" code since it references for the transaction complete?)


Alright, this is all a bit overwhelming. I shall give that a shot for now. I am likely to have additional questions regarding this, but I will be looking forward to your response to make sure I am on the right path.


Thank you very much for your help!!!



To keep things simple, the cart should make any necessary updates and then forward to the payment page (passing some sort of ID for the cart record), where they'd fill out their payment info and then hit submit. On submit, an internal call is made to (yes, via authorizeAndCapture() ) , and the form is either displayed again with an error message (on failure), or a success message is displayed. I'd personally keep the success message on the same page, rather than forwarding to a receipt, since that way you have all the data right there.


Yes, that require_once should work from everywhere, assuming you explained your directory structure accurately. It can be placed anywhere on the page as long as it's above the code. I'm afraid I'm not familiar with Joomla, however, so I can't help you much there. I'm not sure if you're allowed to put PHP code into articles, or whether anything of that sort has to be coded elsewhere and then called via a template tag or whatever. My advice would be to create a simple article with <?php print "this works"; ?> and see what happens. If it prints properly rather than displaying the code, then you're good to go on inserting PHP.