Paypal Setexpresscheckout ItemDescription Grails

时间:2011-10-11 16:15:38

标签: grails paypal

我无法在set express checkoput中设置项目摘要。 L_NAME0 =导致错误

        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

1 个答案:

答案 0 :(得分:0)

尝试将def strAPIVersion =“56.0”更新为def strAPIVersion =“76.0”我认为56版本中没有高级功能。我使用Paypal的默认设置作为测试     & L_PAYMENTREQUEST_0_NAME0 = 10%Decaf Kona Blend Coffee
    &安培; 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