cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting the transaction list from invoking ARBGetSubscriptionRequest

 

Hi,

 

Im calling ARBGetSubscriptionRequest with the property includeTransactions = TRUE

but im not getting any ARBTransactions

 

 

ARBTransactionNoResult.png

 

 

but checking my parameter SubscriptionID(5212652) is returning the correct ARBTransaction in the API "try it" site.

 

 

<?xml version="1.0" encoding="utf-8"?>
<ARBGetSubscriptionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>
Ok
</resultCode>
<message>
<code>
I00001
</code>
<text>
Successful.
</text>
</message>
</messages>
<subscription>
<name>
Paid Subscription
</name>
<paymentSchedule>
<interval>
<length>
12
</length>
<unit>
months
</unit>
</interval>
<startDate>
2018-06-09
</startDate>
<totalOccurrences>
9999
</totalOccurrences>
<trialOccurrences>
0
</trialOccurrences>
</paymentSchedule>
<amount>
1199.00
</amount>
<trialAmount>
0.00
</trialAmount>
<status>
active
</status>
<profile>
<merchantCustomerId>
937
</merchantCustomerId>
<email>
jbu.jbu12345678.9@gmail.com
</email>
<customerProfileId>
1504661659
</customerProfileId>
<paymentProfile>
<customerType>
individual
</customerType>
<billTo>
<firstName>
testtrial777
</firstName>
<lastName>
test
</lastName>
<company>
company
</company>
<address>
addresssstest,
</address>
<city>
San Diego
</city>
<state>
73
</state>
<zip>
92101
</zip>
<country>
USA
</country>
</billTo>
<customerPaymentProfileId>
1503964908
</customerPaymentProfileId>
<payment>
<creditCard>
<cardNumber>
XXXX1111
</cardNumber>
<expirationDate>
XXXX
</expirationDate>
</creditCard>
</payment>
</paymentProfile>
</profile>
<order>
<invoiceNumber>
631
</invoiceNumber>
<description>
Order ID: 631
</description>
</order>
<arbTransactions>
<arbTransaction>
<transId>
40014774658
</transId>
<response>
This transaction has been approved.
</response>
<submitTimeUTC>
2018-06-09T08:53:51.89
</submitTimeUTC>
<payNum>
1
</payNum>
<attemptNum>
1
</attemptNum>
</arbTransaction>
</arbTransactions>
</subscription>
</ARBGetSubscriptionResponse>

 

 

Am I missing something?

 

thanks in advance!

-Chris

 

 

christoper
Member
1 ACCEPTED SOLUTION

Accepted Solutions

 

I got the list to show by setting this property: includeTransactionsSpecified = true 

 

ex.
var request = new ARBGetSubscriptionRequest { subscriptionId = subscriptionId, includeTransactions = true, includeTransactionsSpecified = true };

 

 

 

 

View solution in original post

4 REPLIES 4

Hi @christoper

 

Can you please share the details like which language sdk are you using and which version of the sdk ? Also what code are you using to get the transaction list ?

 

These informations will help us to understand whats happening.

 

Happy Coding!

 

 

kikmak42
Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

Hi 

 

Im using the ASP.net c# and I just upgraded the AuthorizeNet.dll to 1.9.4.

 

i have this code here:

 

        public static List<arbTransaction> GetSubscriptionWithTransaction(string subscriptionId)
        {
            
            log().Debug("Start GetSubscription");
            string errorMessage = "";
            SetAuthNetCreds();

            var request = new ARBGetSubscriptionRequest { subscriptionId = subscriptionId, includeTransactions = true };

            var controller = new ARBGetSubscriptionController(request);          // instantiate the contoller that will call the service            
            controller.Execute();

            var response = controller.GetApiResponse();   // get the response from the service (errors contained if any)

            List<arbTransaction> transactionList = new List<arbTransaction>();

            //validate
            if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
            {
                foreach (var transaction in response.subscription.arbTransactions) {
                    transactionList.Add(transaction);
                }

                return transactionList;
            }
            else if (response != null)
            {
                errorMessage = "Error: " + response.messages.message[0].code + "  " + response.messages.message[0].text;
                LogIt(errorMessage, "GetSubscriptionWithTransaction", "W");
            }

            log().Debug("END GetSubscription");
            return null;
        }

 

thanks!

 

I got the list to show by setting this property: includeTransactionsSpecified = true 

 

ex.
var request = new ARBGetSubscriptionRequest { subscriptionId = subscriptionId, includeTransactions = true, includeTransactionsSpecified = true };

 

 

 

 

Hi,

I am facing the same issue. I am trying to get the transactions for a subscription ID using PHP SDK. I am getting always empty response. 

I setting the IncludeTransactions as true but no luck.

 $request->setIncludeTransactions(true);

 

When I check the same at "https://developer.authorize.net/api/reference/index.html#recurring-billing-get-subscription" it is giving Transaction details as "arbTransactions".

 

Can anyone please suggest the solution.

 

Thanks in advance