Ejemplo n.º 1
0
 public static ARBCreateSubscriptionResponse CreateSubscription(ARBCreateSubscriptionRequest request, bool test) 
 {
     try
     {
         return Instance.CreateSubscription(request, test);
     }
     catch (Exception ex)
     {
         throw new CreateSubscriptionException(ex.Message, ex);
     }
     
 }
Ejemplo n.º 2
0
 public abstract ARBCreateSubscriptionResponse CreateSubscription(ARBCreateSubscriptionRequest request, bool test);
Ejemplo n.º 3
0
        public override ARBCreateSubscriptionResponse CreateSubscription(ARBCreateSubscriptionRequest request, bool test)
        {
            // PopulateMerchantAuthentication((ANetApiRequest)request);

            // The response type will normally be ARBCreateSubscriptionResponse.
            // However, in the case of an error such as an XML parsing error, the response
            // type will be ErrorResponse, which is returned in SubscriptionProviderException

            object response = null;
            XmlDocument xmldoc = null;

            PostRequest(request, out xmldoc, test);

            ProcessXmlResponse(xmldoc, out response);
            if (response.GetType() != typeof(ARBCreateSubscriptionResponse))
            {
                throw new SubscriptionProviderException((ErrorResponse)response);
            }
            return (ARBCreateSubscriptionResponse)response;
        }
Ejemplo n.º 4
0
 public override ARBCreateSubscriptionResponse CreateSubscription(ARBCreateSubscriptionRequest request)
 {
     return CreateSubscription(request, false);
 }
Ejemplo n.º 5
0
 public static ARBCreateSubscriptionResponse CreateSubscription(ARBCreateSubscriptionRequest request)
 {
     return CreateSubscription(request, false);
 }