Example #1
0
        /// <summary>
        /// Updates a payment profile for a user.
        /// </summary>
        /// <param name="profileID">The profile ID.</param>
        /// <param name="profile">The profile.</param>
        /// <returns></returns>
        public bool UpdatePaymentProfile(string profileID, PaymentProfile profile)
        {
            var req = new updateCustomerPaymentProfileRequest();

            req.customerProfileId = profileID;
            req.paymentProfile = profile.ToAPI();

            var response = (updateCustomerPaymentProfileResponse)_gateway.Send(req);

            return true;
        }
        /// <summary>
        /// Updates a payment profile for a user.
        /// </summary>
        /// <param name="profileID">The profile ID.</param>
        /// <param name="profile">The profile.</param>
        /// <returns></returns>
        public bool UpdatePaymentProfile(string profileID, PaymentProfile profile) {

            var req = new updateCustomerPaymentProfileRequest();
            
            req.customerProfileId = profileID;
            req.paymentProfile = profile.ToAPI();

            if (profile.BillingAddress != null)
                req.paymentProfile.billTo = profile.BillingAddress.ToAPIType();

            var response = (updateCustomerPaymentProfileResponse)_gateway.Send(req);
            
            return true;
        }