예제 #1
0
        /// <summary>
        /// Creates a new subscription
        /// </summary>
        /// <param name="subscription">The subscription to create - requires that you add a credit card and billing first and last.</param>
        public ISubscriptionRequest CreateSubscription(ISubscriptionRequest subscription) {
            var sub = subscription.ToAPI();
            var req = new ARBCreateSubscriptionRequest();
            req.subscription = sub;
            var response = (ARBCreateSubscriptionResponse)_gateway.Send(req);
            subscription.SubscriptionID = response.subscriptionId;
            return subscription;

        }
예제 #2
0
 public AuthorizeNet.APICore.ARBCreateSubscriptionResponse CreateARBSubscription(AuthorizeNet.APICore.ARBSubscriptionType subscription)
 {
     AuthorizeNet.APICore.ARBCreateSubscriptionRequest req = new AuthorizeNet.APICore.ARBCreateSubscriptionRequest();            
     req.subscription = subscription;
     AuthorizeNet.HttpXmlUtility util = new AuthorizeNet.HttpXmlUtility(ServiceMode, MerchantAuthenticationType.name, MerchantAuthenticationType.transactionKey);
     return (AuthorizeNet.APICore.ARBCreateSubscriptionResponse)util.Send(req);
 }