示例#1
0
        /// <summary>
        /// return an item
        /// </summary>
        /// <returns></returns>
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();

            item.Site        = SiteCodeType.US;
            item.Currency    = CurrencyCodeType.USD;
            item.ListingType = ListingTypeCodeType.Chinese;
            String t = "eBay SDK SanityTest " + DateTime.Now + " DO NOT BID!";

            item.ApplicationData       = "this is an application data";
            item.Title                 = t;
            item.Description           = "This is a test item created by eBay SDK SanityTest.";
            item.StartPrice            = new AmountType();
            item.StartPrice.Value      = 1.01;
            item.StartPrice.currencyID = item.Currency;
            item.ListingDuration       = "Days_7";
            item.Location              = "San Jose, CA";
            item.Country               = CountryCodeType.US;
            BestOfferDetailsType bo = new BestOfferDetailsType();

            bo.BestOfferEnabled   = false;
            item.BestOfferDetails = bo;
            CategoryType cat = new CategoryType();

            cat.CategoryID         = "14111";
            item.PrimaryCategory   = cat;
            item.Quantity          = 1;
            item.QuantitySpecified = true;
            //handling time
            item.DispatchTimeMax = 1;

            //item condition
            item.ConditionID = 1000;



            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();

            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods     = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //shipping service
            item.ShippingDetails = getShippingDetails();
            // Set item picture
            PictureDetailsType pictureDetails = new PictureDetailsType();

            pictureDetails.PictureURL = new StringCollection();
            pictureDetails.PictureURL.Add("http://pics.ebaystatic.com/aw/pics/navbar/eBayLogoTM.gif");

            item.ReturnPolicy = GetPolicyForUS();

            item.PictureDetails = pictureDetails;
            return(item);
        }
        public static BuyerPaymentMethodCodeTypeCollection getCatPaymentMethods(String catid)
        {
            //payment methods, recursively search
            BuyerPaymentMethodCodeTypeCollection paymentMethods = getPaymentMethods(catid);

            if (paymentMethods == null || paymentMethods.Count == 0)            //get site defautls
            {
                paymentMethods = siteDefaults.PaymentMethod;
            }
            return(paymentMethods);
        }
示例#3
0
        //populate payment methods
        private void populatePaymentMethodTable()
        {
            BuyerPaymentMethodCodeTypeCollection paymentMethods = this.controller.CategoryFacade.PaymentMethod;

            this.paymentMethodTableLayoutPanel.Controls.Clear();
            foreach (BuyerPaymentMethodCodeType payment in paymentMethods)
            {
                CheckBox cb = new CheckBox();
                cb.AutoSize = true;
                cb.Text     = payment.ToString();
                cb.Name     = payment.ToString();
                this.paymentMethodTableLayoutPanel.Controls.Add(cb);
            }
        }
示例#4
0
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();

            item.AutoPay                  = false;
            item.BuyItNowPrice            = new AmountType();
            item.BuyItNowPrice.Value      = Convert.ToDouble("10.0");
            item.BuyItNowPrice.currencyID = CurrencyCodeType.USD;
            item.Country                  = CountryCodeType.US;
            item.Currency                 = CurrencyCodeType.USD;
            item.Description              = "SDK item description";
            item.ListingDuration          = "Days_7";
            item.ListingType              = ListingTypeCodeType.Chinese;
            item.Location                 = "San Jose, CA";
            item.PaymentMethods           = new BuyerPaymentMethodCodeTypeCollection();
            item.PaymentMethods.Add(BuyerPaymentMethodCodeType.PaymentSeeDescription);
            item.PrimaryCategory            = new CategoryType();
            item.PrimaryCategory.CategoryID = "2312";
            item.Quantity                = 1;
            item.RegionID                = "0";
            item.ReservePrice            = new AmountType();
            item.ReservePrice.Value      = Convert.ToDouble("5.0");
            item.ReservePrice.currencyID = CurrencyCodeType.USD;
            item.ShippingDetails         = new ShippingDetailsType();
            item.StartPrice              = new AmountType();
            item.StartPrice.Value        = Convert.ToDouble("1.0");
            item.StartPrice.currencyID   = CurrencyCodeType.USD;
            item.SubTitle                = "sub title";
            item.Title                        = "SDK item title";
            item.SecondaryCategory            = new CategoryType();
            item.SecondaryCategory.CategoryID = "2369";
            //set shipping details
            item.ShippingDetails = getShippingDetails();
            //handling time
            item.DispatchTimeMax = 1;
            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();

            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods     = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //set return policy
            item.ReturnPolicy = GetPolicyForUS();

            return(item);
        }
