Ejemplo n.º 1
0
        public void AddPaymentOption(BuyerPaymentMethodCodeType method, string paypalEmailAddress = "")
        {
            paymentOptions.Add(method);

            if (method == BuyerPaymentMethodCodeType.PayPal)
            {
                Debug.Assert(!string.IsNullOrEmpty(paypalEmailAddress));
                item.PayPalEmailAddress = paypalEmailAddress;
            }
        }
Ejemplo n.º 2
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;
        }
        /// <summary>
        /// Enables a seller to update the payment details, the shipping details,
        /// and the status of an order.
        /// </summary>
        ///
        /// <param name="ItemID">
        /// Unique identifier for an eBay listing. A listing can have multiple order line items, but only one <b>ItemID</b>. An <b>ItemID</b> can be paired up with a corresponding <b>TransactionID</b> and used as an input filter for <b>ReviseCheckoutStatus</b>.  Unless an <b>OrderLineItemID</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>ItemID</b>/<b>TransactionID</b> pair must be specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b> should be used. If <b>OrderID</b> or <b>OrderLineItemID</b> are specified, the <b>ItemID</b>/<b>TransactionID</b> pair is ignored if present in the same request.
        /// <br/>
        /// <br/>
        /// It is also possible to identify a single line item order with a
        /// <b>ItemID</b>/<b>BuyerID</b> combination, but this is not the most ideal approach since an error is returned if there are multiple order line items for that combination.
        /// <br/>
        /// </param>
        ///
        /// <param name="TransactionID">
        /// Unique identifier for an eBay order line item. 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 <code>0</code>. Along with its corresponding <b>ItemID</b>, a
        /// <b>TransactionID</b> is used and referenced during an order checkout flow and
        /// after checkout has been completed. The <b>ItemID</b>/<b>TransactionID</b> pair can be
        /// used as an input filter for <b>ReviseCheckoutStatus</b>.
        ///
        /// Unless an <b>OrderLineItemID</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>ItemID</b>/<b>TransactionID</b> pair must be
        /// specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b>
        /// must be used. If <b>OrderID</b> or <b>OrderLineItemID</b> are specified, the
        /// <b>ItemID</b>/<b>TransactionID</b> pair is ignored if present in the same request.
        ///
        /// </param>
        ///
        /// <param name="OrderID">
        /// A unique identifier that identifies a single line item or multiple line
        /// item (Combined Invoice) order.
        ///
        /// 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 through
        /// the eBay site. A Combined Invoice order can also be created by the
        /// seller through the <b>AddOrder</b> call. The <b>OrderID</b> can be used as an input
        /// filter for <b>ReviseCheckoutStatus</b>.
        ///
        /// <b>OrderID</b> overrides an <b>OrderLineItemID</b> or <b>ItemID</b>/<b>TransactionID</b> pair if
        /// these fields are also specified in the same request.
        /// </param>
        ///
        /// <param name="AmountPaid">
        /// The total amount paid by the buyer. For a US eBay Motors item,
        /// <b>AmountPaid</b> is the total amount paid by the buyer for the deposit.
        /// <b>AmountPaid</b> is optional if <b>CheckoutStatus</b> is Incomplete and required if it
        /// is Complete.
        /// </param>
        ///
        /// <param name="PaymentMethodUsed">
        /// Payment method used by the buyer. This field is required if <b>
        /// CheckoutStatus</b> is Complete and the payment method is a trusted
        /// payment method other than PayPal. See eBay's
        /// <a href="http://pages.ebay.com/help/policies/accepted-payments-policy.html">Accepted Payments Policy</a>.
        /// If the payment method is PayPal, this field should not be used since only PayPal can set this field's
        /// value to "PayPal". ReviseCheckoutStatus cannot be used for a non-trusted
        /// payment method.
        /// <b>Note:</b>Required or allowed payment methods vary by site and category.
        /// </param>
        ///
        /// <param name="CheckoutStatus">
        /// This field is included and its value is set to <code>Complete</code> if the seller is using the <b>ReviseCheckoutStatus</b> call to mark the order as 'Paid' by including the <b>PaymentStatus</b> field and setting its value to <code>Paid</code>.
        /// </param>
        ///
        /// <param name="ShippingService">
        /// The shipping service selected by the buyer from among the shipping services offered by the seller (such as UPS Ground). For a list of valid values, call GeteBayDetails with DetailName set to ShippingServiceDetails. The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing. <br/><br/> <span class="tablenote"> <strong>Note:</strong> <strong>ReviseCheckoutStatus</strong> is not available for the Global Shipping program; specifying <code>InternationalPriorityShipping</code> as a value for this field will produce an error. </span>
        /// </param>
        ///
        /// <param name="ShippingIncludedInTax">
        /// An indicator of whether shipping costs were included in the
        /// taxable amount.
        /// </param>
        ///
        /// <param name="CheckoutMethod">
        /// This field is deprecated.
        /// </param>
        ///
        /// <param name="InsuranceType">
        /// This field is no longer applicable as it is not longer possible for a seller to offer a buyer shipping insurance.
        /// </param>
        ///
        /// <param name="PaymentStatus">
        /// This field is used to mark the order as paid or awaiting payment in My eBay. If you specify 'Paid', My eBay displays an icon for each line item in the order to indicate that the order status is Paid. If you specify 'Pending', this indicates that the order is awaiting payment (some applications may use 'Pending' when the buyer has paid, but the funds have not yet been sent to the seller's financial institution).
        ///
        ///
        /// <b>ReviseCheckoutStatus</b> cannot be used to update payment and checkout
        /// status for a non-trusted payment method. See eBay's <a href="
        /// http://pages.ebay.com/help/policies/accepted-payments-policy.html">
        /// Accepted Payments Policy</a> for more information on trusted
        /// payment methods. If the payment method is PayPal, this field should not
        /// be used since PayPal automatically set this field's value to "Paid" upon
        /// receiving the buyer's payment.
        /// </param>
        ///
        /// <param name="AdjustmentAmount">
        /// Discount or charge agreed to by the buyer and seller. A positive value
        /// indicates that the amount is an extra charge being paid to the seller by
        /// the buyer. A negative value indicates that the amount is a discount given
        /// to the buyer by the seller.
        /// </param>
        ///
        /// <param name="ShippingAddress">
        /// For internal use only. Do not use.
        /// </param>
        ///
        /// <param name="BuyerID">
        /// eBay user ID for the order's buyer. A single line item order can
        /// actually be identified by a <b>BuyerID</b>/<b>ItemID</b> pair, but this approach is
        /// not recommended since an error is returned if there are multiple
        /// order line items for that combination. <b>BuyerID</b> is ignored if any other valid
        /// filter or filter combination is used in the same request.
        /// </param>
        ///
        /// <param name="ShippingInsuranceCost">
        /// This field is no longer applicable as it is not longer possible for a seller to offer a buyer shipping insurance.
        /// </param>
        ///
        /// <param name="SalesTax">
        /// The sales tax amount for the order. This field should be used if sales tax
        /// was applied to the order.
        /// </param>
        ///
        /// <param name="ShippingCost">
        /// Amount of money paid for shipping.
        /// </param>
        ///
        /// <param name="EncryptedID">
        /// Not supported.
        /// </param>
        ///
        /// <param name="ExternalTransaction">
        /// This container is used if payment for the order occurred off of eBay, and the seller wants to pass in the external payment reference ID.
        /// </param>
        ///
        /// <param name="MultipleSellerPaymentID">
        /// Not supported.
        /// </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>ReviseCheckoutStatus</b> request if 'COD' (cash-on-delivery) was the payment method selected by the buyer and it is included as the <b>PaymentMethodUsed</b> value in the same request.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// <b>OrderLineItemID</b> is a unique identifier for an eBay order line item and
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs. For a single line item order, the
        /// <b>OrderLineItemID</b> value can be passed into the <b>OrderID</b> field to revise the
        /// checkout status of the order.
        ///
        /// Unless an <b>ItemID</b>/<b>TransactionID</b> pair 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, the <b>ItemID</b>/<b>TransactionID</b> pair are ignored if present in the same request.
        /// </param>
        ///
        public void ReviseCheckoutStatus(string ItemID, string TransactionID, string OrderID, AmountType AmountPaid, BuyerPaymentMethodCodeType PaymentMethodUsed, CompleteStatusCodeType CheckoutStatus, string ShippingService, bool ShippingIncludedInTax, CheckoutMethodCodeType CheckoutMethod, InsuranceSelectedCodeType InsuranceType, RCSPaymentStatusCodeType PaymentStatus, AmountType AdjustmentAmount, AddressType ShippingAddress, string BuyerID, AmountType ShippingInsuranceCost, AmountType SalesTax, AmountType ShippingCost, string EncryptedID, ExternalTransactionType ExternalTransaction, string MultipleSellerPaymentID, AmountType CODCost, string OrderLineItemID)
        {
            this.ItemID                  = ItemID;
            this.TransactionID           = TransactionID;
            this.OrderID                 = OrderID;
            this.AmountPaid              = AmountPaid;
            this.PaymentMethodUsed       = PaymentMethodUsed;
            this.CheckoutStatus          = CheckoutStatus;
            this.ShippingService         = ShippingService;
            this.ShippingIncludedInTax   = ShippingIncludedInTax;
            this.CheckoutMethod          = CheckoutMethod;
            this.InsuranceType           = InsuranceType;
            this.PaymentStatus           = PaymentStatus;
            this.AdjustmentAmount        = AdjustmentAmount;
            this.ShippingAddress         = ShippingAddress;
            this.BuyerID                 = BuyerID;
            this.ShippingInsuranceCost   = ShippingInsuranceCost;
            this.SalesTax                = SalesTax;
            this.ShippingCost            = ShippingCost;
            this.EncryptedID             = EncryptedID;
            this.ExternalTransaction     = ExternalTransaction;
            this.MultipleSellerPaymentID = MultipleSellerPaymentID;
            this.CODCost                 = CODCost;
            this.OrderLineItemID         = OrderLineItemID;

            Execute();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Enables a seller can use this call to update the payment details, the shipping details,
        /// and the status of an order.
        /// </summary>
        /// 
        /// <param name="ItemID">
        /// Unique identifier for an eBay item listing. A listing can have multiple
        /// order line items (transactions), but only one <b>ItemID</b>. An <b>ItemID</b> can be
        /// paired up with a corresponding <b>TransactionID</b> and used as an input filter
        /// for <b>ReviseCheckoutStatus</b>.
        /// 
        /// Unless an <b>OrderLineItemID</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>ItemID</b>/<b>TransactionID</b> pair must be
        /// specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b>
        /// should be used. If <b>OrderID</b> or <b>OrderLineItemID</b> are specified, the
        /// <b>ItemID</b>/<b>TransactionID</b> pair is ignored if present in the same request.
        /// <br />
        /// <br />
        /// It is also possible to identify a single line item order with a
        /// <b>ItemID</b>/<b>BuyerID</b> combination, but this is not the most ideal
        /// approach since an error is returned if there are multiple
        /// order line items for that combination.
        /// </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. Along with its corresponding <b>ItemID</b>, a
        /// <b>TransactionID</b> is used and referenced during an order checkout flow and
        /// after checkout has been completed. The <b>ItemID</b>/<b>TransactionID</b> pair can be
        /// used as an input filter for <b>ReviseCheckoutStatus</b>.
        /// 
        /// Unless an <b>OrderLineItemID</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>ItemID</b>/<b>TransactionID</b> pair must be
        /// specified. For a multiple line item (Combined Invoice) order, <b>OrderID</b>
        /// must be used. If <b>OrderID</b> or <b>OrderLineItemID</b> are specified, the
        /// <b>ItemID</b>/<b>TransactionID</b> pair is ignored if present in the same request.
        /// </param>
        ///
        /// <param name="OrderID">
        /// A unique identifier that identifies a single line item or multiple line
        /// item (Combined Invoice) order.
        /// 
        /// 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 through
        /// the eBay site. A Combined Invoice order can also be created by the
        /// seller through the <b>AddOrder</b> call. The <b>OrderID</b> can be used as an input
        /// filter for <b>ReviseCheckoutStatus</b>.
        /// 
        /// <b>OrderID</b> overrides an <b>OrderLineItemID</b> or <b>ItemID</b>/<b>TransactionID</b> pair if
        /// these fields are also specified in the same request.
        /// </param>
        ///
        /// <param name="AmountPaid">
        /// The total amount paid by the buyer. For a motor vehicle purchased on eBay Motors,
        /// <b>AmountPaid</b> is the total amount paid by the buyer for the deposit.
        /// <b>AmountPaid</b> is optional if <b>CheckoutStatus</b> is Incomplete and required if it
        /// is Complete.
        /// </param>
        ///
        /// <param name="PaymentMethodUsed">
        /// Payment method used by the buyer. This field is required if <b>
        /// CheckoutStatus</b> is Complete and the payment method is a trusted
        /// payment method other than PayPal. See eBay's
        /// <a href="http://pages.ebay.com/help/policies/accepted-payments-policy.html">Accepted Payments Policy</a>.
        /// If the payment method is PayPal, this field should not be used since only PayPal can set this field's
        /// value to "PayPal". ReviseCheckoutStatus cannot be used for a non-trusted
        /// payment method.
        /// <b>Note:</b>Required or allowed payment methods vary by site and category.
        /// </param>
        ///
        /// <param name="CheckoutStatus">
        /// The current checkout status of the order. Often, the seller or
        /// application will mark this value as 'Complete' if payment has been made. 
        /// </param>
        ///
        /// <param name="ShippingService">
        /// The shipping service selected by the buyer from among the shipping services
        /// offered by the seller (such as UPS Ground). For a list of valid values, call
        /// GeteBayDetails with DetailName set to ShippingServiceDetails. The
        /// ShippingServiceDetails.ValidForSellingFlow flag must also be present.
        /// Otherwise, that particular shipping service option is no longer valid and
        /// cannot be offered to buyers through a listing.
        /// <br/><br/>
        /// <span class="tablenote">
        /// <strong>Note:</strong> <strong>ReviseCheckoutStatus</strong> is not available for the Global Shipping program; specifying InternationalPriorityShipping as a value for this field will produce an error.
        /// </span>
        /// </param>
        ///
        /// <param name="ShippingIncludedInTax">
        /// An indicator of whether shipping costs were included in the
        /// taxable amount. .
        /// </param>
        ///
        /// <param name="CheckoutMethod">
        /// </param>
        ///
        /// <param name="InsuranceType">
        /// Enumeration value that indicates whether shipping insurance was offered to and
        /// selected by the buyer.
        /// </param>
        ///
        /// <param name="PaymentStatus">
        /// This field is used to mark the order as paid or awaiting payment in My eBay. If you specify 'Paid', My eBay displays an icon for each line item in the order to indicate that the order status is Paid. If you specify 'Pending', this indicates that the order is awaiting payment (some applications may use 'Pending' when the buyer has paid, but the funds have not yet been sent to the seller's financial institution).
        /// 
        /// 
        /// <b>ReviseCheckoutStatus</b> cannot be used to update payment and checkout
        /// status for a non-trusted payment method. See eBay's <a href="
        /// http://pages.ebay.com/help/policies/accepted-payments-policy.html">
        /// Accepted Payments Policy</a> for more information on trusted
        /// payment methods. If the payment method is PayPal, this field should not
        /// be used since PayPal automatically set this field's value to "Paid" upon
        /// receiving the buyer's payment.
        /// </param>
        ///
        /// <param name="AdjustmentAmount">
        /// Discount or charge agreed to by the buyer and seller. A positive value
        /// indicates that the amount is an extra charge being paid to the seller by
        /// the buyer. A negative value indicates that the amount is a discount given
        /// to the buyer by the seller.
        /// </param>
        ///
        /// <param name="ShippingAddress">
        /// For internal use.
        /// </param>
        ///
        /// <param name="BuyerID">
        /// eBay user ID for the order's buyer. A single line item order can
        /// actually be identified by a <b>BuyerID</b>/<b>ItemID</b> pair, but this approach is
        /// not recommended since an error is returned if there are multiple
        /// order line items for that combination. <b>BuyerID</b> is ignored if any other valid
        /// filter or filter combination is used in the same request.
        /// </param>
        ///
        /// <param name="ShippingInsuranceCost">
        /// The amount of money paid for shipping insurance.
        /// </param>
        ///
        /// <param name="SalesTax">
        /// The sales tax amount for the order. This field should be used if sales tax
        /// was applied to the order.
        /// </param>
        ///
        /// <param name="ShippingCost">
        /// The amount of money paid for shipping.
        /// </param>
        ///
        /// <param name="EncryptedID">
        /// Not supported.
        /// </param>
        ///
        /// <param name="ExternalTransaction">
        /// This container is used to identify the electronic payment (other than Paypal) of an order. 
        /// </param>
        ///
        /// <param name="MultipleSellerPaymentID">
        /// Not supported.
        /// </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>ReviseCheckoutStatus</b>
        /// request if 'COD' (cash-on-delivery) was the payment method selected by the buyer
        /// and it is included as the <b>PaymentMethodUsed</b> value in the same
        /// request.
        /// </param>
        ///
        /// <param name="OrderLineItemID">
        /// <b>OrderLineItemID</b> is a unique identifier for an eBay order line item and
        /// is based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a
        /// hyphen in between these two IDs. For a single line item order, the
        /// <b>OrderLineItemID</b> value can be passed into the <b>OrderID</b> field to revise the
        /// checkout status of the order.
        /// 
        /// Unless an <b>ItemID</b>/<b>TransactionID</b> pair 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, the <b>ItemID</b>/<b>TransactionID</b> pair are
        /// ignored if present in the same request.
        /// </param>
        ///
        public void ReviseCheckoutStatus(string ItemID, string TransactionID, string OrderID, AmountType AmountPaid, BuyerPaymentMethodCodeType PaymentMethodUsed, CompleteStatusCodeType CheckoutStatus, string ShippingService, bool ShippingIncludedInTax, CheckoutMethodCodeType CheckoutMethod, InsuranceSelectedCodeType InsuranceType, RCSPaymentStatusCodeType PaymentStatus, AmountType AdjustmentAmount, AddressType ShippingAddress, string BuyerID, AmountType ShippingInsuranceCost, AmountType SalesTax, AmountType ShippingCost, string EncryptedID, ExternalTransactionType ExternalTransaction, string MultipleSellerPaymentID, AmountType CODCost, string OrderLineItemID)
        {
            this.ItemID = ItemID;
            this.TransactionID = TransactionID;
            this.OrderID = OrderID;
            this.AmountPaid = AmountPaid;
            this.PaymentMethodUsed = PaymentMethodUsed;
            this.CheckoutStatus = CheckoutStatus;
            this.ShippingService = ShippingService;
            this.ShippingIncludedInTax = ShippingIncludedInTax;
            this.CheckoutMethod = CheckoutMethod;
            this.InsuranceType = InsuranceType;
            this.PaymentStatus = PaymentStatus;
            this.AdjustmentAmount = AdjustmentAmount;
            this.ShippingAddress = ShippingAddress;
            this.BuyerID = BuyerID;
            this.ShippingInsuranceCost = ShippingInsuranceCost;
            this.SalesTax = SalesTax;
            this.ShippingCost = ShippingCost;
            this.EncryptedID = EncryptedID;
            this.ExternalTransaction = ExternalTransaction;
            this.MultipleSellerPaymentID = MultipleSellerPaymentID;
            this.CODCost = CODCost;
            this.OrderLineItemID = OrderLineItemID;

            Execute();
        }
        /// <summary>
        ///
        /// </summary>
        public PaymentOptionDetailsType getPaymentOptionDetailsBySiteAndPaymentMethod(SiteCodeType site, BuyerPaymentMethodCodeType paymentMethod)
        {
            Hashtable detailsMap = (Hashtable)_SiteRelatedDetailsMapsByName[DetailNameCodeType.PaymentOptionDetails];

            if (!detailsMap.ContainsKey(site))
            {
                loadPaymentOptionsDetailsForSite(site);
            }
            Hashtable byPaymentMethodMap = (Hashtable)detailsMap[site];

            return((PaymentOptionDetailsType)byPaymentMethodMap[paymentMethod]);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 public PaymentOptionDetailsType getPaymentOptionDetailsBySiteAndPaymentMethod(SiteCodeType site, BuyerPaymentMethodCodeType paymentMethod)
 {
     Hashtable detailsMap = (Hashtable)_SiteRelatedDetailsMapsByName[DetailNameCodeType.PaymentOptionDetails];
     if(!detailsMap.ContainsKey(site))
     {
     loadPaymentOptionsDetailsForSite(site);
     }
     Hashtable byPaymentMethodMap = (Hashtable)detailsMap[site];
     return (PaymentOptionDetailsType)byPaymentMethodMap[paymentMethod];
 }
Ejemplo n.º 7
0
        private void AddItem()
        {
            AddFixedPriceItemRequestType req = new AddFixedPriceItemRequestType();

            req.Version = "927";
            ItemType item = new ItemType
            {
                ConditionID          = 1000,
                ConditionIDSpecified = true,
                Country                 = CountryCodeType.US,
                Currency                = CurrencyCodeType.USD,
                PostalCode              = "10007",
                Location                = "New York, NY",
                LocalListingSpecified   = true,
                InventoryTrackingMethod = InventoryTrackingMethodCodeType.SKU,
                //SKU = "PROD1234",
                Description              = "Pokemon Door Handle - gotta open em all",
                Title                    = "Pokemon stuffs",
                SubTitle                 = "Test Item",
                ListingDuration          = "Days_7",
                PaymentMethods           = new BuyerPaymentMethodCodeType[1],
                DispatchTimeMax          = 3,
                DispatchTimeMaxSpecified = true,
                Site          = SiteCodeType.US,
                SiteSpecified = true
            };

            //set the item condition depending on the value from GetCategoryFeatures
            //new

            //Basic properties of a listing

            //Track item by SKU#

            item.StartPrice = new AmountType()
            {
                currencyID = CurrencyCodeType.USD, Value = 20.00
            };


            BuyerPaymentMethodCodeType[] payments = new BuyerPaymentMethodCodeType[1];
            payments[0]             = BuyerPaymentMethodCodeType.PayPal;
            item.PaymentMethods     = payments;
            item.PayPalEmailAddress = "*****@*****.**";


            item.Country           = CountryCodeType.US;
            item.CountrySpecified  = true;
            item.Currency          = CurrencyCodeType.USD;
            item.CurrencySpecified = true;

            //Specify Shipping Services
            item.DispatchTimeMax = 3;
            item.ShippingDetails = new ShippingDetailsType();
            ShippingServiceOptionsType[] shipping = new ShippingServiceOptionsType[2];
            shipping[0] = new ShippingServiceOptionsType();
            item.ShippingDetails.ShippingServiceOptions = shipping;

            ShippingServiceOptionsType shipservice1 = new ShippingServiceOptionsType();

            shipservice1.ShippingService                = "ShippingMethodStandard";
            shipservice1.ShippingServicePriority        = 1;
            shipservice1.ShippingServiceCost            = new AmountType();
            shipservice1.ShippingServiceCost.currencyID = CurrencyCodeType.USD;
            shipservice1.ShippingServiceCost.Value      = 1.0;
            shipservice1.ShippingTimeMin                = 2;
            shipservice1.ShippingTimeMinSpecified       = true;

            shipservice1.ShippingServiceAdditionalCost            = new AmountType();
            shipservice1.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD;
            shipservice1.ShippingServiceAdditionalCost.Value      = 1.0;

            item.ShippingDetails.ShippingServiceOptions[0] = shipservice1;

            ShippingServiceOptionsType shipservice2 = new ShippingServiceOptionsType();

            shipservice2.ShippingService                = "AU_Express";
            shipservice2.ShippingServicePriority        = 2;
            shipservice2.ShippingServiceCost            = new AmountType();
            shipservice2.ShippingServiceCost.currencyID = CurrencyCodeType.USD;
            shipservice2.ShippingServiceCost.Value      = 4.0;

            shipservice2.ShippingServiceAdditionalCost            = new AmountType();
            shipservice2.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD;
            shipservice2.ShippingServiceAdditionalCost.Value      = 1.0;

            //item.ShippingDetails.ShippingServiceOptions[1] = shipservice2;

            //Specify Return Policy
            item.ReturnPolicy = new ReturnPolicyType();
            item.ReturnPolicy.ReturnsAcceptedOption = "ReturnsAccepted";

            item.Quantity              = 10;
            item.StartPrice            = new AmountType();
            item.StartPrice.currencyID = CurrencyCodeType.USD;
            item.StartPrice.Value      = 10.00;


            item.PrimaryCategory            = new CategoryType();
            item.PrimaryCategory.CategoryID = "156955";

            item.ProductListingDetails = new ProductListingDetailsType();

            //Specifying UPC as the product identifier. Other applicable product identifiers
            //include ISBN, EAN, Brand-MPN.

            item.ProductListingDetails.UPC = "753759090913";

            //If multiple product identifiers are specified, eBay uses the first one that
            //matches a product in eBay's catalog system.
            item.ProductListingDetails.BrandMPN       = new BrandMPNType();
            item.ProductListingDetails.BrandMPN.Brand = "Marvel";
            item.ProductListingDetails.BrandMPN.MPN   = "Unknown";

            //For listing to be pre-filled with product information from the catalog
            item.ProductListingDetails.IncludePrefilledItemInformation = true;

            //Include the eBay stock photo with the listing if available and use it as the gallery picture
            item.ProductListingDetails.IncludeStockPhotoURL               = true;
            item.ProductListingDetails.UseStockPhotoURLAsGallery          = true;
            item.ProductListingDetails.UseStockPhotoURLAsGallerySpecified = true;

            //If multiple prod matches found, list the item with the 1st product's information
            item.ProductListingDetails.UseFirstProduct = true;
            // List the item even if no product match found
            //item.ProductListingDetails.ListIfNoProduct = true;

            //Add pictures
            item.PictureDetails = new PictureDetailsType();

            //Specify GalleryType
            item.PictureDetails.GalleryType          = GalleryTypeCodeType.None;
            item.PictureDetails.GalleryTypeSpecified = true;
            req.Item = item;


            Service.Sales.ProductManagement.AddListing(req);
        }
Ejemplo n.º 8
0
        private void AddItem()
        {
            AddFixedPriceItemRequestType req = new AddFixedPriceItemRequestType();
            req.Version = "927";
            ItemType item = new ItemType
            {
                ConditionID = 1000,
                ConditionIDSpecified = true,
                Country = CountryCodeType.US,
                Currency = CurrencyCodeType.USD,
                PostalCode = "10007",
                Location = "New York, NY",
                LocalListingSpecified = true,
                InventoryTrackingMethod = InventoryTrackingMethodCodeType.SKU,
                //SKU = "PROD1234",
                Description = "Pokemon Door Handle - gotta open em all",
                Title = "Pokemon stuffs",
                SubTitle = "Test Item",
                ListingDuration = "Days_7",
                PaymentMethods = new BuyerPaymentMethodCodeType[1],
                DispatchTimeMax = 3,
                DispatchTimeMaxSpecified = true,
                Site = SiteCodeType.US,
                SiteSpecified = true
            };
            //set the item condition depending on the value from GetCategoryFeatures
            //new

            //Basic properties of a listing

            //Track item by SKU#

            item.StartPrice = new AmountType() {  currencyID = CurrencyCodeType.USD, Value = 20.00};

            BuyerPaymentMethodCodeType[] payments = new BuyerPaymentMethodCodeType[1];
            payments[0] = BuyerPaymentMethodCodeType.PayPal;
            item.PaymentMethods = payments;
            item.PayPalEmailAddress = "*****@*****.**";

            item.Country = CountryCodeType.US;
            item.CountrySpecified = true;
            item.Currency = CurrencyCodeType.USD;
            item.CurrencySpecified = true;

            //Specify Shipping Services
            item.DispatchTimeMax = 3;
            item.ShippingDetails = new ShippingDetailsType();
            ShippingServiceOptionsType[] shipping = new ShippingServiceOptionsType[2];
            shipping[0] = new ShippingServiceOptionsType();
            item.ShippingDetails.ShippingServiceOptions =shipping;

            ShippingServiceOptionsType shipservice1 = new ShippingServiceOptionsType();
            shipservice1.ShippingService = "ShippingMethodStandard";
            shipservice1.ShippingServicePriority = 1;
            shipservice1.ShippingServiceCost = new AmountType();
            shipservice1.ShippingServiceCost.currencyID = CurrencyCodeType.USD;
            shipservice1.ShippingServiceCost.Value = 1.0;
            shipservice1.ShippingTimeMin = 2;
            shipservice1.ShippingTimeMinSpecified = true;

            shipservice1.ShippingServiceAdditionalCost = new AmountType();
            shipservice1.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD;
            shipservice1.ShippingServiceAdditionalCost.Value = 1.0;

            item.ShippingDetails.ShippingServiceOptions[0] = shipservice1;

            ShippingServiceOptionsType shipservice2 = new ShippingServiceOptionsType();
            shipservice2.ShippingService = "AU_Express";
            shipservice2.ShippingServicePriority = 2;
            shipservice2.ShippingServiceCost = new AmountType();
            shipservice2.ShippingServiceCost.currencyID = CurrencyCodeType.USD;
            shipservice2.ShippingServiceCost.Value = 4.0;

            shipservice2.ShippingServiceAdditionalCost = new AmountType();
            shipservice2.ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD;
            shipservice2.ShippingServiceAdditionalCost.Value = 1.0;

            //item.ShippingDetails.ShippingServiceOptions[1] = shipservice2;

            //Specify Return Policy
            item.ReturnPolicy = new ReturnPolicyType();
            item.ReturnPolicy.ReturnsAcceptedOption = "ReturnsAccepted";

            item.Quantity = 10;
            item.StartPrice = new AmountType();
            item.StartPrice.currencyID = CurrencyCodeType.USD;
            item.StartPrice.Value = 10.00;

            item.PrimaryCategory = new CategoryType();
            item.PrimaryCategory.CategoryID = "156955";

            item.ProductListingDetails = new ProductListingDetailsType();

            //Specifying UPC as the product identifier. Other applicable product identifiers
            //include ISBN, EAN, Brand-MPN.

            item.ProductListingDetails.UPC = "753759090913";

            //If multiple product identifiers are specified, eBay uses the first one that
            //matches a product in eBay's catalog system.
            item.ProductListingDetails.BrandMPN = new BrandMPNType();
            item.ProductListingDetails.BrandMPN.Brand = "Marvel";
            item.ProductListingDetails.BrandMPN.MPN = "Unknown";

            //For listing to be pre-filled with product information from the catalog
            item.ProductListingDetails.IncludePrefilledItemInformation = true;

            //Include the eBay stock photo with the listing if available and use it as the gallery picture
            item.ProductListingDetails.IncludeStockPhotoURL = true;
            item.ProductListingDetails.UseStockPhotoURLAsGallery = true;
            item.ProductListingDetails.UseStockPhotoURLAsGallerySpecified = true;

            //If multiple prod matches found, list the item with the 1st product's information
            item.ProductListingDetails.UseFirstProduct = true;
            // List the item even if no product match found
            //item.ProductListingDetails.ListIfNoProduct = true;

            //Add pictures
            item.PictureDetails = new PictureDetailsType();

            //Specify GalleryType
            item.PictureDetails.GalleryType = GalleryTypeCodeType.None;
            item.PictureDetails.GalleryTypeSpecified = true;
            req.Item = item;

            Service.Sales.ProductManagement.AddListing(req);
        }