<?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: PHP ARB in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16966#M9525</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried the below, which was in the SDK readme file. Same result (NOTHING)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;require_once 'AuthorizeNet.php';
    define("AUTHORIZENET_API_LOGIN_ID", "123");
    define("AUTHORIZENET_TRANSACTION_KEY", "4567");
    $subscription                          = new AuthorizeNet_Subscription;
    $subscription-&amp;gt;name                    = "PHP Monthly Magazine";
    $subscription-&amp;gt;intervalLength          = "1";
    $subscription-&amp;gt;intervalUnit            = "months";
    $subscription-&amp;gt;startDate               = "2011-03-12";
    $subscription-&amp;gt;totalOccurrences        = "12";
    $subscription-&amp;gt;amount                  = "12.99";
    $subscription-&amp;gt;creditCardCardNumber    = "6011000000000012";
    $subscription-&amp;gt;creditCardExpirationDate= "2018-10";
    $subscription-&amp;gt;creditCardCardCode      = "123";
    $subscription-&amp;gt;billToFirstName         = "Rasmus";
    $subscription-&amp;gt;billToLastName          = "Doe";

    // Create the subscription.
    $request = new AuthorizeNetARB;
    $response = $request-&amp;gt;createSubscription($subscription);
    $subscription_id = $response-&amp;gt;getSubscriptionId();
	echo $subscription_id.'_test';&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2011 20:07:36 GMT</pubDate>
    <dc:creator>tunespring11</dc:creator>
    <dc:date>2011-09-09T20:07:36Z</dc:date>
    <item>
      <title>PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16922#M9503</link>
      <description>&lt;P&gt;So, this should not be too difficult I would not think to set up but I am having trouble. I now have a SSL all set up on my site and that works great, but everytime i try a PHP ARB request it does not work. I have tried the developer tools example as well as &lt;A href="http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-arb-api-with-php/" target="_self"&gt;this link.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone offer me some suggestions as to wht i am doing wrong? I just can not imagine things should be this difficult to set up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance everyone.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 02:51:54 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16922#M9503</guid>
      <dc:creator>tunespring11</dc:creator>
      <dc:date>2011-09-09T02:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16928#M9506</link>
      <description>&lt;P&gt;When you say that it doesn't work, can you be more specific? Exactly what is happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm very new to this, too, but have learned a lot in the last couple of weeks (yes, the 15-minute integration has taken close to two weeks to get set up!). If you post the code you're working with, I (and/or one of the others) look through and see if I can figure out what's failing.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 06:21:39 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16928#M9506</guid>
      <dc:creator>jwcarlton</dc:creator>
      <dc:date>2011-09-09T06:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16934#M9509</link>
      <description>&lt;P&gt;Thank you for the quick response. The code I tried from the SDK Can be found in the demo and below is the code I have from the other posted link in my thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("../../ts_site/processForms/file_with_errors.php");


// Include AuthnetCIM class. Nothing works without it!
require('AuthnetARB.class.php');
 
