Ejemplo n.º 1
0
 public string PurchaseInvoiceSale(long accountNumber, string orderRef, CustomerDetails customerDetails, string hash)
 {
     return Client.PurchaseInvoiceSale(accountNumber, orderRef, customerDetails.SocialSecurityNumber, customerDetails.FirstName,
         customerDetails.LastName, customerDetails.StreetAddress,
         customerDetails.CoAddress, customerDetails.PostNumber, customerDetails.City, customerDetails.CountryCode, customerDetails.Email,
         customerDetails.MobilePhone, customerDetails.IpAddress, hash);
 }
        public PurchasePartPaymentSaleResult PurchasePartPaymentSale(string orderRef, CustomerDetails customerDetails)
        {
            Log.InfoFormat("Calling PurchasePartPaymentSale for order with orderRef:{0}. CustomerDetails:{1}", orderRef, customerDetails);

            string hash = _hasher.Create(_payExSettings.AccountNumber, orderRef, customerDetails, _payExSettings.EncryptionKey);
            string xmlResult = _orderFacade.PurchasePartPaymentSale(_payExSettings.AccountNumber, orderRef, customerDetails, hash);

            PurchasePartPaymentSaleResult result = _resultParser.Deserialize<PurchasePartPaymentSaleResult>(xmlResult);
            if (result.Status.Success)
                Log.InfoFormat("Successfully called PurchasePartPaymentSale for order with orderRef:{0}. Result:{1}", orderRef, xmlResult);
            else
                 Log.ErrorFormat("Error when calling PurchasePartPaymentSale for order with orderRef:{0}. Result:{1}", orderRef, xmlResult);
            return result;
        }
Ejemplo n.º 3
0
 public string Create(long accountNumber, string orderRef, CustomerDetails customerDetails, string encryptionKey)
 {
     var stringToHash = string.Concat(accountNumber, orderRef, customerDetails.SocialSecurityNumber, customerDetails.FirstName, customerDetails.LastName, customerDetails.StreetAddress, customerDetails.CoAddress,
         customerDetails.PostNumber, customerDetails.City, customerDetails.CountryCode, customerDetails.Email, customerDetails.MobilePhone, customerDetails.IpAddress, encryptionKey);
     return CreateHash(stringToHash);
 }