示例#5
0
        /// <summary>
        /// return an item
        /// </summary>
        /// <returns></returns>
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();
            item.Site = SiteCodeType.US;
            item.Currency = CurrencyCodeType.USD;
            item.ListingType = ListingTypeCodeType.Chinese;
            String t = "eBay SDK SanityTest " + DateTime.Now + " DO NOT BID!";

            item.ApplicationData="this is an application data";
            item.Title = t;
            item.Description = "This is a test item created by eBay SDK SanityTest.";
            item.StartPrice = new AmountType();
            item.StartPrice.Value = 1.01;
            item.StartPrice.currencyID = item.Currency;
            item.ListingDuration = "Days_7";
            item.Location = "San Jose, CA";
            item.Country = CountryCodeType.US;
            BestOfferDetailsType bo = new BestOfferDetailsType();
            bo.BestOfferEnabled = false;
            item.BestOfferDetails = bo;
            CategoryType cat = new CategoryType();
            cat.CategoryID = "14111";
            item.PrimaryCategory = cat;
            item.Quantity = 1;
            item.QuantitySpecified = true;
            //handling time
            item.DispatchTimeMax =1;
            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();
            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //shipping service
            item.ShippingDetails = getShippingDetails();
            // Set item picture
            PictureDetailsType pictureDetails = new PictureDetailsType();
            pictureDetails.PictureURL = new StringCollection();
            pictureDetails.PictureURL.Add( "http://pics.ebaystatic.com/aw/pics/navbar/eBayLogoTM.gif");

            item.ReturnPolicy=GetPolicyForUS();

            item.PictureDetails = pictureDetails;
            return item;
        }
示例#6
0
		public static ItemType BuildItem()
		{
			ItemType item =new ItemType();
			item.AutoPay = false;
			item.BuyItNowPrice = new AmountType();
			item.BuyItNowPrice.Value = Convert.ToDouble("10.0");
			item.BuyItNowPrice.currencyID = CurrencyCodeType.USD;
			item.Country = CountryCodeType.US;
			item.Currency = CurrencyCodeType.USD;
			item.Description = "SDK item description";
			item.ListingDuration = "Days_7";
			item.ListingType = ListingTypeCodeType.Chinese;
			item.Location = "San Jose, CA";
			item.PaymentMethods = new BuyerPaymentMethodCodeTypeCollection();
			item.PaymentMethods.Add(BuyerPaymentMethodCodeType.PaymentSeeDescription);
			item.PrimaryCategory = new CategoryType();
			item.PrimaryCategory.CategoryID = "2312";
			item.Quantity = 1;
			item.RegionID = "0";
			item.ReservePrice = new AmountType();
			item.ReservePrice.Value = Convert.ToDouble("5.0");
			item.ReservePrice.currencyID = CurrencyCodeType.USD;
			item.ShippingDetails = new ShippingDetailsType();
			item.StartPrice = new AmountType();
			item.StartPrice.Value = Convert.ToDouble("1.0");
			item.StartPrice.currencyID = CurrencyCodeType.USD;
			item.SubTitle = "sub title";
			item.Title = "SDK item title";
			item.SecondaryCategory = new CategoryType();
			item.SecondaryCategory.CategoryID = "2369";
			//set shipping details
			item.ShippingDetails=getShippingDetails();
			//handling time
			item.DispatchTimeMax =1;
			// Payment
			BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
				new BuyerPaymentMethodCodeTypeCollection();
			arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
			item.PaymentMethods = arrPaymentMethods;
			item.PayPalEmailAddress = "*****@*****.**";
			//set return policy
			item.ReturnPolicy=GetPolicyForUS();

			return item;
		}
示例#7
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol = new BuyerPaymentMethodCodeTypeCollection();

            foreach (CheckBox cb in this.paymentMethodTableLayoutPanel.Controls)
            {
                if (cb.Checked)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType), cb.Name, false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType == BuyerPaymentMethodCodeType.PayPal && this.paypalEmailTextBox.Text != string.Empty)
                    {
                        item.PayPalEmailAddress = this.paypalEmailTextBox.Text;
                    }
                }
            }

            item.PaymentMethods = paymentCol;
        }