// Use try/catch so if an exception is thrown we can catch it and figure out what happened
try{
    // Set up the subscription. Use the developer account for testing..
    $subscription = new AuthnetARB('***', '*&amp;amp;#$%');
 
    // Set subscription information
    $subscription-&amp;gt;setParameter('amount', 29.99);
    $subscription-&amp;gt;setParameter('cardNumber', '4111111111111111');
    $subscription-&amp;gt;setParameter('expirationDate', '2016-16');
    $subscription-&amp;gt;setParameter('firstName', 'Johns');
    $subscription-&amp;gt;setParameter('lastName', 'Conde');
    $subscription-&amp;gt;setParameter('address', '123 Main Street');
    $subscription-&amp;gt;setParameter('city', 'Townsville');
    $subscription-&amp;gt;setParameter('state', 'NJ');
    $subscription-&amp;gt;setParameter('zip', '12345');
    $subscription-&amp;gt;setParameter('email', 'fakemail@example.com');
 
    // Set the billing cycle for every three months
    $subscription-&amp;gt;setParameter('interval_length', 1);
    $subscription-&amp;gt;setParameter('startDate', date("Y-m-d", strtotime("+ 1 months")));
 
    // Set up a trial subscription for three months at a reduced price
    $subscription-&amp;gt;setParameter('trialOccurrences', 1);
    $subscription-&amp;gt;setParameter('trialAmount', 0.00);
	
	//notices
	$subscription-&amp;gt;setParameter('refID', 0.00);
	$subscription-&amp;gt;setParameter('subscrName', 0.00);
	$subscription-&amp;gt;setParameter('orderInvoiceNumber', 0.00);
	$subscription-&amp;gt;setParameter('orderDescription', 0.00);
	$subscription-&amp;gt;setParameter('customerId', 0.00);
	$subscription-&amp;gt;setParameter('customerEmail', 0.00);
	$subscription-&amp;gt;setParameter('customerPhoneNumber', 0.00);
	$subscription-&amp;gt;setParameter('customerFaxNumber', 0.00);
	$subscription-&amp;gt;setParameter('company', 0.00);
	$subscription-&amp;gt;setParameter('shipCompany', 0.00);
	$subscription-&amp;gt;setParameter('shipFirstName', 0.00);
	$subscription-&amp;gt;setParameter('shipLastName', 0.00);
	$subscription-&amp;gt;setParameter('shipAddress', 0.00);
	$subscription-&amp;gt;setParameter('shipCity', 0.00);
	$subscription-&amp;gt;setParameter('shipState', 0.00);
	$subscription-&amp;gt;setParameter('shipZip', 0.00);
 
    // Create the subscription
    $subscription-&amp;gt;createAccount();
 
    // Check the results of our API call
    if ($subscription-&amp;gt;isSuccessful())
    {
        // Get the subscription ID
        $subscription_id = $subscription-&amp;gt;getSubscriberID();
    }
    else
    {
		//echo $subscription;
        // The subscription was not created!
		echo '&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;THIS DID NOT WORK&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;';
    }
}catch (AuthnetARBException $e){
    echo $e;
    echo $subscription;
}
?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;So everytime I try to process it, i get this notice "THIS DID NOT WORK﻿". If there is a better method to doing form submission for ARB, I would love to have any suggestions. I agree, the 15 minute setup is not a reality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where there settings in Authorize.net, that you needed to set? Testing mode is off.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 13:36:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16934#M9509</guid>
      <dc:creator>tunespring11</dc:creator>
      <dc:date>2011-09-09T13:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16944#M9514</link>
      <description>&lt;P&gt;Be more helpful if we knew what error you were getting. Also, I notice that your code says "Include AuthnetCIM class. Nothing works without it!" and then includes ARB, and there are a number of other odd things as well. My suggestion is to look at the ARB.markdown file in the doc folder of your SDK, and also at the following code, which I know works because it's on an actual live web site I set up a few months ago. Note, incidently, that I calculate and fill in some of these $_POST values myself - it's obviously not good from a security standpoint to allow the user to directly set price or start date or so on without at least validating first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$authorize = new AuthorizeNetARB(
    $GLOBALS['_authorize_id'], $GLOBALS['_authorize_key']);
$authorize-&amp;gt;setSandbox(false);
// SET TO TRUE IF USING SANDBOX ACCOUNT

$subscription = new AuthorizeNet_Subscription;

$subscription-&amp;gt;customerId = $idn;

$subscription-&amp;gt;billToFirstName = $_POST['first'];
$subscription-&amp;gt;billToLastName = $_POST['last'];
$subscription-&amp;gt;billToCompany = $_POST['company'];
$subscription-&amp;gt;billToAddress = $_POST['address'];
$subscription-&amp;gt;billToCity = $_POST['city'];
$subscription-&amp;gt;billToState = $_POST['state'];
$subscription-&amp;gt;billToZip = $_POST['zip'];
$subscription-&amp;gt;billToCountry = 'US';

