Ejemplo n.º 1
0
        internal CashResponse DoCash(string txnType, AmountRequest amounts, TraceRequest trace, CashierSubGroup cashier)
        {
            var response = DoTransaction(PAX_MSG_ID.T10_DO_CASH, txnType, amounts, trace, cashier, new ExtDataSubGroup());

            return(new CashResponse(response));
        }
Ejemplo n.º 2
0
        internal CheckSubResponse DoCheck(string txnType, AmountRequest amounts, CheckSubGroup check, TraceRequest trace, CashierSubGroup cashier, ExtDataSubGroup extData)
        {
            var response = DoTransaction(PAX_MSG_ID.T12_DO_CHECK, txnType, amounts, check, trace, cashier, extData);

            return(new CheckSubResponse(response));
        }
Ejemplo n.º 3
0
        internal GiftResponse DoGift(string messageId, string txnType, AmountRequest amounts, AccountRequest accounts, TraceRequest trace, CashierSubGroup cashier, ExtDataSubGroup extData = null)
        {
            var response = DoTransaction(messageId, txnType, amounts, accounts, trace, cashier, extData);

            return(new GiftResponse(response));
        }
Ejemplo n.º 4
0
        internal EbtResponse DoEBT(string txnType, AmountRequest amounts, AccountRequest accounts, TraceRequest trace, CashierSubGroup cashier)
        {
            var response = DoTransaction(PAX_MSG_ID.T04_DO_EBT, txnType, accounts, trace, cashier, new ExtDataSubGroup());

            return(new EbtResponse(response));
        }
Ejemplo n.º 5
0
        internal DebitResponse DoDebit(string txnType, AmountRequest amounts, AccountRequest accounts, TraceRequest trace, CashierSubGroup cashier, ExtDataSubGroup extData)
        {
            var response = DoTransaction(PAX_MSG_ID.T02_DO_DEBIT, txnType, amounts, accounts, trace, cashier, extData);

            return(new DebitResponse(response));
        }
Ejemplo n.º 6
0
        internal CreditResponse DoCredit(string txnType, AmountRequest amounts, AccountRequest accounts, TraceRequest trace, AvsRequest avs, CashierSubGroup cashier, CommercialRequest commercial, EcomSubGroup ecom, ExtDataSubGroup extData)
        {
            var response = DoTransaction(PAX_MSG_ID.T00_DO_CREDIT, txnType, amounts, accounts, trace, avs, cashier, commercial, ecom, extData);

            return(new CreditResponse(response));
        }
Ejemplo n.º 7
0
        public override CreditResponse Execute()
        {
            base.Execute();

            var amounts = new AmountRequest {
                TransactionAmount = "{0:c}".FormatWith(amount).ToNumeric(),
                TipAmount         = "{0:c}".FormatWith(gratuity).ToNumeric()
            };

            var account = new AccountRequest();

            if (card != null)
            {
                account.AccountNumber = card.Number;
                account.EXPD          = "{0}{1}".FormatWith(card.ExpMonth, card.ExpYear);
                account.CvvCode       = card.Cvv;
            }
            if (allowDuplicates)
            {
                account.DupOverrideFlag = "1";
            }

            // Avs Sub Group
            var avs = new AvsRequest();

            if (address != null)
            {
                avs.ZipCode = address.Zip;
                avs.Address = address.Address;
            }

            // Trace Sub Group
            var trace = new TraceRequest {
                ReferenceNumber = referenceNumber.ToString()
            };

            if (details != null)
            {
                trace.InvoiceNumber = details.InvoiceNumber;
            }
            if (!string.IsNullOrEmpty(authCode))
            {
                trace.AuthCode = authCode;
            }


            var cashier    = new CashierSubGroup();
            var commercial = new CommercialRequest();
            var ecom       = new EcomSubGroup();

            // Additional Info sub group
            var additionalInfo = new ExtDataSubGroup();

            if (requestMultiUseToken)
            {
                additionalInfo[EXT_DATA.TOKEN_REQUEST] = "1";
            }
            if (transactionId.HasValue)
            {
                additionalInfo[EXT_DATA.HOST_REFERENCE_NUMBER] = transactionId.Value.ToString();
            }
            if (token != null)
            {
                additionalInfo[EXT_DATA.TOKEN] = token;
            }
            if (signatureCapture)
            {
                additionalInfo[EXT_DATA.SIGNATURE_CAPTURE] = "1";
            }

            return(service.DoCredit(PAX_TXN_TYPE.AUTH, amounts, account, trace, avs, cashier, commercial, ecom, additionalInfo));
        }