示例#8
0
        /// <summary>
        /// Enables a seller to send an order invoice to a buyer. Where applicable, updates to shipping, payment methods, and sales tax made in this request are applied to the specified order as a whole and to the individual order line items whose data are stored in individual <b>Transaction</b> objects.
        /// </summary>
        /// 
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. Unless <b>OrderID</b> or
        /// <b>OrderLineItemID</b> is provided in the request, the <b>ItemID</b> (or <b>SKU</b>) is
        /// required and must be paired with the corresponding <b>TransactionID</b> to
        /// identify a single line item order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should be used.
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Unique identifier for an eBay order line item (transaction). An order
        /// line item is created once there is a commitment from a buyer to purchase
        /// an item. Since an auction listing can only have one order line item
        /// during the duration of the listing, the <b>TransactionID</b> for
        /// auction listings is always 0. Unless <b>OrderID</b> or <b>OrderLineItemID</b> is
        /// provided in the request, the <b>TransactionID</b> is required and must be
        /// paired with the corresponding <b>ItemID</b> to identify a single line item
        /// order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should
        /// be used.
        /// </param>
        ///
        /// <param name="OrderID">
        /// A unique identifier that identifies a single line item or multiple line
        /// item (Combined Invoice) orders.
        /// 
        /// For a single line item order, the <b>OrderID</b> value is identical to the
        /// <b>OrderLineItemID</b> value that is generated upon creation of the order line
        /// item. For a Combined Invoice order, the <b>OrderID</b> value is created by eBay
        /// when the buyer or seller (sharing multiple, common order line items)
        /// combines multiple order line items into a Combined Invoice order. A
        /// Combined Invoice order can also be created by the seller through the
        /// <b>AddOrder</b> call.
        /// 
        /// Unless the <b>ItemID</b> (or SKU) and corresponding <b>TransactionID</b>, or the
        /// <b>OrderLineItemID</b> is provided in the request to identify a single line
        /// item order, the <b>OrderID</b> must be specified. If <b>OrderID</b> is specified,
        /// <b>OrderLineItemID</b>, <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present
        /// in the same request.
        /// </param>
        ///
        /// <param name="InternationalShippingServiceOptionsList">
        /// If the buyer has an International shipping address, use this container
        /// to offer up to three International shipping services. If International
        /// shipping services are offered, (domestic) <b>ShippingServiceOptions</b> should
        /// not be included in the request.
        /// 
        /// </param>
        ///
        /// <param name="ShippingServiceOptionsList">
        /// If the buyer has a domestic shipping address, use this container
        /// to offer up to three domestic shipping services. If domestic
        /// shipping services are offered, <b>InternationalShippingServiceOptions</b> should
        /// not be included in the request.
        /// 
        /// </param>
        ///
        /// <param name="SalesTax">
        /// Container consisting of sales tax details. The amount of sales tax to
        /// add to the price of an order is dependent on the sales tax rate in the
        /// buyer's state and whether sales tax is being applied to the cost of the
        /// order only or the cost of the order plus shipping.
        /// </param>
        ///
        /// <param name="InsuranceOption">
        /// Specifies whether an insurance fee is required. An <b>InsuranceOption</b> value of
        /// <b>IncludedInShippingHandling</b> cannot be used if the item will use calculated
        /// shipping. Some shipping carriers automatically include shipping insurance
        /// for qualifying items.
        /// </param>
        ///
        /// <param name="InsuranceFee">
        /// Insurance cost, as set by seller, if ShippingType = 1.
        /// Specify if <b>InsuranceOption</b> is optional or required. Must
        /// be greater than zero value if a value of Optional or Required is passed in
        /// <b>InsuranceOption</b>. Value specified should be the total cost of insuring the
        /// item.
        /// </param>
        ///
        /// <param name="PaymentMethodsList">
        /// This optional field allows a US or German seller to add specific payment
        /// methods that were not in the original item listing. The only valid values
        /// for this field are 'PayPal' for a US listing, or
        /// 'MoneyXferAcceptedInCheckout' (CIP+) for a DE listing.
        /// </param>
        ///
        /// <param name="PayPalEmailAddress">
        /// If the <b>PaymentMethods</b> field is used and set to PayPal, the seller
        /// provides his/her PayPal email address in this field.
        /// </param>
        ///
        /// <param name="CheckoutInstructions">
        /// This field allows the seller to provide a message or instructions
        /// regarding checkout/payment or the return policy.
        /// </param>
        ///
        /// <param name="EmailCopyToSeller">
        /// Flag indicating whether or not the seller wishes to receive an email copy of
        /// the invoice sent to the buyer.
        /// </param>
        ///
        /// <param name="CODCost">
        /// This dollar value indicates the money due from the buyer upon delivery of the item.
        /// 
        /// This field should only be specified in the <b>SendInvoice</b> request if 'COD' 
        /// (cash-on-delivery) was the payment method selected by the buyer and it is included
        /// as the <b>PaymentMethods</b> value in the same request.
        /// </param>
        ///
        /// <param name="SKU">
        /// The seller's unique identifier for an item that is being tracked by this
        /// SKU. If <b>OrderID</b> or <b>OrderLineItemID</b> are not provided, both <b>SKU</b> (or
        /// <b>ItemID</b>) and corresponding <b>TransactionID</b> must be provided to uniquely
        /// identify a single line item order. For a multiple line item (Combined Invoice) order, <b>OrderID</b> must be used.
        /// 
        /// 
        /// This field can only be used if the <b>Item.InventoryTrackingMethod</b> field
        /// (set with the <b>AddFixedPriceItem</b> or <b>RelistFixedPriceItem</b> calls) is set to
        /// SKU.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// A unique identifier for an eBay order line item. This field is created
        /// as soon as there is a commitment to buy from the seller, and its value
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs.
        /// 
        /// 
        /// Unless the <b>ItemID</b> (or <b>SKU</b>) and corresponding <b>TransactionID</b> is used to
        /// identify a single line item order, or the <b>OrderID</b> is used to identify a
        /// single or multiple line item (Combined Invoice) order, the
        /// <b>OrderLineItemID</b> must be specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should be used. If <b>OrderLineItemID</b> is specified,
        /// <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present in the same
        /// request.
        /// </param>
        ///
        /// <param name="AdjustmentAmount">
        /// This field allows the seller to adjust the total cost of the order to account
        /// for an extra charge or to pass down a discount to the buyer. 
        /// 
        /// The currency used in this field must be the same currency of the listing site.
        /// A positive value in this field indicates that the amount is an extra charge
        /// being paid to the seller by the buyer, and a negative value indicates that the
        /// amount is a discount given to the buyer by the seller. 
        /// </param>
        ///
        public void SendInvoice(string ItemID, string TransactionID, string OrderID, InternationalShippingServiceOptionsTypeCollection InternationalShippingServiceOptionsList, ShippingServiceOptionsTypeCollection ShippingServiceOptionsList, SalesTaxType SalesTax, InsuranceOptionCodeType InsuranceOption, AmountType InsuranceFee, BuyerPaymentMethodCodeTypeCollection PaymentMethodsList, string PayPalEmailAddress, string CheckoutInstructions, bool EmailCopyToSeller, AmountType CODCost, string SKU, string OrderLineItemID, AmountType AdjustmentAmount)
        {
            this.ItemID = ItemID;
            this.TransactionID = TransactionID;
            this.OrderID = OrderID;
            this.InternationalShippingServiceOptionsList = InternationalShippingServiceOptionsList;
            this.ShippingServiceOptionsList = ShippingServiceOptionsList;
            this.SalesTax = SalesTax;
            this.InsuranceOption = InsuranceOption;
            this.InsuranceFee = InsuranceFee;
            this.PaymentMethodsList = PaymentMethodsList;
            this.PayPalEmailAddress = PayPalEmailAddress;
            this.CheckoutInstructions = CheckoutInstructions;
            this.EmailCopyToSeller = EmailCopyToSeller;
            this.CODCost = CODCost;
            this.SKU = SKU;
            this.OrderLineItemID = OrderLineItemID;
            this.AdjustmentAmount = AdjustmentAmount;

            Execute();
        }
