public IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(_orderGroupFactory, typeof(TokenizedPayment)); payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); payment.PaymentMethodId = PaymentMethodId; payment.PaymentMethodName = SystemKeyword; return(payment); }
public override IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(OrderGroupFactory); payment.PaymentType = PaymentType.Other; payment.PaymentMethodId = PaymentMethodId; payment.PaymentMethodName = SystemKeyword; payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); payment.TransactionType = TransactionType.Authorization.ToString(); return(payment); }
public IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(_orderGroupFactory, typeof(PayooPayment)); payment.PaymentMethodId = _paymentMethod.PaymentMethodId; payment.PaymentMethodName = _paymentMethod.Name; payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); payment.TransactionType = TransactionType.Authorization.ToString(); return(payment); }
public IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var type = Type.GetType(_paymentMethod.PaymentImplementationClassName); var payment = type == null?orderGroup.CreatePayment(_orderGroupFactory) : orderGroup.CreatePayment(_orderGroupFactory, type); payment.PaymentMethodId = _paymentMethod.PaymentMethodId; payment.PaymentMethodName = _paymentMethod.Name; payment.Amount = amount; payment.TransactionType = TransactionType.Authorization.ToString(); payment.Status = PaymentStatus.Pending.ToString(); return(payment); }
public IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(_orderGroupFactory, typeof(OtherPayment)); // var payment = _orderGroupFactory.CreatePayment(orderGroup); payment.PaymentMethodId = PaymentMethodId; payment.PaymentMethodName = Name; payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); payment.TransactionType = TransactionType.Sale.ToString(); return(payment); }
public static void CancelPayment(IOrderGroup orderGroup, IPayment previousPayment) { var voidPayment = orderGroup.CreatePayment(_orderGroupFactory.Service); voidPayment.PaymentType = previousPayment.PaymentType; voidPayment.PaymentMethodId = previousPayment.PaymentMethodId; voidPayment.PaymentMethodName = previousPayment.PaymentMethodName; voidPayment.Amount = previousPayment.Amount; voidPayment.Status = PaymentStatus.Pending.ToString(); voidPayment.TransactionType = TransactionType.Void.ToString(); orderGroup.AddPayment(voidPayment); _paymentProcessor.Service.ProcessPayment(orderGroup, voidPayment, orderGroup.GetFirstShipment()); }
public override IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(_orderGroupFactory); payment.PaymentType = PaymentType.Other; payment.PaymentMethodId = PaymentMethodId; payment.PaymentMethodName = "netaxept"; payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); payment.TransactionType = TransactionType.Authorization.ToString(); var urlHelper = new UrlHelper(System.Web.HttpContext.Current.Request.RequestContext); var netaxeptPaymentCallbackUrl = "http://" + System.Web.HttpContext.Current.Request.Url.DnsSafeHost + urlHelper.Action("Index", "PaymentCallback"); // creating the payment object payment.Properties[NetaxeptConstants.CallbackUrl] = netaxeptPaymentCallbackUrl; return(payment); }
public override IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var paymentOrder = _swedbankPayCheckoutService.GetPaymentOrder(orderGroup, PaymentOrderExpand.All); var currentPayment = paymentOrder.PaymentOrderResponse.CurrentPayment.Payment; var transaction = currentPayment?.Transactions?.TransactionList?.FirstOrDefault(); var transactionType = transaction?.Type.ConvertToEpiTransactionType() ?? TransactionType.Authorization; var payment = orderGroup.CreatePayment(_orderGroupFactory); payment.PaymentType = PaymentType.Other; payment.PaymentMethodId = PaymentMethodId; payment.PaymentMethodName = Constants.SwedbankPayCheckoutSystemKeyword; payment.ProviderTransactionID = transaction?.Number; payment.Amount = amount; var isSwishPayment = currentPayment?.Instrument.Equals(PaymentInstrument.Swish) ?? false; payment.Status = isSwishPayment ? PaymentStatus.Processed.ToString() : PaymentStatus.Pending.ToString(); payment.TransactionType = transactionType.ToString(); return(payment); }
public IPayment CreatePayment(decimal amount, IOrderGroup orderGroup) { var payment = orderGroup.CreatePayment(_orderGroupFactory, typeof(PayPalPayment)); var paymentAction = _paymentMethodDto?.PaymentMethodParameter?.Select(string.Format("Parameter = '{0}'", PayPalConfiguration.PaymentActionParameter)).FirstOrDefault() as PaymentMethodDto.PaymentMethodParameterRow; payment.PaymentMethodId = _paymentMethod.PaymentMethodId; payment.PaymentMethodName = _paymentMethod.Name; payment.Amount = amount; payment.Status = PaymentStatus.Pending.ToString(); if (paymentAction != null && paymentAction.Value == TransactionType.Authorization.ToString()) { payment.TransactionType = TransactionType.Authorization.ToString(); } else { payment.TransactionType = TransactionType.Sale.ToString(); } return(payment); }