示例#1
0
        private void SendSubscribeResponse(SubscriptionService service, int subscriptionID, string mobileNumber, int reference, CSubscriptionEngineCapsule.RequestResults result)
        {
            CXMLCapsule capsule = CSubscriptionEngineCapsule.CreateSubscribeConfirmationCapsule(service.ID, subscriptionID, mobileNumber, reference, result);

            service.ResponseQueue.Send(capsule);
            capsule = null;
        }
示例#2
0
        private void SendUpdate(SubscriptionService service, int subscriptionID, DateTime expiryDateTime, Statuses status, int reference, CSubscriptionEngineCapsule.RequestResults result, bool initialBilling)
        {
            Statuses actualStatus         = status;
            DateTime actualExpiryDateTime = expiryDateTime;

            if (actualStatus == Statuses.DoesNotExist)
            {
                actualStatus = GetSubscriptionStatus(subscriptionID);
            }

            if (actualExpiryDateTime == DateTime.MinValue)
            {
                actualExpiryDateTime = GetSubscriptionExpiryDateTime(subscriptionID);
            }

            CXMLCapsule capsule = CSubscriptionEngineCapsule.CreateSubscriptionUpdateCapsule(service.ID, subscriptionID, actualExpiryDateTime, (int)actualStatus, reference, result, initialBilling);

            service.ResponseQueue.Send(capsule);
            capsule = null;
        }