2011-10-11 148 views
0

我無法在set express checkoput中設置項目摘要。 L_NAME0 = A引起的錯誤Paypal Setexpresscheckout項目描述Grails

 def strUsername = "***" 
     def strPassword = "***" 
     def strSignature = "***" 
     def strCredentials = "USER=" + strUsername + "&PWD=" + strPassword + "&SIGNATURE=" + strSignature 
     def strNVPSandboxServer = "https://api-3t.sandbox.paypal.com/nvp"; 

     def user = session.userId +","+amt + "," + receiver + "," + address + "," + opt 
     def successUrl = '*** 

     def cancelUrl = '***' 
     def strAPIVersion = "56.0" 
def strNVP = strCredentials + "&METHOD=SetExpressCheckout&AMT=" + totalamount +"&PAYMENTACTION=Sale&RETURNURL="+ successUrl+"&CANCELURL="+ cancelUrl +"&CURRENCYCODE=SGD&ITEMAMT="+totalamount+"&L_NAME0=OHN&VERSION=" + strAPIVersion 
+0

如何發送折扣爲setexpresscheckout API –

回答

0

嘗試更新高清strAPIVersion = 「56.0」 到變形點焊strAPIVersion = 「76.0」 我認爲在56版不具備的先進功能。我使用默認由貝寶設置爲測試 & L_PAYMENTREQUEST_0_NAME0 = 10%無咖啡因科納混合咖啡
& L_PAYMENTREQUEST_0_NUMBER0 = 623083
& L_PAYMENTREQUEST_0_DESC0 =大小:8.8盎司 & L_PAYMENTREQUEST_0_AMT0 = 9.95
& L_PAYMENTREQUEST_0_QTY0 = 2
& L_PAYMENTREQUEST_0_NAME1 =咖啡濾袋
& L_PAYMENTREQUEST_0_NUMBER1 = 623084
& L_PAYMENTREQUEST_0_DESC1 =大小:兩個24片盒
& L_PAYMENTREQUEST_0_AMT1 = 39.70
& L_PAYMENTREQUEST_0_QTY1 = 2
& PAYMENTREQUEST_0_ITEMAMT = 99.30
& PAYMENTREQUEST_0_TAXAMT = 2.58
& PAYMENTREQUEST_0_SHIPPINGAMT = 3.00
& PAYMENTREQUEST_0_HANDLINGAMT = 2.99
& PAYMENTREQUEST_0_SHIPDISCAMT = -3.00
& PAYMENTREQUEST_0_INSURANCEAMT = 1.00
& PAYMENTREQUEST_0_AMT = 105.87
& ALLOWNOTE = 1

+0

你寫在這裏只航運折扣行項目。如何使用折扣請幫助我 –