<?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 Submit transaction using XML in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-transaction-using-XML/m-p/17258#M9662</link>
    <description>&lt;P&gt;I just implemented the ARB XML/PHP sample code and it works great. &amp;nbsp;I now just need a script that wil post a one-time transaction. &amp;nbsp;I would like to use the XML/PHP code since I've already learned it and have most everything setup. &amp;nbsp;I've searched all over the website and cannot find a PDF or sample code to do this. &amp;nbsp;Does this exist? &amp;nbsp;I'm assuming I just need the Schema﻿ and fields? &amp;nbsp;Thanks for any help!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2011 16:41:41 GMT</pubDate>
    <dc:creator>justinomaha</dc:creator>
    <dc:date>2011-09-23T16:41:41Z</dc:date>
    <item>
      <title>Submit transaction using XML</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-transaction-using-XML/m-p/17258#M9662</link>
      <description>&lt;P&gt;I just implemented the ARB XML/PHP sample code and it works great. &amp;nbsp;I now just need a script that wil post a one-time transaction. &amp;nbsp;I would like to use the XML/PHP code since I've already learned it and have most everything setup. &amp;nbsp;I've searched all over the website and cannot find a PDF or sample code to do this. &amp;nbsp;Does this exist? &amp;nbsp;I'm assuming I just need the Schema﻿ and fields? &amp;nbsp;Thanks for any help!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2011 16:41:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-transaction-using-XML/m-p/17258#M9662</guid>
      <dc:creator>justinomaha</dc:creator>
      <dc:date>2011-09-23T16:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Submit transaction using XML</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-transaction-using-XML/m-p/17278#M9671</link>
      <description>&lt;P&gt;If you look in your SDK in the doc folder for a file called AIM.markdown, it will supply sample code you can use. Here's what I'm using myself - note that certain fields like $_POST['initial_amount'] are verified internally to make sure they're valid before sending:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    $authorize = new AuthorizeNetAIM(
        $GLOBALS['_authorize_id'], $GLOBALS['_authorize_key']);
    $authorize-&amp;gt;setSandbox(false);

    $fields = array(
        'first_name' =&amp;gt; $_POST['first'],
        'last_name' =&amp;gt; $_POST['last'],
        'company' =&amp;gt; $_POST['company'],
        'address' =&amp;gt; $_POST['address'],
        'city' =&amp;gt; $_POST['city'],
        'state' =&amp;gt; $_POST['state'],
        'zip' =&amp;gt; $_POST['zip'],
        'country' =&amp;gt; 'US',

        'phone' =&amp;gt; $_POST['phone'],
        'email' =&amp;gt; $_POST['email'],

        'customer_ip' =&amp;gt; $_SERVER['REMOTE_ADDR'],

        'description' =&amp;gt; "{$_POST['type']} initial fee for " . count($_POST['zips']) . " zip codes with {$population} total estimated population",
        'amount' =&amp;gt; $_POST['initial_payment'],

        'card_num' =&amp;gt; $_POST['card_number'],
        'exp_date' =&amp;gt; sprintf('%02d%02d', $_POST['card_exp_month'], ($_POST['card_exp_year'] % 1000)),
        'card_code' =&amp;gt; $_POST['card_ccv']
    );
    $authorize-&amp;gt;setFields($fields);

    $result = $authorize-&amp;gt;authorizeAndCapture();

    if ($result-&amp;gt;error || $result-&amp;gt;{'response_code'} != 1)
        $errors[] = "Initial charge declined - {$result-&amp;gt;response_reason_text}";&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2011 23:52:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-transaction-using-XML/m-p/17278#M9671</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-23T23:52:56Z</dc:date>
    </item>
  </channel>
</rss>

