cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

ARBECreateSubscriptionResponse is Null C#

I am trying to create a subscription, but the response comes back nul.  Here is my code:

 

paymentScheduleTypeInterval interval = new paymentScheduleTypeInterval();
interval.length = 12;
interval.unit = ARBSubscriptionUnitEnum.months;

paymentScheduleType schedule = new paymentScheduleType
{
interval = interval,
startDate = DateTime.Now.AddDays(1),
totalOccurrences = 9999,

};
ARBSubscriptionType subscriptionType = new ARBSubscriptionType
{
amount = Price,
paymentSchedule = schedule,
payment = paymentType,
billTo = billingAddress


};
var subscriptionRequest = new ARBCreateSubscriptionRequest { subscription = subscriptionType };

var subscriptionController = new ARBCreateSubscriptionController(subscriptionRequest);
subscriptionController.Execute();

ARBCreateSubscriptionResponse subscriptionResponse = subscriptionController.GetApiResponse();
if (subscriptionResponse != null && subscriptionResponse.messages.resultCode == messageTypeEnum.Ok)
{
success = true;

}
else if (subscriptionResponse != null)
{
success = false;
}

 

All variables do have value, but response is null.  If a drill down through the controller object I see Error E00045 "The root node does not reference a valid XML namespace.", but I am not using XML and my payment transactions process with no problem using the same credentials.  Any assistance is greatly appreciated!

DevQueen
Member
Who Me Too'd this topic