Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MongoDB.Bson.Serialization.Attributes;
- using System;
- using MongoDB.Bson;
- namespace EMS.Processor.RPC.Data
- {
- /// <summary>
- /// Request message used to initiate a request via the IPC named pipe channel
- /// </summary>
- public class TransactionRequest : ITransactionRequest, EMS.Broker.Messages.Core.Interfaces.IRequestMessage
- {
- #region RPC Request Message Interface
- /// <summary>
- /// Message Caller
- /// </summary>
- public string Caller { get; set; }
- /// <summary>
- /// Message Broker unique identifier
- /// </summary>
- [BsonId]
- public Guid CorrelationId { get; set; }
- #endregion
- /// <summary>
- /// Caller's source
- /// </summary>
- public TransactionSourceType Source { get; set; }
- /// <summary>
- /// Gets or sets the transaction type, Sales, Credit etc.
- /// </summary>
- public MessageTransactionType TransactionType { get; set; }
- /// <summary>
- /// Gets or sets the Acquirer Vendor ID, which is used to push notifications to ACQ 2.0 (Phase 1)
- /// </summary>
- public string AcquirerVendorId { get; set; }
- /// <summary>
- /// Gets or sets the Card Acceptor profile to use for the current merchant account
- /// </summary>
- public string CardAcceptorId { get; set; }
- /// <summary>
- /// Gets or sets Card Number
- /// </summary>
- public string CardNumber { get; set; }
- /// <summary>
- /// Gets or sets Amount of Purchase
- /// </summary>
- public string Amount { get; set; }
- /// <summary>
- /// Amount to be Adjusted. Used when sending Partial Reversal Sales
- /// </summary>
- public string AdjustedAmount { get; set; }
- /// <summary>
- /// Gets or sets Currency code in ISO 4217 numeric format
- /// </summary>
- public ushort CurrencyCode { get; set; }
- /// <summary>
- /// Gets or sets Date when transaction was processed
- /// </summary>
- public DateTime TransactionDate { get; set; }
- /// <summary>
- /// Gets or sets Card Expiry Date
- /// </summary>
- public DateTime? ExpiryDate { get; set; }
- /// <summary>
- /// Gets or sets Parent transaction Id. Not required by all transactions.
- /// </summary>
- public string ParentTransactionId { get; set; }
- /// <summary>
- /// Gets or sets POS Request data
- /// </summary>
- public POSRequest POSRequest { get; set; }
- /// <summary>
- /// Gets or sets Fields related to Ecommerce request
- /// </summary>
- public EcommerceRequest EcommerceRequest { get; set; }
- /// <summary>
- /// Gets or sets IP Address of the caller, invoking the Web API, or POS Listener
- /// </summary>
- public string CallerIPAddress { get; set; }
- /// <summary>
- /// DCC related details, whether to get a DCC quotation for a particular currency or proceed with a previously quoted DCC amount
- /// </summary>
- public DCCRequest DCC { get; set; }
- }
- /// <summary>
- /// POS Request class.
- /// </summary>
- public class POSRequest : IPOSRequest
- {
- /// <summary>
- /// Gets or sets Card Sequence Number
- /// </summary>
- [BsonIgnore]
- public string CardSequenceNumber { get; set; }
- /// <summary>
- /// Gets or sets Processing Code
- /// </summary>
- public string ProcessingCode { get; set; }
- /// <summary>
- /// Gets or sets PIN Block
- /// </summary>
- [BsonIgnore]
- public byte[] PINBlock { get; set; }
- /// <summary>
- /// Gets or sets ICC Related Data
- /// </summary>
- [BsonIgnoreIfDefault]
- public byte[] ICCRelatedData { get; set; }
- /// <summary>
- /// Gets or sets Invoice Number
- /// </summary>
- [BsonIgnoreIfDefault]
- public string InvoiceNumber { get; set; }
- /// <summary>
- /// Gets or sets Batch Number
- /// </summary>
- public string BatchNumber { get; set; }
- /// <summary>
- /// Gets or sets Cashback amount, or null if not used
- /// </summary>
- public long? CashbackAmount { get; set; }
- /// <summary>
- /// Gets or sets Card Acceptor Terminal ID which uniquely identifies a terminal at the card acceptor location of acquiring institutions or merchant POS systems.
- /// </summary>
- public string TerminalID { get; set; }
- /// <summary>
- /// Gets or sets POS Entry mode
- /// </summary>
- public POSEntryMode POSEntryMode { get; set; }
- /// <summary>
- /// Gets or sets POS Condition Code
- /// </summary>
- public POSConditionCodeEnum? POSConditionCode { get; set; }
- /// <summary>
- /// Gets or sets Track 2 Data
- /// </summary>
- [BsonIgnore]
- public string Track2Data { get; set; }
- /// <summary>
- /// Gets or sets isPOSReversal which is used to indicate that the message request is a POS initialized reversal.
- /// </summary>
- [BsonIgnoreIfDefault]
- public bool isPOSReversal { get; set; }
- /// <summary>
- /// Gets or sets CVV2 which is used to indicate that CVV2 was entered and what type of CVV2
- /// </summary>
- [BsonIgnoreIfDefault]
- public CVV2Entry CVV2 { get; set; }
- /// <summary>
- /// Gets or sets auth ID value which is used to link to a parent transaction
- /// </summary>
- [BsonIgnoreIfDefault]
- public string AuthId { get; set; }
- /// <summary>
- /// This property indicates whether it was an offline approved sale
- /// </summary>
- [BsonIgnoreIfDefault]
- public bool isOfflineSale { get; set; }
- /// <summary>
- /// Response code for offline sale. Valid values are:
- /// Authorization Response Code ( off-line ) Value
- /// Offline approved Y1
- /// Offline declined Z1
- /// Unable to go online, offline approved Y3
- /// Unable to go online, offline declined Z3
- /// </summary>
- [BsonIgnoreIfDefault]
- public string OfflineSaleResponseCode { get; set; }
- }
- /// <summary>
- /// Ecommerce request.
- /// </summary>
- public class EcommerceRequest : IEcommerceRequest
- {
- /// <summary>
- /// Gets or sets Response Code, used in void transactions
- /// </summary>
- [BsonIgnoreIfDefault]
- public string VoidResponseCode { get; set; }
- /// <summary>
- /// Gets or sets Cardholder Name
- /// </summary>
- [BsonIgnore]
- public string CardholderName { get; set; }
- /// <summary>
- /// Gets or sets Cardholder Address
- /// </summary>
- [BsonIgnore]
- public string CardholderAddress { get; set; }
- /// <summary>
- /// Gets or sets Cardholder City
- /// </summary>
- [BsonIgnore]
- public string CardholderCity { get; set; }
- /// <summary>
- /// Gets or sets Cardholder Postal Code
- /// </summary>
- [BsonIgnore]
- public string CardholderPostalCode { get; set; }
- /// <summary>
- /// Gets or sets Cardholder Country
- /// </summary>
- [BsonIgnore]
- public string CardholderCountry { get; set; }
- /// <summary>
- /// Gets or sets Cardholder IP
- /// </summary>
- [BsonIgnore]
- public string CardholderIPAddress { get; set; }
- /// <summary>
- /// Gets or sets Cardholder email
- /// </summary>
- [BsonIgnore]
- public string CardholderEmail { get; set; }
- /// <summary>
- /// Gets or sets Cvc2 associated with Cardholder BIN
- /// </summary>
- [BsonIgnore]
- public string Cvc2 { get; set; }
- /// <summary>
- /// Gets or sets Cardholder Authentication Verification Value (CAVV) for 3-D Secure transactions.
- /// </summary>
- [BsonIgnore]
- public string CAVV { get; set; }
- /// <summary>
- /// Gets or sets Transaction ID or XID, generated by the Merchant server to identify the transaction. The XID is used in conjunction with field CAVV
- /// </summary>
- [BsonIgnore]
- public string XID { get; set; }
- /// <summary>
- /// Gets or sets Electronic Commerce Indicator flag will be set whenever CAVV transactions are processed
- /// </summary>
- [BsonIgnoreIfDefault]
- public string ECIFlag { get; set; }
- /// <summary>
- /// Indicates whether Recurring Billing or Payments on transaction is in place. If set to true, transaction is a recurring payment.
- /// </summary>
- [BsonIgnoreIfDefault]
- public bool IsRecurBilling { get; set; }
- /// <summary>
- /// Gets or sets Order Number
- /// </summary>
- [BsonIgnoreIfDefault]
- public string OrderNumber { get; set; }
- /// <summary>
- /// Gets or sets whether transaction has to be AVS verified
- /// </summary>
- [BsonIgnoreIfDefault]
- public bool IsAVS { get; set; }
- /// <summary>
- /// Gets or sets MasterCard Payment Transaction.
- /// </summary>
- [BsonIgnoreIfDefault]
- public PaymentTransaction PaymentTransaction { get; set; }
- /// <summary>
- /// Gets or sets MoneySend recipient.
- /// </summary>
- [BsonIgnoreIfDefault]
- public RecipientData MoneySendRecipient { get; set; }
- /// <summary>
- /// Gets or sets MoneySend payer.
- /// </summary>
- [BsonIgnoreIfDefault]
- public SenderData MoneySendPayer { get; set; }
- /// <summary>
- /// Gets or sets VISA Direct Transaction.
- /// </summary>
- [BsonIgnoreIfDefault]
- public VisaDirectTransaction VisaDirectTransaction { get; set; }
- /// <summary>
- /// Indicates whether transaction is going to be MOTO or E-Commerce. If set to true, then transaction is MOTO.
- /// </summary>
- [BsonIgnoreIfDefault]
- public MotoTransaction Moto { get; set; }
- /// <summary>
- /// Gets or sets Advice Reason Code which is used for MasterCard Ecommerce Post Authorization transactions.
- /// </summary>
- [BsonIgnoreIfDefault]
- public AdviceReasonCodeType_AdviceReasonCode? AdviceReasonCode { get; set; }
- /// <summary>
- /// Gets or sets Advice Detail Code used for MasterCard Ecommerce Post Authorization transactions. This field is optional.
- /// </summary>
- [BsonIgnoreIfDefault]
- public AdviceReasonCodeType_AdviceDetailCode? AdviceDetailCode { get; set; }
- /// <summary>
- /// Advice Detail Text is optional and may be used to contain textual information supplementary to the Advice Detail Code.
- /// Used in MasterCard Ecommerce Post Authorization transactions.
- /// </summary>
- [BsonIgnoreIfDefault]
- public string AdviceDetailText { get; set; }
- }
- public class DCCRequest
- {
- /// <summary>
- /// The card's currency in ISO numerice format. This value is optional and POS might not report this value.
- /// </summary>
- public ushort? CardCurrency { get; set; }
- public ushort BuyingCurrency { get; set; }
- public string BuyingAmount { get; set; }
- /// <summary>
- /// Conversion Token obtained through DCC Quote
- /// </summary>
- public Guid ConversionToken { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement