0 Replies Latest reply on Jun 19, 2012 2:27 PM by Jason Woodcock

    Authorize.net ARB Soap & Flex

    Jason Woodcock Level 1

      Alright, I'm having an issue creating an ARB (Automatic Recurring Billing) Subscription with Authorize.net via their SOAP API. Seems like a pretty straightforward process so far...

       

      Added the WSDL as a web service, Flash Builder 4.6 introspected it and set up everything. All the way up until I test a transaction....

       

      The value object setup by Flash Builder contains elements for a credit card AND a bank account. I'm providing cc information, but the bank account tags are still being sent, just empty. Authorize.net's servers of course, see these as a required field when they are being sent, albeit empty.

       

      How would I stop the data service from sending the empty bank account information?

       

      Here's the value object that FB created:

       

       

      <valueObjects:MerchantAuthenticationType id="merchantAuthenticationType"/>

                          <valueObjects:ARBSubscriptionType id="aRBSubscriptionType">

                                    <valueObjects:paymentSchedule>

                                              <valueObjects:PaymentScheduleType>

                                                        <valueObjects:interval>

                                                                  <valueObjects:PaymentScheduleTypeInterval/>

                                                        </valueObjects:interval>

                                              </valueObjects:PaymentScheduleType>

                                    </valueObjects:paymentSchedule>

                                    <valueObjects:payment>

                                              <valueObjects:PaymentType>

                                                        <valueObjects:creditCard>

                                                                  <valueObjects:CreditCardType/>

                                                        </valueObjects:creditCard>

                                              </valueObjects:PaymentType>

                                    </valueObjects:payment>

                                    <valueObjects:order>

                                              <valueObjects:OrderType/>

                                    </valueObjects:order>

                                    <valueObjects:billTo>

                                              <valueObjects:NameAndAddressType/>

                                    </valueObjects:billTo>

                                    <valueObjects:shipTo>

                                              <valueObjects:NameAndAddressType/>

                                    </valueObjects:shipTo>

                          </valueObjects:ARBSubscriptionType>

       

      Here's the request that get's sent:

       

       

      POST /soap/v1/Service.asmx HTTP/1.1

      Referer: app:/Main.swf

      Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, text/css, image/png, image/jpeg, image/gif;q=0.8, application/x-shockwave-flash, video/mp4;q=0.9, flv-application/octet-stream;q=0.8, video/x-flv;q=0.7, audio/mp4, application/futuresplash, */*;q=0.5

      x-flash-version: 11,1,102,58

      Content-Type: text/xml; charset=utf-8

      SOAPAction: "https://api.authorize.net/soap/v1/ARBCreateSubscription"

      Content-Length: 2289

      Accept-Encoding: gzip,deflate

      User-Agent: Mozilla/5.0 (Windows; U; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/3.1

      Host: api.authorize.net

       

       

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  <SOAP-ENV:Body>    <tns:ARBCreateSubscription xmlns:tns="https://api.authorize.net/soap/v1/">      <tns:merchantAuthentication>        <tns:name>*hidden*</tns:name>        <tns:transactionKey>*hidden*</tns:transactionKey>      </tns:merchantAuthentication>      <tns:subscription>        <tns:name>987 Coast, MS</tns:name>        <tns:paymentSchedule>          <tns:interval>            <tns:length>6</tns:length>            <tns:unit>months</tns:unit>          </tns:interval>          <tns:startDate>2012-06-19Z</tns:startDate>          <tns:totalOccurrences>9999</tns:totalOccurrences>          <tns:trialOccurrences>1</tns:trialOccurrences>        </tns:paymentSchedule>        <tns:amount>1295</tns:amount>        <tns:trialAmount>1295</tns:trialAmount>        <tns:payment>         <tns:bankAccount xsi:nil="true"/>          <tns:creditCard>            <tns:cardNumber>4222222222222222</tns:cardNumber>            <tns:expirationDate>2012-07</tns:expirationDate>            <tns:cardCode>123</tns:cardCode>          </tns:creditCard>        </tns:payment>        <tns:order>          <tns:invoiceNumber>0/0/0</tns:invoiceNumber>          <tns:description>Coast, MS</tns:description>        </tns:order>        <tns:customer xsi:nil="true"/>        <tns:billTo>          <tns:firstName>877</tns:firstName>          <tns:lastName>789</tns:lastName>          <tns:company>987</tns:company>          <tns:address>789</tns:address>          <tns:city>789</tns:city>          <tns:state>789</tns:state>          <tns:zip>789</tns:zip>          <tns:country>United States</tns:country>        </tns:billTo>        <tns:shipTo>          <tns:firstName xsi:nil="true"/>          <tns:lastName xsi:nil="true"/>          <tns:company xsi:nil="true"/>          <tns:address xsi:nil="true"/>          <tns:city xsi:nil="true"/>          <tns:state xsi:nil="true"/>          <tns:zip xsi:nil="true"/>          <tns:country xsi:nil="true"/>        </tns:shipTo>      </tns:subscription>    </tns:ARBCreateSubscription>  </SOAP-ENV:Body></SOAP-ENV:Envelope>

       

       

      And the reply I get back:

       

       

      HTTP/1.1 200 OK

      Date: Tue, 19 Jun 2012 20:16:02 GMT

      Server: Microsoft-IIS/6.0

      X-Powered-By: ASP.NET

      X-AspNet-Version: 2.0.50727

      Cache-Control: private, max-age=0

      Content-Type: text/xml; charset=utf-8

      Content-Length: 1081

       

       

      <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ARBCreateSubscriptionResponse xmlns="https://api.authorize.net/soap/v1/"><ARBCreateSubscriptionResult><resultCode>Error</resultCode><messages><MessagesTypeMessage><code>E00014</code><text>Bank Routing Number is required.</text></MessagesTypeMessage><MessagesTypeMessage><code>E00014</code><text>Bank Account Number is required.</text></MessagesTypeMessage><MessagesTypeMessage><code>E00015</code><text>Bank Account Number must be at least 5 characters in length.</text></MessagesTypeMessage><MessagesTypeMessage><code>E00014</code><text>Name On Bank Account is required.</text></MessagesTypeMessage><MessagesTypeMessage><code>E00017</code><text>Start Date must not occur before the submission date.</text></MessagesTypeMessage></messages><subscriptionId>0</subscriptionId></ARBCreateSubscriptionResult></ARBCreateSubscriptionResponse></soap:Body></soap:Envelope>

       

       

      The date error above I already have fixed, so no biggie there... I'm just not sure where to start on this Bank Account info situation.