/// <summary> /// Constructor /// </summary> /// <param name="payment">The Payment object associated with this request</param> /// <param name="subscriptionPlan">The SubscriptionPlan associated witht this request</param> /// <param name="remoteIP">Remote IP of the user initiating the request</param> public AuthorizeRecurringTransactionRequest(Payment payment, SubscriptionPlan subscriptionPlan, string remoteIP) : base(payment, remoteIP) { this._TransactionOrigin = TransactionOrigin.Internet; if (subscriptionPlan != null) { this.SubscriptionName = subscriptionPlan.Name; this.Amount = payment.Amount; this.RecurringChargeSpecified = subscriptionPlan.RecurringChargeSpecified; // GET THE SUBSCRIPTION CHARGE WITH TAX Order order = payment.Order; int billToProvinceId = ProvinceDataSource.GetProvinceIdByName(order.BillToCountryCode, order.BillToProvince); TaxAddress billingAddress = new TaxAddress(order.BillToCountryCode, billToProvinceId, order.BillToPostalCode); this.RecurringCharge = TaxHelper.GetPriceWithTax(subscriptionPlan.RecurringCharge, subscriptionPlan.TaxCodeId, billingAddress, billingAddress); this.NumberOfPayments = subscriptionPlan.NumberOfPayments; this.PaymentFrequency = subscriptionPlan.PaymentFrequency; this.PaymentFrequencyUnit = subscriptionPlan.PaymentFrequencyUnit; } }
/// <summary> /// Constructor /// </summary> /// <param name="payment">The Payment object associated with this request</param> /// <param name="recurringTransaction">The original recurring transactions that is being cancelled</param> /// <param name="remoteIP">Remote IP of the user initiating the request</param> public CancelRecurringTransactionRequest(Payment payment, Transaction recurringTransaction, string remoteIP) : base(payment, remoteIP) { this._TransactionOrigin = TransactionOrigin.Internet; this._RecurringTransaction = recurringTransaction; }
/// <summary> /// Constructor /// </summary> /// <param name="payment">The Payment for this transaction</param> /// <param name="remoteIP">The remote IP of the user initiating the request</param> public AuthorizeTransactionRequest(Payment payment, string remoteIP) : base(payment, remoteIP) { this._TransactionOrigin = TransactionOrigin.Internet; }