示例#9
0
        /// <summary>
        /// Enables a seller to send an order invoice to a buyer. Where applicable, updates to shipping, payment methods, and sales tax made in this request are applied to the specified order as a whole and to the individual order line items whose data are stored in individual <b>Transaction</b> objects.
        /// </summary>
        ///
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. Unless <b>OrderID</b> or
        /// <b>OrderLineItemID</b> is provided in the request, the <b>ItemID</b> (or <b>SKU</b>) is
        /// required and must be paired with the corresponding <b>TransactionID</b> to
        /// identify a single line item order. For a multiple line item (Combined
        /// Payment) order, <b>OrderID</b> should be used.
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Unique identifier for an eBay order line item (transaction). An order
        /// line item is created once there is a commitment from a buyer to purchase
        /// an item. Since an auction listing can only have one order line item
        /// during the duration of the listing, the <b>TransactionID</b> for
        /// auction listings is always 0. Unless <b>OrderID</b> or <b>OrderLineItemID</b> is
        /// provided in the request, the <b>TransactionID</b> is required and must be
        /// paired with the corresponding <b>ItemID</b> to identify a single line item
        /// order. For a multiple line item (Combined Payment) order, <b>OrderID</b> should
        /// be used.
        /// </param>
        ///
        /// <param name="OrderID">
        /// A unique identifier that identifies a single line item or multiple line
        /// item (Combined Payment) orders.
        ///
        /// For a single line item order, the <b>OrderID</b> value is identical to the
        /// <b>OrderLineItemID</b> value that is generated upon creation of the order line
        /// item. For a Combined Payment order, the <b>OrderID</b> value is created by eBay
        /// when the buyer or seller (sharing multiple, common order line items)
        /// combines multiple order line items into a Combined Payment order. A
        /// Combined Payment order can also be created by the seller through the
        /// <b>AddOrder</b> call.
        ///
        /// Unless the <b>ItemID</b> (or SKU) and corresponding <b>TransactionID</b>, or the
        /// <b>OrderLineItemID</b> is provided in the request to identify a single line
        /// item order, the <b>OrderID</b> must be specified. If <b>OrderID</b> is specified,
        /// <b>OrderLineItemID</b>, <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present
        /// in the same request.
        /// </param>
        ///
        /// <param name="InternationalShippingServiceOptionsList">
        /// If the buyer has an International shipping address, use this container
        /// to offer up to three International shipping services. If International
        /// shipping services are offered, (domestic) <b>ShippingServiceOptions</b> should
        /// not be included in the request.
        ///
        /// </param>
        ///
        /// <param name="ShippingServiceOptionsList">
        /// If the buyer has a domestic shipping address, use this container
        /// to offer up to three domestic shipping services. If domestic
        /// shipping services are offered, <b>InternationalShippingServiceOptions</b> should
        /// not be included in the request.
        ///
        /// </param>
        ///
        /// <param name="SalesTax">
        /// Container consisting of sales tax details. The amount of sales tax to
        /// add to the price of an order is dependent on the sales tax rate in the
        /// buyer's state and whether sales tax is being applied to the cost of the
        /// order only or the cost of the order plus shipping.
        /// </param>
        ///
        /// <param name="InsuranceOption">
        /// Specifies whether an insurance fee is required. An <b>InsuranceOption</b> value of
        /// <b>IncludedInShippingHandling</b> cannot be used if the item will use calculated
        /// shipping. Some shipping carriers automatically include shipping insurance
        /// for qualifying items.
        /// </param>
        ///
        /// <param name="InsuranceFee">
        /// Insurance cost, as set by seller, if ShippingType = 1.
        /// Specify if <b>InsuranceOption</b> is optional or required. Must
        /// be greater than zero value if a value of Optional or Required is passed in
        /// <b>InsuranceOption</b>. Value specified should be the total cost of insuring the
        /// item.
        /// </param>
        ///
        /// <param name="PaymentMethodsList">
        /// This optional field allows a US or German seller to add specific payment
        /// methods that were not in the original item listing. The only valid values
        /// for this field are 'PayPal' for a US listing, or
        /// 'MoneyXferAcceptedInCheckout' (CIP+) for a DE listing.
        /// </param>
        ///
        /// <param name="PayPalEmailAddress">
        /// If the <b>PaymentMethods</b> field is used and set to PayPal, the seller
        /// provides his/her PayPal email address in this field.
        /// </param>
        ///
        /// <param name="CheckoutInstructions">
        /// This field allows the seller to provide a message or instructions
        /// regarding checkout/payment or the return policy.
        /// </param>
        ///
        /// <param name="EmailCopyToSeller">
        /// Flag indicating whether or not the seller wishes to receive an email copy of
        /// the invoice sent to the buyer.
        /// </param>
        ///
        /// <param name="CODCost">
        /// This dollar value indicates the money due from the buyer upon delivery of the item.
        ///
        /// This field should only be specified in the <b>SendInvoice</b> request if 'COD'
        /// (cash-on-delivery) was the payment method selected by the buyer and it is included
        /// as the <b>PaymentMethods</b> value in the same request.
        /// </param>
        ///
        /// <param name="SKU">
        /// The seller's unique identifier for an item that is being tracked by this
        /// SKU. If <b>OrderID</b> or <b>OrderLineItemID</b> are not provided, both <b>SKU</b> (or
        /// <b>ItemID</b>) and corresponding <b>TransactionID</b> must be provided to uniquely
        /// identify a single line item order. For a multiple line item (Combined
        /// Payment) order, <b>OrderID</b> must be used.
        ///
        ///
        /// This field can only be used if the <b>Item.InventoryTrackingMethod</b> field
        /// (set with the <b>AddFixedPriceItem</b> or <b>RelistFixedPriceItem</b> calls) is set to
        /// SKU.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// A unique identifier for an eBay order line item. This field is created
        /// as soon as there is a commitment to buy from the seller, and its value
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs.
        ///
        ///
        /// Unless the <b>ItemID</b> (or <b>SKU</b>) and corresponding <b>TransactionID</b> is used to
        /// identify a single line item order, or the <b>OrderID</b> is used to identify a
        /// single or multiple line item (Combined Payment) order, the
        /// <b>OrderLineItemID</b> must be specified. For a multiple line item (Combined
        /// Payment) order, <b>OrderID</b> should be used. If <b>OrderLineItemID</b> is specified,
        /// <b>ItemID</b>, <b>TransactionID</b>, and <b>SKU</b> are ignored if present in the same
        /// request.
        /// </param>
        ///
        /// <param name="AdjustmentAmount">
        /// This field allows the seller to adjust the total cost of the order to account
        /// for an extra charge or to pass down a discount to the buyer.
        ///
        /// The currency used in this field must be the same currency of the listing site.
        /// A positive value in this field indicates that the amount is an extra charge
        /// being paid to the seller by the buyer, and a negative value indicates that the
        /// amount is a discount given to the buyer by the seller.
        /// </param>
        ///
        public void SendInvoice(string ItemID, string TransactionID, string OrderID, InternationalShippingServiceOptionsTypeCollection InternationalShippingServiceOptionsList, ShippingServiceOptionsTypeCollection ShippingServiceOptionsList, SalesTaxType SalesTax, InsuranceOptionCodeType InsuranceOption, AmountType InsuranceFee, BuyerPaymentMethodCodeTypeCollection PaymentMethodsList, string PayPalEmailAddress, string CheckoutInstructions, bool EmailCopyToSeller, AmountType CODCost, string SKU, string OrderLineItemID, AmountType AdjustmentAmount)
        {
            this.ItemID        = ItemID;
            this.TransactionID = TransactionID;
            this.OrderID       = OrderID;
            this.InternationalShippingServiceOptionsList = InternationalShippingServiceOptionsList;
            this.ShippingServiceOptionsList = ShippingServiceOptionsList;
            this.SalesTax             = SalesTax;
            this.InsuranceOption      = InsuranceOption;
            this.InsuranceFee         = InsuranceFee;
            this.PaymentMethodsList   = PaymentMethodsList;
            this.PayPalEmailAddress   = PayPalEmailAddress;
            this.CheckoutInstructions = CheckoutInstructions;
            this.EmailCopyToSeller    = EmailCopyToSeller;
            this.CODCost          = CODCost;
            this.SKU              = SKU;
            this.OrderLineItemID  = OrderLineItemID;
            this.AdjustmentAmount = AdjustmentAmount;

            Execute();
        }
