<?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: URGENT: authorize.net Production account accepts test credit cards - other people reported it to in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30574#M15987</link>
    <description>&lt;P&gt;ARB do not run a transaction until that schedule start date. But a test credit card will get decline on the first run.&lt;/P&gt;&lt;P&gt;To test Credit card use AIM and run a auth_only transaction to verify, then void that transaction. If the CC is valid create ARB, else error.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Oct 2012 21:45:50 GMT</pubDate>
    <dc:creator>RaynorC1emen7</dc:creator>
    <dc:date>2012-10-14T21:45:50Z</dc:date>
    <item>
      <title>URGENT: authorize.net Production account accepts test credit cards - other people reported it too</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30572#M15986</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I'm at my wit's end as to why, but&amp;nbsp;&lt;A target="_blank" href="https://api.authorize.net/xml/v1/request.api"&gt;https://api.authorize.net/xml/v1/request.api&lt;/A&gt; accepts test card numbers for monthly subscription:&lt;/P&gt;&lt;P&gt;- American Express Test Card: 370000000000002&lt;BR /&gt;- Discover Test Card: 6011000000000012&lt;BR /&gt;- Visa Test Card: 4007000000027&lt;BR /&gt;- Second Visa Test Card: 4012888818888&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try it yourself:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://webservicecenter.net/uportal4/tools/tests/authorizeNetSubscription.jsp?cardExpirationYear=2015&amp;amp;cardExpirationMonth=12&amp;amp;subscriptionName=tet&amp;amp;cardChargeAmount=23.0&amp;amp;cardNumber=370000000000002&amp;amp;intervalLenth=1&amp;amp;cardOwnerFirstName=roman1&amp;amp;cardOwnerLastName=test1"&gt;http://webservicecenter.net/uportal4/tools/tests/authorizeNetSubscription.jsp?cardExpirationYear=2015&amp;amp;cardExpirationMonth=12&amp;amp;subscriptionName=tet&amp;amp;cardChargeAmount=23.0&amp;amp;cardNumber=370000000000002&amp;amp;intervalLenth=1&amp;amp;cardOwnerFirstName=roman1&amp;amp;cardOwnerLastName=test1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(You may need to change "cardOwnerFirstName" and/or "cardOwnerLastName", and "cardChargeAmount" to avoid "duplicate subscription" error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is directly from&amp;nbsp;&lt;A target="_blank" href="http://developer.authorize.net/resources/files/samplecode/java_arb.zip"&gt;http://developer.authorize.net/resources/files/samplecode/java_arb.zip&lt;/A&gt; (CreateSubscriptionExample.java)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Check the live code below. Also, I'm not the only one that noticed it:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://stackoverflow.com/questions/6151308/authorize-net-production-account-accepts-test-credit-card-numbers"&gt;http://stackoverflow.com/questions/6151308/authorize-net-production-account-accepts-test-credit-card-numbers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'd really appreciate any pointers as to why this is happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Live code from the first link above (except the account data):&lt;/P&gt;&lt;PRE&gt;&amp;lt;%@ page import="java.sql.*"%&amp;gt;
&amp;lt;%@ page import="java.util.*"%&amp;gt;
&amp;lt;%@ page import="java.text.*"%&amp;gt;
&amp;lt;%@ page import="javax.servlet.http.*"%&amp;gt;
&amp;lt;%@ page import="java.net.*" %&amp;gt;
&amp;lt;%@ page import="java.io.*" %&amp;gt;

&amp;lt;%@ page import="com.anet.api.*"%&amp;gt;
&amp;lt;%@ page import="com.anet.api.http.HttpUtil"%&amp;gt;

&amp;lt;%