$subscription-&amp;gt;customerPhoneNumber = $_POST['phone'];
$subscription-&amp;gt;customerEmail = $_POST['email'];

$subscription-&amp;gt;name = "{$_POST['type']} Subscription";
$subscription-&amp;gt;orderDescription = 'For ' . count($_POST['zips']) . " zip codes with {$population} total estimated population";
$subscription-&amp;gt;amount = $_POST['price'];

$subscription-&amp;gt;startDate = $_POST['payment_due'];
$subscription-&amp;gt;intervalLength = '1';
$subscription-&amp;gt;intervalUnit = 'months';
$subscription-&amp;gt;totalOccurrences = '9999';

$subscription-&amp;gt;creditCardCardNumber = $_POST['card_number'];
$subscription-&amp;gt;creditCardExpirationDate = sprintf('%04d-%02d', $_POST['card_exp_year'], $_POST['card_exp_month']);
$subscription-&amp;gt;creditCardCardCode = $_POST['card_ccv'];

$result = $authorize-&amp;gt;createSubscription($subscription);

// We want to delay this error until later
if ($result-&amp;gt;xml-&amp;gt;messages-&amp;gt;resultCode != 'Ok')
    $errors[] = "Recurring billing could not be initiated - {$result-&amp;gt;xml-&amp;gt;messages-&amp;gt;message-&amp;gt;text}";&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 17:20:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16944#M9514</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-09T17:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16964#M9524</link>
      <description>&lt;P&gt;TJPride,&lt;/P&gt;&lt;P&gt;Thank you for the responce, you are much better at this than I. I tried your code, and did not receive any error at all, but I also do not see anything in my "Merchant Login", that would indicate a transaction. I have pasted the code I am trying, incase I have made a really dumb mistake. Again, thank you for your help in resolving this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
require_once 'AuthorizeNet.php';
$authorize = new AuthorizeNetARB($GLOBALS['123'], $GLOBALS['abcd']);
$authorize-&amp;gt;setSandbox(false);
// SET TO TRUE IF USING SANDBOX ACCOUNT

$subscription = new AuthorizeNet_Subscription;

$subscription-&amp;gt;customerId = $idn;

$subscription-&amp;gt;billToFirstName = 'kelly';
$subscription-&amp;gt;billToLastName = 'cu';
$subscription-&amp;gt;billToCompany = 'company';
$subscription-&amp;gt;billToAddress = '123 walal';
$subscription-&amp;gt;billToCity = 'ny';
$subscription-&amp;gt;billToState = 'ny';
$subscription-&amp;gt;billToZip = '60502';
$subscription-&amp;gt;billToCountry = 'US';

$subscription-&amp;gt;customerPhoneNumber = '6302914980';
$subscription-&amp;gt;customerEmail = 'kelly.cu@email.com';

$subscription-&amp;gt;name = "{$_POST['type']} Subscription";
$subscription-&amp;gt;orderDescription = 'For ' . count($_POST['zips']) . " zip codes with {$population} total estimated population";
$subscription-&amp;gt;amount = $_POST['price'];

$subscription-&amp;gt;startDate = $_POST['payment_due'];
$subscription-&amp;gt;intervalLength = '1';
$subscription-&amp;gt;intervalUnit = 'months';
$subscription-&amp;gt;totalOccurrences = '9999';

$subscription-&amp;gt;creditCardCardNumber = $_POST['card_number'];
$subscription-&amp;gt;creditCardExpirationDate = sprintf('%04d-%02d', $_POST['card_exp_year'], $_POST['card_exp_month']);
$subscription-&amp;gt;creditCardCardCode = $_POST['card_ccv'];

$result = $authorize-&amp;gt;createSubscription($subscription);

