Ejemplo n.º 1
0
 /// <summary>
 /// Checks to see if an email address is supplied, fills in application's default if not
 /// </summary>
 /// <param name="Application"></param>
 /// <param name="BillTo"></param>
 private void CheckEmail(string Application, BillToInfo BillTo)
 {
     // using a dummy email address. Make a note of it in case it's interesting to someone
     if (IsMissing(BillTo.Email))
     {
         //Logger.Log("Using default email for " + BillTo.FirstName + " " + BillTo.LastName + " order.");
         BillTo.Email = this.GetDefaultEmail(Application);
     }
 }
Ejemplo n.º 2
0
        /// <remarks/>
        public CCResponse Auth(string MerchantRefNum, object Card, object BillTo, IList Items, bool IgnoreAVS)
        {
            BillToInfo B = new BillToInfo(BillTo);

            B.IgnoreAVS = IgnoreAVS;
            CardInfo C = new CardInfo(Card);

            C.Application = S.AppName;
            return(Pmt.Auth(User, S.AppName, MerchantRefNum, C, B, new ArrayOfLineItem(Items)));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Inserts Credit/E-Check Transaction data to Database
 /// </summary>
 /// <param name="user">Encapsulates site user information.</param>
 /// <param name="AppName">The name of the application calling the method.</param>
 /// <param name="PaymentType">The type of payment.</param>
 /// <param name="ReceiptNo">The Receipt number for this Transaction.</param>
 /// <param name="MerchantRefNumber">The Merchant Reference Number for the Transaction</param>
 /// <param name="ReturnCode">Response code from Payment Central</param>
 /// <param name="Card">Description for CardInfo.</param>
 /// <param name="Echeck">Capture the echeck information</param>
 /// <param name="Billto">BillToInfo encapsulates all the customer's billing information.</param>
 /// <param name="Items">Represents a collection of line items.</param>
 /// <param name="status">Transaction Status</param>
 //MAIG - CH6 - BEGIN - Added the Additional parameter InsData
 public void pcCreditCard(UserInfo user, string AppName, int PaymentType, string ReceiptNo, string MerchantRefNumber, string ReturnCode, CardInfo Card, eCheckInfo Echeck, BillToInfo Billto, ArrayOfLineItem Items, string status, string crossReferenceNumber, List <string> InsData)
 //MAIG - CH6 - END - Added the Additional parameter InsData
 {
     try
     {
         int PaymentId = 0;
         //MAIG - CH7 - BEGIN - Added the Policy State, prefix, Company Code details as a parameter.
         PaymentId = pcCashCheck(user, AppName, PaymentType, ReceiptNo, MerchantRefNumber, Items, status, crossReferenceNumber, InsData, false);
         //MAIG - CH7 - END - Added the Policy State, prefix, Company Code details as a parameter.
         SqlCommand Cmd_Insert_Card = GetCommand(CSAAWeb.Constants.PC_SP_Pay_InsertCardCheck);
         Cmd_Insert_Card.Parameters.AddWithValue("@paymentId", PaymentId);
         Cmd_Insert_Card.Parameters.AddWithValue("@Result_Code", "");
         Cmd_Insert_Card.Parameters.AddWithValue("@ReAuth", "");
         Cmd_Insert_Card.Parameters.AddWithValue("@BillToAddress", Billto.ToString());
         Cmd_Insert_Card.Parameters.AddWithValue("@Items", Items.ToString());
         Cmd_Insert_Card.Parameters.AddWithValue("@VerbalAuthorization", "");
         if (PaymentType == 5)
         {
             Cmd_Insert_Card.Parameters.AddWithValue("@RequestID", "");
             Cmd_Insert_Card.Parameters.AddWithValue("@Auth_Code", "");
             Cmd_Insert_Card.Parameters.AddWithValue("@BankId", Echeck.BankId);
             Cmd_Insert_Card.Parameters.AddWithValue("@signature", Echeck.signature);
             Cmd_Insert_Card.Parameters.AddWithValue("@BankAcntType", Echeck.BankAcntType);
             Cmd_Insert_Card.Parameters.AddWithValue("@CustomerName", Echeck.CustomerName);
             Cmd_Insert_Card.Parameters.AddWithValue("@CCType", 0);
             Cmd_Insert_Card.Parameters.AddWithValue("@CCExpYear", 0);
             Cmd_Insert_Card.Parameters.AddWithValue("@CCExpMonth", 0);
         }
         else
         {
             Cmd_Insert_Card.Parameters.AddWithValue("@RequestID", "");
             Cmd_Insert_Card.Parameters.AddWithValue("@Auth_Code", ReturnCode);
             Cmd_Insert_Card.Parameters.AddWithValue("@CCType", int.Parse(Card.CCType));
             Cmd_Insert_Card.Parameters.AddWithValue("@CCExpYear", Card.CCExpYear);
             Cmd_Insert_Card.Parameters.AddWithValue("@CCExpMonth", Card.CCExpMonth);
             Cmd_Insert_Card.Parameters.AddWithValue("@BankId", "");
             Cmd_Insert_Card.Parameters.AddWithValue("@signature", Card.Signature);
             Cmd_Insert_Card.Parameters.AddWithValue("@BankAcntType", "");
             Cmd_Insert_Card.Parameters.AddWithValue("@CustomerName", "");
         }
         Cmd_Insert_Card.ExecuteNonQuery();
     }
     catch (Exception e)
     {
         Logger.Log(e.Message + e.StackTrace + e.InnerException);
         throw e;
     }
 }
Ejemplo n.º 4
0
 public CCResponse Auth(UserInfo User, string AppId, string MerchantRefNum, CardInfo Card, BillToInfo BillTo, ArrayOfLineItem Items)
 {
     return((CCResponse)Invoke(new object[] { User, AppId, MerchantRefNum, Card, BillTo, Items })[0]);
 }
Ejemplo n.º 5
0
 public CCResponse ReAuth(UserInfo User, string AppId, string MerchantRefNum, CardInfo Card, BillToInfo BillTo)
 {
     return((CCResponse)Invoke(new object[] { User, AppId, MerchantRefNum, Card, BillTo })[0]);
 }
Ejemplo n.º 6
0
 public CCResponse Auth(UserInfo User, string AppId, string MerchantRefNum, CardInfo Card, BillToInfo BillTo, ArrayOfLineItem Items)
 {
     return(DoAuth(new Payment(ServiceOperation.Auth, AppId, MerchantRefNum, "", "", Card, BillTo, Items, User)));
 }
Ejemplo n.º 7
0
 public CCResponse ReAuth(UserInfo User, string AppId, string MerchantRefNum, CardInfo Card, BillToInfo BillTo)
 {
     return(Auth(User, AppId, MerchantRefNum, Card, BillTo, null));
 }