// Before working with this sample code, please be sure to read the accompanying Readme.txt file.
// It contains important information regarding the appropriate use of and conditions for this
// sample code. Also, please pay particular attention to the comments included in each individual
// code file, as they will assist you in the unique and correct implementation of this code on
// your specific platform.
//
// Copyright 2008 Authorize.Net Corp.

        // {api-url} {user-login} {transaction-key}
            // subscription:
              java.net.URL apiUrl=new java.net.URL("&lt;A target="_blank" href="https://api.authorize.net/xml/v1/request.api"&gt;https://api.authorize.net/xml/v1/request.api&lt;/A&gt;"); // live server

             String apiLogin="";
             String transactionKey="";

            // API constructor - url, merchant id, token key
            ARBAPI api = new ARBAPI(apiUrl, apiLogin, transactionKey);


        // getting the passed variables:
            // credit card number:
            String cardNumber=request.getParameter("cardNumber");
                if (cardNumber==null) cardNumber="0";

            // credit card expiration:
            String cardExpirationYear=request.getParameter("cardExpirationYear");
                if (cardExpirationYear==null) cardExpirationYear="0";

            String cardExpirationMonth=request.getParameter("cardExpirationMonth");
                if (cardExpirationMonth==null) cardExpirationMonth="0";

           // credit card owner first/last names:
            String cardOwnerFirstName=request.getParameter("cardOwnerFirstName");
                if (cardOwnerFirstName==null) cardOwnerFirstName="";

            String cardOwnerLastName=request.getParameter("cardOwnerLastName");
                if (cardOwnerLastName==null) cardOwnerLastName="";

           // charge amount:
            String cardChargeAmount=request.getParameter("cardChargeAmount");
                if (cardChargeAmount==null) cardChargeAmount="0.0";


                        // interval length (1 for 1 month or 12 for 1 year)
                        String intervalLength=request.getParameter("intervalLength");
                            if (intervalLength==null) intervalLength="1";
                            int intervalLengthInt=Integer.parseInt(intervalLength);

                    // get the date in mountain time for authorize.net processing:
                        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                        df.setTimeZone(TimeZone.getTimeZone("America/Denver"));
                        String currentDateMountainTime=df.format(new java.util.Date());

                            String cardExpiration=cardExpirationYear+"-"+cardExpirationMonth; // format here is "2029-07"

                            // convert it to double:
                            Double cardChargeAmountDouble=Double.parseDouble(cardChargeAmount);

                       // subscription name
                        String subscriptionName=request.getParameter("subscriptionName");
                            if (subscriptionName==null) subscriptionName="";

		// Create a payment schedule
		ARBPaymentSchedule new_schedule = new ARBPaymentSchedule();
		new_schedule.setIntervalLength(intervalLengthInt);
		new_schedule.setSubscriptionUnit("months");
		new_schedule.setStartDate(currentDateMountainTime);
		new_schedule.setTotalOccurrences(7);
		new_schedule.setTrialOccurrences(0);

		// Create a new credit card
		CreditCard credit_card = new CreditCard();
		credit_card.setCardNumber(cardNumber);
		credit_card.setExpirationDate(cardExpiration);

		// Create a billing info
		ARBNameAndAddress billing_info = new ARBNameAndAddress();
		billing_info.setFirstName(cardOwnerFirstName);
		billing_info.setLastName(cardOwnerLastName);

		// Create a customer and specify billing info
		ARBCustomer customer = new ARBCustomer();
		customer.setBillTo(billing_info);

		// Create a subscription and specify payment, schedule and customer
		ARBSubscription new_subscription = new ARBSubscription();
		new_subscription.setPayment(new ARBPayment(credit_card));
		new_subscription.setSchedule(new_schedule);
		new_subscription.setCustomer(customer);
		new_subscription.setAmount(cardChargeAmountDouble);
		new_subscription.setTrialAmount(0.00);

		// Give this subscription a name
		new_subscription.setName(subscriptionName);

		// Create a new subscription request from the subscription object
		// Returns XML document. Also holds internal pointer as current_request.
		//
		api.createSubscriptionRequest(new_subscription);

            // send the request:
                api.sendRequest();

            out.println("subscriptionId: " +api.getResultSubscriptionId());

            // getting the result code ("Ok" or "Error")
                String resultCode=api.getResultCode();

                out.println("resultCode: "+resultCode);

		 api.printMessages();
                
            // clear the session:
		api.destroy();
%&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2012 21:06:26 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30572#M15986</guid>
      <dc:creator>romanlutsk37</dc:creator>
      <dc:date>2012-10-14T21:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: authorize.net Production account accepts test credit cards - other people reported it to</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30574#M15987</link>
      <description>&lt;P&gt;ARB do not run a transaction until that schedule start date. But a test credit card will get decline on the first run.&lt;/P&gt;&lt;P&gt;To test Credit card use AIM and run a auth_only transaction to verify, then void that transaction. If the CC is valid create ARB, else error.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2012 21:45:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30574#M15987</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2012-10-14T21:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: authorize.net Production account accepts test credit cards - other people reported it to</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30576#M15988</link>
      <description>&lt;P&gt;Interesting, thanks for clarification. I wonder why they wouldn't the transaction right away, since I'm transmitting the current date for their local server (mountain time). Could you provide some sample code in java?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Roman&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2012 22:02:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30576#M15988</guid>
      <dc:creator>romanlutsk37</dc:creator>
      <dc:date>2012-10-14T22:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: authorize.net Production account accepts test credit cards - other people reported it to</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30578#M15989</link>
      <description>&lt;P&gt;The ARB only run the schedule on midnight. There &lt;A target="_self" href="http://developer.authorize.net/downloads/samplecode/"&gt;sample code&lt;/A&gt; for java AIM.&lt;/P&gt;&lt;P&gt;If you going to start the ARB right away, just use the AIM as the first payment then set the start date as the second payment as the ARB.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Oct 2012 22:41:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30578#M15989</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2012-10-14T22:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: authorize.net Production account accepts test credit cards - other people reported it to</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30580#M15990</link>
      <description>&lt;P&gt;Thanks a lot for the pointers. I've split the monthly payment workflow into an instant AIM payment at a monthly rate (which servers as auth) - if that goes through, I schedule a subscription starting in 1 month.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 00:55:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/URGENT-authorize-net-Production-account-accepts-test-credit/m-p/30580#M15990</guid>
      <dc:creator>romanlutsk37</dc:creator>
      <dc:date>2012-10-15T00:55:30Z</dc:date>
    </item>
  </channel>
</rss>