示例#10
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol=new BuyerPaymentMethodCodeTypeCollection();
            foreach(ListItem li in cblPaymentMethod.Items)
            {
                if (li.Selected)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType),li.Value,false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType==BuyerPaymentMethodCodeType.PayPal && txtPaypalAccount.Text!=string.Empty)
                    {
                        item.PayPalEmailAddress=txtPaypalAccount.Text;
                    }
                }
            }

            item.PaymentMethods=paymentCol;
        }
示例#11
0
文件: FormMain.cs 项目: fudder/cs493
 private void UpdateCategoryFeatures()
 {
     string catid = this.cmbCategoryList.SelectedItem.ToString();
     listingType2DurationTable = CategoryFeatureManager.getListingType2DurationTable(catid);
     //pay methods
     defaultPayMethods = CategoryFeatureManager.getCatPaymentMethods(catid);
 }
示例#12
0
文件: FormMain.cs 项目: fudder/cs493
        //hard code some payment methods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentMethods=new BuyerPaymentMethodCodeTypeCollection();

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.PayPal))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
                item.PayPalEmailAddress="*****@*****.**";
            }

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.VisaMC))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.VisaMC);
            }

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.CashOnPickup))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.CashOnPickup);
            }

            item.PaymentMethods=paymentMethods;
        }