// We want to delay this error until later
if ($result-&amp;gt;xml-&amp;gt;messages-&amp;gt;resultCode != 'Ok')
    $errors[] = "Recurring billing could not be initiated - {$result-&amp;gt;xml-&amp;gt;messages-&amp;gt;message-&amp;gt;text}";
    ?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 19:05:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16964#M9524</guid>
      <dc:creator>tunespring11</dc:creator>
      <dc:date>2011-09-09T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16966#M9525</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried the below, which was in the SDK readme file. Same result (NOTHING)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;require_once 'AuthorizeNet.php';
    define("AUTHORIZENET_API_LOGIN_ID", "123");
    define("AUTHORIZENET_TRANSACTION_KEY", "4567");
    $subscription                          = new AuthorizeNet_Subscription;
    $subscription-&amp;gt;name                    = "PHP Monthly Magazine";
    $subscription-&amp;gt;intervalLength          = "1";
    $subscription-&amp;gt;intervalUnit            = "months";
    $subscription-&amp;gt;startDate               = "2011-03-12";
    $subscription-&amp;gt;totalOccurrences        = "12";
    $subscription-&amp;gt;amount                  = "12.99";
    $subscription-&amp;gt;creditCardCardNumber    = "6011000000000012";
    $subscription-&amp;gt;creditCardExpirationDate= "2018-10";
    $subscription-&amp;gt;creditCardCardCode      = "123";
    $subscription-&amp;gt;billToFirstName         = "Rasmus";
    $subscription-&amp;gt;billToLastName          = "Doe";

    // Create the subscription.
    $request = new AuthorizeNetARB;
    $response = $request-&amp;gt;createSubscription($subscription);
    $subscription_id = $response-&amp;gt;getSubscriptionId();
	echo $subscription_id.'_test';&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2011 20:07:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16966#M9525</guid>
      <dc:creator>tunespring11</dc:creator>
      <dc:date>2011-09-09T20:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16996#M9538</link>
      <description>&lt;P&gt;(referring to the copy of my code)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I notice sandbox is still set to false. Are you running this on a live account? I'm also assuming the $GLOBALS values in the second line are correct login codes, and that you're filling in all the $_POST values correctly. You might try doing print_r($result) at the end to make sure it's actually making it there and not dying along the way for some strange reason.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2011 13:57:48 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/16996#M9538</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-10T13:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/17098#M9589</link>
      <description>&lt;P&gt;I also have had lots of trouble attempting to complete an ARB transaction.&amp;nbsp; I used the code that is referenced to by the Integration Guide here: &lt;A target="_blank" href="http://developer.authorize.net/samplecode"&gt;http://developer.authorize.net/samplecode&lt;/A&gt;﻿.&amp;nbsp; I'm using the PHP sample code, slightly modified only a little.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error I keep getting is E00003 - Which is the result of an xml parser error.&amp;nbsp; This doesn't make much sense to me, as my code is copied and pasted from the sample code.&amp;nbsp; The format for the xml was written by someone at Auth.net (I assume since it is an official example).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed in this thread that the code looks quite a bit different than what I am using.&amp;nbsp; Is there a more updated version of the code?&amp;nbsp; Should the outdated version not work or should I be able to have some success using the older examples?&amp;nbsp; Please respond, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2011 14:51:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/17098#M9589</guid>
      <dc:creator>justinb</dc:creator>
      <dc:date>2011-09-14T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: PHP ARB</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/17108#M9592</link>
      <description>&lt;P&gt;The sample code is from an XML viewpoint, meaning you have to create the XML yourself in your code. There's a lot more scope for error with that than with what I'm doing, which is using the API functions layered on top of the XML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Short version - ignore the sample code unless you really love XML, and use the ARB.markdown file from the doc folder of the PHP SDK (see Downloads).&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2011 05:16:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-ARB/m-p/17108#M9592</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-15T05:16:10Z</dc:date>
    </item>
  </channel>
</rss>

