Exemplo n.º 1
0
        public bool IsDataCollect(PaymentMethodType paymentMethodType)
        {
            string functionCode = GetString(DataElementId.DE_024);
            string reasonCode   = GetString(DataElementId.DE_025);

            if (MessageTypeIndicator.Equals("1200") && functionCode.Equals("200"))
            {
                return(true);
            }
            else if (MessageTypeIndicator.Equals("1220") || MessageTypeIndicator.Equals("1221"))
            {
                if (functionCode.Equals("200"))
                {
                    return(paymentMethodType.Equals(PaymentMethodType.Credit));
                }
                else if (functionCode.Equals("201") || functionCode.Equals("202"))
                {
                    if (paymentMethodType != default(PaymentMethodType) && (paymentMethodType.Equals(PaymentMethodType.Debit) || paymentMethodType.Equals(PaymentMethodType.EBT)))
                    {
                        return(reasonCode.Equals("1379"));
                    }
                    return(reasonCode.Equals("1376") || reasonCode.Equals("1377") || reasonCode.Equals("1378") || reasonCode.Equals("1381"));
                }
                return(false);
            }
            return(false);
        }
Exemplo n.º 2
0
        private IEnumerable <string> GetEditableFields()
        {
            var fields = new List <String>
            {
                "PreferredPayment",
                "PaymentStatus",
                "PaymentMethodIdentifier",
                "NameOnAccount",
                "AddressLine1",
                "AddressLine2",
                "City",
                "StateProvince",
                "ZipPostalCode"
            };

            if (PaymentMethodType.Equals(HpsPayPlanPaymentMethodType.Ach))
            {
                fields.Add("TelephoneIndicator");
                fields.Add("AccountHolderYob");
                fields.Add("DriversLicenseState");
                fields.Add("DriversLicenseNumber");
                fields.Add("SocialSecurityLast4");
                fields.Add("AchType");
                fields.Add("RoutingNumber");
                fields.Add("AccountNumber");
                fields.Add("AccountType");
            }
            else if (PaymentMethodType.Equals(HpsPayPlanPaymentMethodType.CreditCard))
            {
                fields.Add("ExpirationDate");
                fields.Add("Country");
            }

            return(fields.ToArray());
        }
Exemplo n.º 3
0
        public void ReportDataCollect(TransactionType transactionType, PaymentMethodType paymentMethodType, decimal amount, string encodedRequest)
        {
            lock (objectLock) {
                TotalTransactionCount += 1;
                encodedRequests.Add(encodedRequest);
                switch (transactionType)
                {
                case TransactionType.Capture:
                case TransactionType.Sale: {
                    if (paymentMethodType.Equals(PaymentMethodType.Credit))
                    {
                        CardType = "CT ";
                        CreditCardTransactionCount += 1;
                        CreditCardTransactionSales += amount;
                    }
                    else if (paymentMethodType.Equals(PaymentMethodType.Debit) || paymentMethodType.Equals(PaymentMethodType.EBT))
                    {
                        CardType = "DB ";
                        DebitEBTTransactionCount += 1;
                        DebitEBTTransactionSales += amount;
                    }
                    else
                    {
                        CardType = "OH ";
                        OtherCardTransactionCount += 1;
                        OtherCardTransactionSales += amount;
                    }
                }
                break;

                case TransactionType.Reversal: {
                    if (paymentMethodType.Equals(PaymentMethodType.Credit))
                    {
                        CardType = "CT ";
                        CreditCardTransactionCount += 1;
                        CreditCardTransactionSales -= amount;
                    }
                    else if (paymentMethodType.Equals(PaymentMethodType.Debit) || paymentMethodType.Equals(PaymentMethodType.EBT))
                    {
                        CardType = "DB ";
                        DebitEBTTransactionCount += 1;
                        DebitEBTTransactionSales -= amount;
                    }
                    else
                    {
                        CardType = "OH ";
                        OtherCardTransactionCount += 1;
                        OtherCardTransactionSales -= amount;
                    }
                }
                break;

                case TransactionType.Refund: {
                    if (paymentMethodType.Equals(PaymentMethodType.Credit))
                    {
                        CardType = "CT ";
                        CreditReturnTransactionCount += 1;
                        CreditReturnTransactionSales += amount;
                    }
                    else if (paymentMethodType.Equals(PaymentMethodType.Debit) || paymentMethodType.Equals(PaymentMethodType.EBT))
                    {
                        CardType = "DB ";
                        DebitReturnTransactionCount += 1;
                        DebitReturnTransactionSales += amount;
                    }
                }
                break;

                case TransactionType.Void: {
                    if (paymentMethodType.Equals(PaymentMethodType.Credit))
                    {
                        CardType = "CT ";
                        CreditVoidTransactionCount += 1;
                        CreditVoidTransactionSales += amount;
                        CreditCardTransactionSales -= amount;
                    }
                    else if (paymentMethodType.Equals(PaymentMethodType.Debit) || paymentMethodType.Equals(PaymentMethodType.EBT))
                    {
                        CardType = "DB ";
                        DebitEBTVoidTransactionCount += 1;
                        DebitEBTVoidTransactionSales += amount;
                    }
                }
                break;
                }
                Save();
            }
        }