Beispiel #1
0
        public override DebitResponse Execute()
        {
            base.Execute();

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

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

            var cashier = new CashierSubGroup();

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

            if (transactionId != null)
            {
                extData[EXT_DATA.HOST_REFERENCE_NUMBER] = transactionId.ToString();
            }
            return(service.DoDebit(PAX_TXN_TYPE.RETURN, amounts, account, trace, cashier, extData));
        }
        public override GiftResponse Execute()
        {
            base.Execute();

            var account = new AccountRequest {
                AccountNumber = card != null ? card.Value : null
            };
            var trace = new TraceRequest {
                ReferenceNumber = referenceNumber.ToString()
            };
            var cashier = new CashierSubGroup();
            var extData = new ExtDataSubGroup();

            var messageId = currency == currencyType.USD ? PAX_MSG_ID.T06_DO_GIFT : PAX_MSG_ID.T08_DO_LOYALTY;

            return(service.DoGift(messageId, PAX_TXN_TYPE.BALANCE, new AmountRequest(), account, trace, cashier, extData));
        }
Beispiel #3
0
        public override GiftResponse Execute()
        {
            base.Execute();

            var amounts = new AmountRequest();

            var account = new AccountRequest();

            var trace = new TraceRequest {
                ReferenceNumber = referenceNumber.ToString()
            };

            var extData = new ExtDataSubGroup();

            extData[EXT_DATA.HOST_REFERENCE_NUMBER] = transactionId.Value.ToString();

            var messageId = currency == currencyType.USD ? PAX_MSG_ID.T06_DO_GIFT : PAX_MSG_ID.T08_DO_LOYALTY;

            return(service.DoGift(messageId, PAX_TXN_TYPE.VOID, amounts, account, trace, new CashierSubGroup(), extData));
        }
        public override GiftResponse Execute()
        {
            base.Execute();

            var amounts = new AmountRequest {
                TransactionAmount = "{0:c}".FormatWith(amount).ToNumeric()
            };
            var account = new AccountRequest {
                AccountNumber = card != null ? card.Value : null
            };
            var trace = new TraceRequest {
                ReferenceNumber = referenceNumber.ToString()
            };
            var cashier = new CashierSubGroup();
            var extData = new ExtDataSubGroup();

            // TODO : Change to TransactionType RETURN when terminal adds support for it
            var messageId = currency == currencyType.USD ? PAX_MSG_ID.T06_DO_GIFT : PAX_MSG_ID.T08_DO_LOYALTY;

            return(service.DoGift(messageId, PAX_TXN_TYPE.ADD, amounts, account, trace, cashier, extData));
        }
Beispiel #5
0
        public override CreditResponse Execute()
        {
            base.Execute();

            var account = new AccountRequest();

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

            // 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()
            };

            return(service.DoCredit(
                       requestMultiUseToken ? PAX_TXN_TYPE.TOKENIZE : PAX_TXN_TYPE.VERIFY,
                       new AmountRequest(),
                       account,
                       trace,
                       avs,
                       new CashierSubGroup(),
                       new CommercialRequest(),
                       new EcomSubGroup(),
                       new ExtDataSubGroup()
                       ));
        }
Beispiel #6
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));
        }
Beispiel #7
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));
        }
Beispiel #8
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));
        }
Beispiel #9
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));
        }
        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));
        }