Asp.net 交易明细中的贝宝数量错误

Asp.net 交易明细中的贝宝数量错误,asp.net,vb.net,paypal,Asp.net,Vb.net,Paypal,当用户从我的网站转到paypal页面时,订单显示: quantity 2 price 20$ Total 40$ 而在paypal账户的交易详情中显示的是: quantity 1 price 40$ total 40$ 我如何解决这个问题,在贝宝帐户数量2? 我正在使用Paypal api set express签出: Dim caller As New CallerServices Dim profile As IAPIProfile = ProfileFactory

当用户从我的网站转到paypal页面时,订单显示:

quantity 2
price 20$
Total 40$
而在paypal账户的交易详情中显示的是:

quantity 1
price 40$
total 40$
我如何解决这个问题,在贝宝帐户数量2? 我正在使用Paypal api set express签出:

   Dim caller As New CallerServices
        Dim profile As IAPIProfile = ProfileFactory.createSignatureAPIProfile()
        '
        '            WARNING: Do not embed plaintext credentials in your application code.
        '            Doing so is insecure and against best practices.
        '            Your API credentials must be handled securely. Please consider
        '            encrypting them for use in any production environment, and ensure
        '            that only authorized individuals may view or modify them.
        '            
        ' Set up your API credentials, PayPal end point, and API version.
        profile.APIUsername = AppSettings("APIUsername")
        profile.APIPassword = AppSettings("APIPassword")
        profile.APISignature = AppSettings("APISignature")
        profile.Environment = AppSettings("Environment")
        caller.APIProfile = profile
        ' Create the request object.
        Dim pp_request As New SetExpressCheckoutRequestType()
        pp_request.Version = AppSettings("APIVersion")
        ' Add request-specific fields to the request.
        ' Create the request details object.
        pp_request.SetExpressCheckoutRequestDetails = New SetExpressCheckoutRequestDetailsType()
        pp_request.SetExpressCheckoutRequestDetails.PaymentAction = paymentAction
        pp_request.SetExpressCheckoutRequestDetails.PageStyle = color
        'Enum for PaymentAction is  PaymentActionCodeType.Sale
        pp_request.SetExpressCheckoutRequestDetails.PaymentActionSpecified = True
        pp_request.SetExpressCheckoutRequestDetails.OrderDescription = type
        pp_request.SetExpressCheckoutRequestDetails.PaymentDetails = New PaymentDetailsType()
        pp_request.SetExpressCheckoutRequestDetails.PaymentDetails.Custom = DateTime.Now.ToLongTimeString
        Dim items(1) As PaymentDetailsItemType
        Dim item1 As PaymentDetailsItemType = New PaymentDetailsItemType
        item1.Name = dealName
        item1.Number = OfferID
        item1.Amount = New BasicAmountType()
        item1.Amount.Value = price

        item1.Amount.currencyID = currencyCodeType
        item1.Quantity = qnt
        items(0) = item1
        pp_request.SetExpressCheckoutRequestDetails.PaymentDetails.PaymentDetailsItem = items
        pp_request.SetExpressCheckoutRequestDetails.OrderTotal = New BasicAmountType()
        pp_request.SetExpressCheckoutRequestDetails.OrderTotal.currencyID = currencyCodeType
        'Enum for currency code is  CurrencyCodeType.USD
        pp_request.SetExpressCheckoutRequestDetails.OrderTotal.Value = paymentAmount
        pp_request.SetExpressCheckoutRequestDetails.CancelURL = cancelURL
        pp_request.SetExpressCheckoutRequestDetails.ReturnURL = returnURL
        '' Execute the API operation and obtain the response.
        Dim pp_response As New SetExpressCheckoutResponseType()
        pp_response = DirectCast(caller.[Call]("SetExpressCheckout", pp_request), SetExpressCheckoutResponseType)
        token = pp_response.Token
        resp = pp_response
        Return pp_response.Ack
    End Function

对于快速结帐,唯一公开可用的折扣选项是发货折扣,但您可以将负值项目作为折扣传递。我举了一个例子:

VERSION = 84.0
METHOD = SetExpressCheckout
RETURNURL = test/index.php?action=ECreturn
CANCELURL = test/index.php?action=ECcancel
PAYMENTREQUEST_0_AMT = 0.99
PAYMENTACTION = Sale
L_PAYMENTREQUEST_0_NAME0 = Test
L_PAYMENTREQUEST_0_DESC0 = Test
L_PAYMENTREQUEST_0_AMT0 = 1.00
L_PAYMENTREQUEST_0_NUMBER0 =11111
L_PAYMENTREQUEST_0_QTY1 =1
L_PAYMENTREQUEST_0_NAME1 = Discount item
L_PAYMENTREQUEST_0_DESC1 = DIscount
L_PAYMENTREQUEST_0_AMT1 = -0.01
L_PAYMENTREQUEST_0_NUMBER1 =22222
L_PAYMENTREQUEST_0_QTY1 =1

对于快速结帐,唯一公开可用的折扣选项是发货折扣,但您可以将负值项目作为折扣传递。我举了一个例子:

VERSION = 84.0
METHOD = SetExpressCheckout
RETURNURL = test/index.php?action=ECreturn
CANCELURL = test/index.php?action=ECcancel
PAYMENTREQUEST_0_AMT = 0.99
PAYMENTACTION = Sale
L_PAYMENTREQUEST_0_NAME0 = Test
L_PAYMENTREQUEST_0_DESC0 = Test
L_PAYMENTREQUEST_0_AMT0 = 1.00
L_PAYMENTREQUEST_0_NUMBER0 =11111
L_PAYMENTREQUEST_0_QTY1 =1
L_PAYMENTREQUEST_0_NAME1 = Discount item
L_PAYMENTREQUEST_0_DESC1 = DIscount
L_PAYMENTREQUEST_0_AMT1 = -0.01
L_PAYMENTREQUEST_0_NUMBER1 =22222
L_PAYMENTREQUEST_0_QTY1 =1

如何解决此问题?作为PaymentDetailSiteType的Dim items(1)不应该作为PaymentDetailSiteType的Dim items(0)吗?如何解决此问题?作为PaymentDetailSiteType的Dim items(1)不应该作为PaymentDetailSiteType的Dim items(0)吗?