<?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 Multiple Transactions on One Page in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34096#M18588</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an application that would allow more than one customer to contribute to the total cost of the purchase by enabling them to designate how much of the total purchase price they would like to pay at check out. &amp;nbsp;You can see a simple example here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.splitsum.com/samples/your_store/2cards.php" target="_blank"&gt;http://www.splitsum.com/samples/your_store/2cards.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am usng the Advanced Integration Method and have the page submitting to the following script. &amp;nbsp;Unfrotunately, it only processes the second credit card's order and does not process the first card at all. &amp;nbsp;Would anyone be able to explain to me what I am doing wrong? &amp;nbsp;Any help would be greatly appreciated. &amp;nbsp;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;/P&gt;&lt;P&gt;require_once 'coffee_store_settings.php';&lt;/P&gt;&lt;P&gt;if ($METHOD_TO_USE == "AIM") {&lt;BR /&gt;$transaction = new AuthorizeNetAIM;&lt;BR /&gt;$transaction-&amp;gt;setSandbox(AUTHORIZENET_SANDBOX);&lt;BR /&gt;$transaction-&amp;gt;setFields(&lt;BR /&gt;array(&lt;BR /&gt;'amount' =&amp;gt; $_POST['amount'],&lt;BR /&gt;'card_num' =&amp;gt; $_POST['x_card_num'],&lt;BR /&gt;'exp_date' =&amp;gt; $_POST['x_exp_date'],&lt;BR /&gt;'first_name' =&amp;gt; $_POST['x_first_name'],&lt;BR /&gt;'last_name' =&amp;gt; $_POST['x_last_name'],&lt;BR /&gt;'address' =&amp;gt; $_POST['x_address'],&lt;BR /&gt;'city' =&amp;gt; $_POST['x_city'],&lt;BR /&gt;'state' =&amp;gt; $_POST['x_state'],&lt;BR /&gt;'country' =&amp;gt; $_POST['x_country'],&lt;BR /&gt;'zip' =&amp;gt; $_POST['x_zip'],&lt;BR /&gt;'email' =&amp;gt; $_POST['x_email'],&lt;BR /&gt;'card_code' =&amp;gt; $_POST['x_card_code'],&lt;BR /&gt;)&lt;BR /&gt;);&lt;BR /&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;BR /&gt;if ($response-&amp;gt;approved) {&lt;BR /&gt;$transaction = new AuthorizeNetAIM;&lt;BR /&gt;$transaction-&amp;gt;setSandbox(AUTHORIZENET_SANDBOX);&lt;BR /&gt;$transaction-&amp;gt;setFields(&lt;BR /&gt;array(&lt;BR /&gt;'amount' =&amp;gt; $_POST['amount'],&lt;BR /&gt;'card_num' =&amp;gt; $_POST['x_card_num'],&lt;BR /&gt;'exp_date' =&amp;gt; $_POST['x_exp_date'],&lt;BR /&gt;'first_name' =&amp;gt; $_POST['x_first_name'],&lt;BR /&gt;'last_name' =&amp;gt; $_POST['x_last_name'],&lt;BR /&gt;'address' =&amp;gt; $_POST['x_address'],&lt;BR /&gt;'city' =&amp;gt; $_POST['x_city'],&lt;BR /&gt;'state' =&amp;gt; $_POST['x_state'],&lt;BR /&gt;'country' =&amp;gt; $_POST['x_country'],&lt;BR /&gt;'zip' =&amp;gt; $_POST['x_zip'],&lt;BR /&gt;'email' =&amp;gt; $_POST['x_email'],&lt;BR /&gt;'card_code' =&amp;gt; $_POST['x_card_code'],&lt;BR /&gt;)&lt;BR /&gt;);&lt;BR /&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;BR /&gt;&lt;BR /&gt;} elseif (count($_POST)) {&lt;BR /&gt;$response = new AuthorizeNetSIM;&lt;BR /&gt;if ($response-&amp;gt;isAuthorizeNet()) {&lt;BR /&gt;if ($response-&amp;gt;approved) {&lt;BR /&gt;// Transaction approved! Do your logic here.&lt;BR /&gt;// Redirect the user back to your site.&lt;BR /&gt;$return_url = $site_root . 'thank_you_page.php?transaction_id=' .$response-&amp;gt;transaction_id;&lt;BR /&gt;} else {&lt;BR /&gt;// There was a problem. Do your logic here.&lt;BR /&gt;// Redirect the user back to your site.&lt;BR /&gt;$return_url = $site_root . 'error_page.php?response_reason_code='.$response-&amp;gt;response_reason_code.'&amp;amp;response_code='.$response-&amp;gt;response_code.'&amp;amp;response_reason_text=' .$response-&amp;gt;response_reason_text;&lt;BR /&gt;}&lt;BR /&gt;echo AuthorizeNetDPM::getRelayResponseSnippet($return_url);&lt;BR /&gt;} else {&lt;BR /&gt;echo "MD5 Hash failed. Check to make sure your MD5 Setting matches the one in config.php";&lt;BR /&gt;}&lt;BR /&gt;} }&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2013 22:33:15 GMT</pubDate>
    <dc:creator>shiva3000</dc:creator>
    <dc:date>2013-04-30T22:33:15Z</dc:date>
    <item>
      <title>Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34096#M18588</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an application that would allow more than one customer to contribute to the total cost of the purchase by enabling them to designate how much of the total purchase price they would like to pay at check out. &amp;nbsp;You can see a simple example here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.splitsum.com/samples/your_store/2cards.php" target="_blank"&gt;http://www.splitsum.com/samples/your_store/2cards.php&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am usng the Advanced Integration Method and have the page submitting to the following script. &amp;nbsp;Unfrotunately, it only processes the second credit card's order and does not process the first card at all. &amp;nbsp;Would anyone be able to explain to me what I am doing wrong? &amp;nbsp;Any help would be greatly appreciated. &amp;nbsp;Thanks so much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;/P&gt;&lt;P&gt;require_once 'coffee_store_settings.php';&lt;/P&gt;&lt;P&gt;if ($METHOD_TO_USE == "AIM") {&lt;BR /&gt;$transaction = new AuthorizeNetAIM;&lt;BR /&gt;$transaction-&amp;gt;setSandbox(AUTHORIZENET_SANDBOX);&lt;BR /&gt;$transaction-&amp;gt;setFields(&lt;BR /&gt;array(&lt;BR /&gt;'amount' =&amp;gt; $_POST['amount'],&lt;BR /&gt;'card_num' =&amp;gt; $_POST['x_card_num'],&lt;BR /&gt;'exp_date' =&amp;gt; $_POST['x_exp_date'],&lt;BR /&gt;'first_name' =&amp;gt; $_POST['x_first_name'],&lt;BR /&gt;'last_name' =&amp;gt; $_POST['x_last_name'],&lt;BR /&gt;'address' =&amp;gt; $_POST['x_address'],&lt;BR /&gt;'city' =&amp;gt; $_POST['x_city'],&lt;BR /&gt;'state' =&amp;gt; $_POST['x_state'],&lt;BR /&gt;'country' =&amp;gt; $_POST['x_country'],&lt;BR /&gt;'zip' =&amp;gt; $_POST['x_zip'],&lt;BR /&gt;'email' =&amp;gt; $_POST['x_email'],&lt;BR /&gt;'card_code' =&amp;gt; $_POST['x_card_code'],&lt;BR /&gt;)&lt;BR /&gt;);&lt;BR /&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;BR /&gt;if ($response-&amp;gt;approved) {&lt;BR /&gt;$transaction = new AuthorizeNetAIM;&lt;BR /&gt;$transaction-&amp;gt;setSandbox(AUTHORIZENET_SANDBOX);&lt;BR /&gt;$transaction-&amp;gt;setFields(&lt;BR /&gt;array(&lt;BR /&gt;'amount' =&amp;gt; $_POST['amount'],&lt;BR /&gt;'card_num' =&amp;gt; $_POST['x_card_num'],&lt;BR /&gt;'exp_date' =&amp;gt; $_POST['x_exp_date'],&lt;BR /&gt;'first_name' =&amp;gt; $_POST['x_first_name'],&lt;BR /&gt;'last_name' =&amp;gt; $_POST['x_last_name'],&lt;BR /&gt;'address' =&amp;gt; $_POST['x_address'],&lt;BR /&gt;'city' =&amp;gt; $_POST['x_city'],&lt;BR /&gt;'state' =&amp;gt; $_POST['x_state'],&lt;BR /&gt;'country' =&amp;gt; $_POST['x_country'],&lt;BR /&gt;'zip' =&amp;gt; $_POST['x_zip'],&lt;BR /&gt;'email' =&amp;gt; $_POST['x_email'],&lt;BR /&gt;'card_code' =&amp;gt; $_POST['x_card_code'],&lt;BR /&gt;)&lt;BR /&gt;);&lt;BR /&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;BR /&gt;&lt;BR /&gt;} elseif (count($_POST)) {&lt;BR /&gt;$response = new AuthorizeNetSIM;&lt;BR /&gt;if ($response-&amp;gt;isAuthorizeNet()) {&lt;BR /&gt;if ($response-&amp;gt;approved) {&lt;BR /&gt;// Transaction approved! Do your logic here.&lt;BR /&gt;// Redirect the user back to your site.&lt;BR /&gt;$return_url = $site_root . 'thank_you_page.php?transaction_id=' .$response-&amp;gt;transaction_id;&lt;BR /&gt;} else {&lt;BR /&gt;// There was a problem. Do your logic here.&lt;BR /&gt;// Redirect the user back to your site.&lt;BR /&gt;$return_url = $site_root . 'error_page.php?response_reason_code='.$response-&amp;gt;response_reason_code.'&amp;amp;response_code='.$response-&amp;gt;response_code.'&amp;amp;response_reason_text=' .$response-&amp;gt;response_reason_text;&lt;BR /&gt;}&lt;BR /&gt;echo AuthorizeNetDPM::getRelayResponseSnippet($return_url);&lt;BR /&gt;} else {&lt;BR /&gt;echo "MD5 Hash failed. Check to make sure your MD5 Setting matches the one in config.php";&lt;BR /&gt;}&lt;BR /&gt;} }&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 22:33:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34096#M18588</guid>
      <dc:creator>shiva3000</dc:creator>
      <dc:date>2013-04-30T22:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34097#M18589</link>
      <description>&lt;P&gt;because the input fields name is the same&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 22:50:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34097#M18589</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2013-04-30T22:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34132#M18620</link>
      <description>&lt;P&gt;I tried to rename the fields but it did nto work because the variable names need to all be the same in order for them to be processed by the authorized.net server. &amp;nbsp;If I try to submit something like $amount2, it is rejected. &amp;nbsp;Anyone have any idea as to how to work around it?&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 21:30:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34132#M18620</guid>
      <dc:creator>shiva3000</dc:creator>
      <dc:date>2013-05-02T21:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34134#M18622</link>
      <description>&lt;P&gt;You'll have to create code that maps the new form fields names for the second transaction to the appropriate authorize.net keys before you use that second part of the form to create your second transaction.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 22:35:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34134#M18622</guid>
      <dc:creator>shkkmo</dc:creator>
      <dc:date>2013-05-02T22:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34135#M18623</link>
      <description>&lt;P&gt;such as&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;array(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'amount' =&amp;gt; $_POST['amount2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'card_num' =&amp;gt; $_POST['x_card_num2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'exp_date' =&amp;gt; $_POST['x_exp_date2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'first_name' =&amp;gt; $_POST['x_first_name2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'last_name' =&amp;gt; $_POST['x_last_name2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'address' =&amp;gt; $_POST['x_address2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'city' =&amp;gt; $_POST['x_city'2],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'state' =&amp;gt; $_POST['x_state2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'country' =&amp;gt; $_POST['x_country2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'zip' =&amp;gt; $_POST['x_zip2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'email' =&amp;gt; $_POST['x_email2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'card_code' =&amp;gt; $_POST['x_card_code2'],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 22:37:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34135#M18623</guid>
      <dc:creator>shkkmo</dc:creator>
      <dc:date>2013-05-02T22:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Submit Multiple Transactions on One Page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34136#M18624</link>
      <description>&lt;P&gt;Thanks @shkkmo!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2013 23:48:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Submit-Multiple-Transactions-on-One-Page/m-p/34136#M18624</guid>
      <dc:creator>shiva3000</dc:creator>
      <dc:date>2013-05-02T23:48:36Z</dc:date>
    </item>
  </channel>
</rss>

