Exemplo n.º 1
0
        public void SaveOrUpdateAcctountInfo(IDatabaseCustomerMarketPlace databaseCustomerMarketPlace, PayPalPersonalData data)
        {
            MP_CustomerMarketPlace customerMarketPlace = GetCustomerMarketPlace(databaseCustomerMarketPlace.Id);

            if (customerMarketPlace.PersonalInfo == null)
            {
                customerMarketPlace.PersonalInfo = new MP_PayPalPersonalInfo {
                    CustomerMarketPlace = customerMarketPlace,
                };

                _CustomerMarketplaceRepository.Save(customerMarketPlace);
            }

            MP_PayPalPersonalInfo info = customerMarketPlace.PersonalInfo;

            info.Updated      = data.SubmittedDate;
            info.BusinessName = data.BusinessName;
            info.City         = data.AddressCity;
            info.FirstName    = data.FirstName;
            info.Country      = data.AddressCountry;
            info.DateOfBirth  = data.BirthDate;
            info.Phone        = data.Phone == "0" ? null : data.Phone;
            info.EMail        = data.Email;
            info.LastName     = data.LastName;
            info.FullName     = data.FullName;
            info.PlayerId     = data.PlayerId;
            info.Postcode     = data.AddressPostCode;
            info.State        = data.AddressState;
            info.Street1      = data.AddressStreet1;
            info.Street2      = data.AddressStreet2;

            _CustomerMarketplaceRepository.SaveOrUpdate(customerMarketPlace);
        }
Exemplo n.º 2
0
        public PayPalAccountInfoModel(MP_PayPalPersonalInfo pi)
        {
            if (pi == null)
            {
                Empty();
                return;
            }

            FullName     = pi.FullName;
            DateOfBirth  = pi.DateOfBirth.HasValue ? pi.DateOfBirth.ToString() : "-";
            Email        = pi.EMail;
            Phone        = pi.Phone;
            BuisnessName = pi.BusinessName;
            Street1      = pi.Street1;
            Street2      = pi.Street2;
            City         = pi.City;
            State        = pi.State;
            Postcode     = pi.Postcode;
            Country      = pi.Country;
        }