示例#13
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol = new BuyerPaymentMethodCodeTypeCollection();
            foreach (CheckBox cb in this.paymentMethodTableLayoutPanel.Controls)
            {
                if (cb.Checked)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType), cb.Name, false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType == BuyerPaymentMethodCodeType.PayPal && this.paypalEmailTextBox.Text != string.Empty)
                    {
                        item.PayPalEmailAddress = this.paypalEmailTextBox.Text;
                    }
                }
            }

            item.PaymentMethods = paymentCol ;
        }
示例#14
0
 public ItemService(string token)
     : base(token)
 {
     paymentOptions = new BuyerPaymentMethodCodeTypeCollection();
 }
示例#15
0
        //
        //sync category features
        //
        private void SyncCategoryFeatures()
        {
            Hashtable catsTable = this.siteFacade.GetAllCategoriesTable();

            Hashtable              cfsTable          = this.siteFacade.SiteCategoriesFeaturesTable[this.apiContext.Site] as Hashtable;
            SiteDefaultsType       siteDefaults      = this.siteFacade.SiteFeatureDefaultTable[this.apiContext.Site] as SiteDefaultsType;
            FeatureDefinitionsType featureDefinition = this.siteFacade.SiteFeatureDefinitionsTable[this.apiContext.Site] as FeatureDefinitionsType;


            CategoryFeatureType cf = cfsTable[this.CategoryID] as CategoryFeatureType;

            //get item SpecificsEnabled feature
            //workaround, if no CategoryFeature found, just use site defaults
            this.ItemSpecificEnabled = (cf == null) ? siteDefaults.ItemSpecificsEnabled : cf.ItemSpecificsEnabled;

            //get item ConditionEnabled feature
            //workaround, if Disabled, just check parent
            CategoryFeatureType conditionEnabledCategoryFeature = this.getConditionEnabledCategoryFeature(this.CategoryID, catsTable, cfsTable);

            if (conditionEnabledCategoryFeature != null)
            {
                this.conditionEnabled = conditionEnabledCategoryFeature.ConditionEnabled;
                this.conditionValues  = conditionEnabledCategoryFeature.ConditionValues;
            }
            else
            {
                this.conditionEnabled = siteDefaults.ConditionEnabled;
                this.conditionValues  = siteDefaults.ConditionValues;
            }
            if (cf != null && cf.ConditionValues != null)
            {
                this.conditionValues = cf.ConditionValues;
            }
            //this.conditionValues = (cf == null || cf.ConditionValues == null) ? siteDefaults.ConditionValues : cf.ConditionValues;

            //get returnPolicyEnabled feature
            //workaround, just use siteDefaults now
            //bool retPolicyEnabled = (cf == null)?siteDefaults.ReturnPolicyEnabled:cf.ReturnPolicyEnabled;
            this.ReturnPolicyEnabled = siteDefaults.ReturnPolicyEnabled;

            //listing types, recursively search
            ListingDurationReferenceTypeCollection listingTypes = getListingTypes(this.CategoryID, catsTable, cfsTable);

            if (listingTypes == null || listingTypes.Count == 0)//get site defaults
            {
                listingTypes = siteDefaults.ListingDuration;
            }
            //listing duration definitions
            ListingDurationDefinitionsType listingDurations = featureDefinition.ListingDurations;

            //get a mapping from listing type to duration
            this.ListingType2DurationMap = constructListingTypeDurationMapping(listingTypes, listingDurations);

            //payment methods
            BuyerPaymentMethodCodeTypeCollection paymentMethods = getPaymentMethods(this.CategoryID, catsTable, cfsTable);

            if (paymentMethods == null || paymentMethods.Count == 0)//get site defautls
            {
                paymentMethods = siteDefaults.PaymentMethod;
            }
            this.PaymentMethod = paymentMethods;
        }