public CustomerDataRequest MountCustomerDataRequest(ResponseViewModel sale, Guid braspagTransactionId) { var custumer = new CustomerDataRequest() { BraspagOrderId = braspagTransactionId, MerchantId = new Guid(ConfigurationManager.AppSettings["merchantId"]), Version = "1.0", RequestId = Guid.NewGuid() }; return(custumer); }
//POST PARAMETERS public AuthorizeTransactionRequest AddingAuthorizeParameters(SoapViewModel soapCreditCard) { var serviceOrderData = new OrderDataRequest { MerchantId = new Guid(soapCreditCard.MerchanId), OrderId = "0000" }; var serviceCustomer = new CustomerDataRequest { CustomerIdentity = soapCreditCard.Identity, CustomerIdentityType = soapCreditCard.CustomerIdentityType, CustomerName = soapCreditCard.CustomerName, CustomerEmail = soapCreditCard.CustomerEmail }; var servicePayment = new CreditCardDataRequest { PaymentMethod = soapCreditCard.PaymentMethod, Amount = soapCreditCard.Amount, Currency = soapCreditCard.Currency, Country = soapCreditCard.Country, NumberOfPayments = (short)soapCreditCard.NumberPayments, PaymentPlan = 0, // cash TransactionType = 1, // preauth CardHolder = soapCreditCard.CustomerName, CardNumber = soapCreditCard.CardNumber, CardSecurityCode = soapCreditCard.SecurityCode, CardExpirationDate = soapCreditCard.Expiration }; var authorizationRequest = new AuthorizeTransactionRequest { RequestId = new Guid("00000000-0000-0000-0000-000000000000"), Version = "1.0", CustomerData = serviceCustomer, OrderData = serviceOrderData, PaymentDataCollection = new PaymentDataRequest[] { servicePayment } }; return(authorizationRequest); }