Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Contributor
Posts: 13
Registered: ‎01-22-2013
Accepted Solution

ARB Subscription not visible in Sandbox

Hi Friends

Am facing a little trouble with ARB. I was able tocreate ARB subscription code in ASP.NET (VB) using ARB SOAP webserivice. Am getting ARBCreateSubscriptionResponseType as OK. That means it successfully created the subscription I believe. But when I get into my test account control pannel (Sandbox), there is not subscription is showing. But if the above create suscription code is OK, something should be display there.. isnt it? But  0 subscription there...

 


I used my testaccount API ID and Transaction key. So kindly help me to find whats wrong with my code?

 

Thanks in advance..

Sandeep Thomas

 


Accepted Solutions
Solution
Accepted by topic author sfornsadeep
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: ARB Subscription not visible in Sandbox

you didn't assign the result

Dim sub_resp_type As New ARBCreateSubscriptionResponseType
arbService.ARBCreateSubscription(m_authentication, sub_type)

 

View solution in original post


All Replies
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: ARB Subscription not visible in Sandbox

Did it return a subscriptionID?

Contributor
Posts: 13
Registered: ‎01-22-2013

Re: ARB Subscription not visible in Sandbox

Am getting OK status. But the subscription ID I received is 0

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: ARB Subscription not visible in Sandbox

[ Edited ]

Should be something there if you didn't get an error. Are you sure it call the ARBCreateSubscription method?

OK and a subscriptionID of 0 is the default values for ARBCreateSubscriptionResponseType

Contributor
Posts: 13
Registered: ‎01-22-2013

Re: ARB Subscription not visible in Sandbox

Yes.. I  am using ARBCreatSubscription with MerichantAuthenticate and SubscriptionType as parameters. Does that return OK if there is any error in the CreateSubscription request? Sorry... am only a beginner with Authorize.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: ARB Subscription not visible in Sandbox

No. it won't return ok if there is an error. Can you post your code?

Contributor
Posts: 13
Registered: ‎01-22-2013

Re: ARB Subscription not visible in Sandbox

Sure.. Here is my code...

THis is the Webservice I invoked...

https://apitest.authorize.net/soap/v1/Service.asmx

 

    Protected Sub createSubscription()
        Try
            Dim arbService As New ARB.Service
            Dim m_authentication As New ARB.MerchantAuthenticationType
            m_authentication.name = "myAPI"
            m_authentication.transactionKey = "myTkey"
            arbService.AuthenticateTest(m_authentication)
            Dim m_response As New ANetApiResponseType
            If m_response.resultCode = 0 Then
                Dim sub_type As New ARBSubscriptionType
                Dim ps_type As New PaymentScheduleType
                Dim ps_type_interval As New PaymentScheduleTypeInterval
                Dim cr_type As New CreditCardType
                Dim order_type As New OrderType
                Dim cus_type As New CustomerType
                Dim nameaddress_type As New NameAndAddressType
                Dim pt As New PaymentType

                Dim refno As String = DateTime.Now.ToString("yyyyMMddHHmmss").ToString
                Dim sub_name As String = If(rb_basic.Checked, "LB", "LP") + "_" + dd_billingcycle.SelectedValue.ToString + "_" + CInt((DateTime.UtcNow - New DateTime(1970, 1, 1)).TotalSeconds).ToString
                Dim timeStamp = CInt((DateTime.UtcNow - New DateTime(1970, 1, 1)).TotalSeconds)

                order_type.invoiceNumber = refno
                order_type.description = dd_billingcycle.SelectedValue.ToString + " Month recurring billing " + If(rb_basic.Checked, " subscription for Limitless Basic ", "Subscription for Limitless Premium ")

                nameaddress_type.firstName = txt_name.Text
                nameaddress_type.lastName = ""
                nameaddress_type.address = txt_address.Text
                nameaddress_type.company = txt_company.Text
                nameaddress_type.zip = txt_zipcode.Text


                ps_type_interval.unit = ARBSubscriptionUnitEnum.months
                ps_type_interval.length = dd_billingcycle.SelectedValue
  

                ps_type.interval = ps_type_interval
                ps_type.startDate = DateAdd(DateInterval.Hour, 1, Now.Date)
                ps_type.startDateSpecified = True
                ps_type.totalOccurrences = 9999
                ps_type.totalOccurrencesSpecified = True
                '-----------
                cr_type.cardCode = txt_cvvnumber.Text
                cr_type.cardNumber = txt_cardnumber.Text.Replace(" ", "").Replace("-", "")
                cr_type.expirationDate = dd_year.ToString + "-" + dd_month.ToString
                '-----------
                pt.Item = cr_type
                '-----------
                cus_type.email = txt_email.Text
                cus_type.id = txt_userid.Text
                '-----------
                sub_type.name = sub_name
                sub_type.amount = findAmount()
                sub_type.amountSpecified = True
                sub_type.billTo = nameaddress_type
                sub_type.paymentSchedule = ps_type
                sub_type.payment = pt
                sub_type.order = order_type
                sub_type.customer = cus_type
                '--------
                Dim sub_resp_type As New ARBCreateSubscriptionResponseType
                arbService.ARBCreateSubscription(m_authentication, sub_type)
                If sub_resp_type.resultCode = MessageTypeEnum.Ok Then
                    ShowInformation(sub_resp_type.subscriptionId.ToString)

                Else
                    ShowInformation("Failure")
                End If
            End If
        Catch ex As Exception

        End Try
    End Sub

 

Solution
Accepted by topic author sfornsadeep
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: ARB Subscription not visible in Sandbox

you didn't assign the result

Dim sub_resp_type As New ARBCreateSubscriptionResponseType
arbService.ARBCreateSubscription(m_authentication, sub_type)

 

Contributor
Posts: 13
Registered: ‎01-22-2013

Re: ARB Subscription not visible in Sandbox

Thank you very much boss.. You saved my head.. But now my code returning a failure message. So I'm trying to figure out that.. Thanks a lot again.. Expecting support later.. :)