<?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: Existing Paypal Cart to Authorize.net DPM in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Existing-Paypal-Cart-to-Authorize-net-DPM/m-p/32204#M16770</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ColorBandedcontent" style="position: relative; padding-bottom: 0px; padding-left: 3px; padding-right: 3px; clear: both; padding-top: 0px;"&gt;
&lt;DIV id="imcontent" style="margin-left: 12px;"&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;A proper integration into Authorize.Net does require some knowledge of server side programming. If you are not comfortable with PHP yourself, I would recommend checking to see if there is a plugin for your cart that already provides you this integration.&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Thanks,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Joy&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 17 Dec 2012 22:52:04 GMT</pubDate>
    <dc:creator>Joy</dc:creator>
    <dc:date>2012-12-17T22:52:04Z</dc:date>
    <item>
      <title>Existing Paypal Cart to Authorize.net DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Existing-Paypal-Cart-to-Authorize-net-DPM/m-p/32181#M16749</link>
      <description>&lt;P&gt;I have an existing shopping cart that is set up for Paypal and works exactly as we want it to. The company now says we must use authorize.net and not Paypal. I am not a php programmer so I am a bit at a loss how to hook up the cart to authorize.net. It appears that all I need to so is get the amount form the "subtotal" field and pass that to the "$amount" field in the direct_post.php page that I am working on. The direct_post.php page seems to work perfectly and I am sure that anyone knowing even a bit about php would have no problem with this.&lt;/P&gt;&lt;P&gt;We want to stay with the existing cart as it has the features that our customers are asking for and don't want to spent a lot of time building something that is already as we want it.&lt;/P&gt;&lt;P&gt;Here is the direct_post.php page:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2
$api_login_id = 'MyLoginID';
$transaction_key = 'MyTransactionKey';
$amount = "5.99";
$fp_timestamp = time();
$fp_sequence = "123" . time(); // Enter an invoice or other unique number.
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,
  $transaction_key, $amount, $fp_sequence, $fp_timestamp)
?&amp;gt;

&amp;lt;form method='post' action="&lt;A href="https://test.authorize.net/gateway/transact.dll" target="_blank"&gt;https://test.authorize.net/gateway/transact.dll&lt;/A&gt;"&amp;gt;
&amp;lt;input type='hidden' name="x_login" value="&amp;lt;?php echo $api_login_id?&amp;gt;" /&amp;gt;
&amp;lt;input type='hidden' name="x_fp_hash" value="&amp;lt;?php echo $fingerprint?&amp;gt;" /&amp;gt;
&amp;lt;input type='hidden' name="x_amount" value="&amp;lt;?php echo $amount?&amp;gt;" /&amp;gt;
&amp;lt;input type='hidden' name="x_fp_timestamp" value="&amp;lt;?php echo $fp_timestamp?&amp;gt;" /&amp;gt;
&amp;lt;input type='hidden' name="x_fp_sequence" value="&amp;lt;?php echo $fp_sequence?&amp;gt;" /&amp;gt;
&amp;lt;input type='hidden' name="x_version" value="3.1"&amp;gt;
&amp;lt;input type='hidden' name="x_show_form" value="payment_form"&amp;gt;
&amp;lt;input type='hidden' name="x_test_request" value="false" /&amp;gt;
&amp;lt;input type='hidden' name="x_method" value="cc"&amp;gt;
&amp;lt;input type='submit' value="Click here for the secure payment form"&amp;gt;
&amp;lt;/form&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is the relavent part of the checkout page:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php


include_once('jcart/jcart.php');

session_start();
?&amp;gt;
&amp;lt;?php $jcart-&amp;gt;display_cart();?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And here is the function for the subtotal:&lt;/P&gt;&lt;PRE&gt;private function update_subtotal() {
		$this-&amp;gt;itemCount = 0;
		$this-&amp;gt;subtotal  = 0;

		if(sizeof($this-&amp;gt;items &amp;gt; 0)) {
			foreach($this-&amp;gt;items as $item) {
				$this-&amp;gt;subtotal += ($this-&amp;gt;qtys[$item] * $this-&amp;gt;prices[$item]);

				// Total number of items
				$this-&amp;gt;itemCount += $this-&amp;gt;qtys[$item];
			}
		}
	}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Any help you can give me would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2012 18:21:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Existing-Paypal-Cart-to-Authorize-net-DPM/m-p/32181#M16749</guid>
      <dc:creator>clausont</dc:creator>
      <dc:date>2012-12-15T18:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Existing Paypal Cart to Authorize.net DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Existing-Paypal-Cart-to-Authorize-net-DPM/m-p/32204#M16770</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ColorBandedcontent" style="position: relative; padding-bottom: 0px; padding-left: 3px; padding-right: 3px; clear: both; padding-top: 0px;"&gt;
&lt;DIV id="imcontent" style="margin-left: 12px;"&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;A proper integration into Authorize.Net does require some knowledge of server side programming. If you are not comfortable with PHP yourself, I would recommend checking to see if there is a plugin for your cart that already provides you this integration.&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Thanks,&lt;/DIV&gt;
&lt;DIV style="font-family: MS Shell Dlg 2; direction: ltr; color: #000000; font-size: 9pt;"&gt;Joy&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 17 Dec 2012 22:52:04 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Existing-Paypal-Cart-to-Authorize-net-DPM/m-p/32204#M16770</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2012-12-17T22:52:04Z</dc:date>
    </item>
  </channel>
</rss>

