<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AIM newbie help with sample code! in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14868#M8527</link>
    <description>&lt;P&gt;Hmmm. Okay I did some more researching and I think I got it figured out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2011 03:08:41 GMT</pubDate>
    <dc:creator>andrewliu</dc:creator>
    <dc:date>2011-07-15T03:08:41Z</dc:date>
    <item>
      <title>AIM newbie help with sample code!</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14482#M8494</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I just started getting into payment methods and such and I looked between authorize.net and paypal, and based on the sample code with authorize.net it seems a little easier to me. However, I still have a few questions as I'm new to this industry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used and tested the sample code from this site&amp;nbsp;&lt;A target="_blank" href="http://developer.authorize.net/downloads/samplecode"&gt;http://developer.authorize.net/downloads/samplecode&lt;/A&gt;﻿ and tested it with PHP. My question is, if I build a page and pass the variables into the values that is required within the sample code, is that good enough to have a payment system? Also, when I tested the sample code, it outputs a list of values. How do I have it so if the credit card is authorized, the page will be sent somewhere else?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, hopefully you guys can understand my issue and help me resolve it.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2011 05:15:52 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14482#M8494</guid>
      <dc:creator>andrewliu</dc:creator>
      <dc:date>2011-07-14T05:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: AIM newbie help with sample code!</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14510#M8501</link>
      <description>&lt;P&gt;Since you're using PHP,&amp;nbsp; I might be able to help.&lt;/P&gt;&lt;P&gt;I've never coded in PHP before, so my method might seem a bit strange to those who use it all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the page where I am getting the transaction result data from AuthNet,&amp;nbsp; I put this at the end of all the code:&lt;/P&gt;&lt;PRE&gt;$parsedresponse = parse_api_response($response);
if ("Ok" == $parsedresponse-&amp;gt;messages-&amp;gt;resultCode) {
	echo "&amp;lt;meta http-equiv=refresh content=0;url=&lt;A target="_blank" href="http://www.yourdomainname.com/yourdirectory/yourpage.php?responsecode="&gt;http://www.yourdomainname.com/yourdirectory/yourpage.php?responsecode=&lt;/A&gt;"
	. urlencode($parsedresponse-&amp;gt;messages-&amp;gt;resultCode)
	. "yourvariable_1="
	. $_POST["yourvariable_1"]
	. "&amp;amp;yourvariable_2="
	. $_POST["yourvariable_2"]
	. "&amp;gt;";
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What that does is create a META Refresh on the page that redirects the browser to the specified URL.&lt;/P&gt;&lt;P&gt;In that URL there is 1 variable that is coming from AuthNet's response, and 2 variables that were passed to the page by my own form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'resultcode' is coming from AuthNet, and we are assuming that the value of that is 'Ok' for this example.&lt;/P&gt;&lt;P&gt;'yourvariable_1' and 'yourvariable_2' were passed through the form on whatever page triggered this transaction page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp; if I had passed yourvariable_1 with the value '123' and had passed yourvariable_2 with 'ABC',&amp;nbsp; when the user was redirected using the META Refresh they would end up at:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://www.yourdomain.com/yourdirectory/yourfile.php?responsecode=Ok&amp;amp;yourvariable_1=12345&amp;amp;yourvariable_2=ABCDE"&gt;www.yourdomain.com/yourdirectory/yourfile.php?responsecode=Ok&amp;amp;yourvariable_1=123&amp;amp;yourvariable_2=ABC&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You just need to change the 'yourvariable' references to whatever you are actually passing (if you are passing anything at all that you need for your own tracking purposes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The line with the $urlencode in it is pulling data that comes back from Authnet.&lt;/P&gt;&lt;P&gt;The lines with $_POST is getting that data from the form that was used to load the page to begin with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can add/remove more of them as required by your own needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also set whatever page you want as the landing page from the META Refresh..&amp;nbsp; it doesn't have to be a php page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is probably some easier way to do this.. or maybe a 'better' way.. but this works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2011 14:19:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14510#M8501</guid>
      <dc:creator>WHeisenberg</dc:creator>
      <dc:date>2011-07-14T14:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: AIM newbie help with sample code!</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14866#M8526</link>
      <description>&lt;P&gt;Thank you for taking the time to help me out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand how your code works, but I'm trying to understand the implementation. Like where is the $response coming from? The only thing I have in front of me is the sample php from that url. And it goes through a foreach loop getting the values of user's credit card and billling information. I ran through the php and I can verify that it works because I get emails saying that the test card was authorized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But can you show me how your $response looks like? What variables/values its holding? But also, it looks like you're using object-oriented programming with -&amp;gt; which I'm still a beginner at, and would like to see some information with what is written for messages and resultCode?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help, I think these examples will help me greatly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 02:19:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14866#M8526</guid>
      <dc:creator>andrewliu</dc:creator>
      <dc:date>2011-07-15T02:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: AIM newbie help with sample code!</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14868#M8527</link>
      <description>&lt;P&gt;Hmmm. Okay I did some more researching and I think I got it figured out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2011 03:08:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/AIM-newbie-help-with-sample-code/m-p/14868#M8527</guid>
      <dc:creator>andrewliu</dc:creator>
      <dc:date>2011-07-15T03:08:41Z</dc:date>
    </item>
  </channel>
</rss>

