예제 #1
0
        /// <summary>
        /// Cancels recurring payment
        /// </summary>
        /// <param name="transactionPayment">transactionPayment</param>
        /// <param name="cancelPaymentResult">Cancel payment result</param>
        public void CancelRecurringPayment(TransactionPayment transactionPayment, ref CancelPaymentResult cancelPaymentResult)
        {
            if (transactionPayment.TransactionPaymentTotal == decimal.Zero)
                return;

            var paymentMethod = GetPaymentMethodById(transactionPayment.PaymentMethodId);
            if (paymentMethod == null)
                throw new Exception("Payment method couldn't be loaded");
            var iPaymentMethod = Activator.CreateInstance(Type.GetType(paymentMethod.ClassName)) as IPaymentMethod;
            iPaymentMethod.CancelRecurringPayment(transactionPayment, ref cancelPaymentResult);
        }
 /// <summary>
 /// Voids payment
 /// </summary>
 /// <param name="betting">betting</param>
 /// <param name="cancelPaymentResult">Cancel payment result</param>        
 public void Void(TransactionPayment transactionPayment, ref CancelPaymentResult cancelPaymentResult)
 {
     throw new Exception("Void method not supported");
 }
        /// <summary>
        /// Cancels recurring payment
        /// </summary>
        /// <param name="transactionPayment">transactionPayment</param>
        /// <param name="cancelPaymentResult">Cancel payment result</param>        
        public void CancelRecurringPayment(TransactionPayment transactionPayment, ref CancelPaymentResult cancelPaymentResult)
        {
            InitSettings();
            MerchantAuthenticationType authentication = PopulateMerchantAuthentication();
            long subscriptionID = 0;
            long.TryParse(cancelPaymentResult.SubscriptionTransactionId, out subscriptionID);
            ARBCancelSubscriptionResponseType response = webService.ARBCancelSubscription(authentication, subscriptionID);

            if (response.resultCode == MessageTypeEnum.Ok)
            {
                //ok
            }
            else
            {
                cancelPaymentResult.Error = "Error cancelling subscription, please contact customer support. " + GetErrors(response);
                cancelPaymentResult.FullError = "Error cancelling subscription, please contact customer support. " + GetErrors(response);
            }
        }
예제 #4
0
 /// <summary>
 /// Voids payment
 /// </summary>
 /// <param name="transactionPayment">transactionPayment</param>
 /// <param name="cancelPaymentResult">Cancel payment result</param>
 public void Void(TransactionPayment transactionPayment, ref CancelPaymentResult cancelPaymentResult)
 {
     var paymentMethod = GetPaymentMethodById(transactionPayment.PaymentMethodId);
     if (paymentMethod == null)
         throw new Exception("Payment method couldn't be loaded");
     var iPaymentMethod = Activator.CreateInstance(Type.GetType(paymentMethod.ClassName)) as IPaymentMethod;
     iPaymentMethod.Void(transactionPayment, ref cancelPaymentResult);
 }
 /// <summary>
 /// Cancels recurring payment
 /// </summary>
 /// <param name="transactionPayment">transactionPayment</param>
 /// <param name="cancelPaymentResult">Cancel payment result</param>        
 public void CancelRecurringPayment(TransactionPayment transactionPayment, ref CancelPaymentResult cancelPaymentResult)
 {
 }