コード例 #1
0
 /// <summary>
 /// Gets the single external transaction.
 /// </summary>
 /// <param name="transaction">The transaction.</param>
 /// <returns></returns>
 private EbayExternalTransaction GetSingleExternalTransaction(ExternalTransactionType transaction)
 {
     return(new EbayExternalTransaction {
         TransactionID = transaction.ExternalTransactionID,
         TransactionTime = transaction.ExternalTransactionTimeSpecified ? transaction.ExternalTransactionTime : (DateTime?)null,
         FeeOrCreditPrice = transaction.FeeOrCreditAmount.Value,
         FeeOrCreditCurrency = transaction.FeeOrCreditAmount.currencyID.ToString(),
         PaymentOrRefundAPrice = transaction.PaymentOrRefundAmount.Value,
         PaymentOrRefundACurrency = transaction.PaymentOrRefundAmount.currencyID.ToString()
     });
 }
コード例 #2
0
        /// <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();
        }
コード例 #3
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();
        }
コード例 #4
0
ファイル: GetOrder.cs プロジェクト: linjiajianyuan/marketsln
 private static EbayOrderPaymentTransactionType AddOrderPaymentTransaction(string orderID, ExternalTransactionType externalTransactionType)
 {
     EbayOrderPaymentTransactionType ebayOrderPaymentTransactionType = new EbayOrderPaymentTransactionType();
     ebayOrderPaymentTransactionType.OrderID = orderID;
     ebayOrderPaymentTransactionType.ExternalTransactionID = externalTransactionType.ExternalTransactionID.ToString();
     ebayOrderPaymentTransactionType.ExternalTransactionStatus = externalTransactionType.ExternalTransactionStatus.ToString();
     if (externalTransactionType.ExternalTransactionTime.ToLocalTime() <= ConvertUtility.ToDateTime("1901-01-01 00:00:00"))
     {
         ebayOrderPaymentTransactionType.ExternalTransactionTime = (DateTime)SqlDateTime.MinValue;
     }
     else
     {
         ebayOrderPaymentTransactionType.ExternalTransactionTime = externalTransactionType.ExternalTransactionTime.ToLocalTime();
     }
     ebayOrderPaymentTransactionType.FeeOrCreditAmount = externalTransactionType.FeeOrCreditAmount == null ? 0 : externalTransactionType.FeeOrCreditAmount.Value;
     ebayOrderPaymentTransactionType.PaymentOrRefundAmount = externalTransactionType.PaymentOrRefundAmount == null ? 0 : externalTransactionType.PaymentOrRefundAmount.Value;
     ebayOrderPaymentTransactionType.EnterDate = System.DateTime.Now;
     ebayOrderPaymentTransactionType.UpdateDate = System.DateTime.Now;
     return ebayOrderPaymentTransactionType;
 }