title: Classic ASP paypal integration with express checkout
body: <p>I have a fully working Classic ASP paypal integration (yay!)</p>
  
  <p>I set up my variables and call the express checkout like this:</p>
  
  <pre><code>paymentAmount = RS_OrderHeader01("PaymentAmount")
  currencyCodeType = "GBP"
  paymentType = "Sale"
  solutionType = "Mark"
  OrderDescription = "My order description"
  returnURL = "http://www.myurl.co.uk/transactioncomplete.asp"
  cancelURL = "http://www.myurl.co.uk/transactioncancelled.asp"
  Set resArray = CallShortcutExpressCheckout (paymentAmount, currencyCodeType, paymentType, returnURL, cancelURL)
  </code></pre>
  
  <p>That all works fine apart from the fact that there is no description being passed across. I would also like to add individual items from my basket to the final transaction in paypal.</p>
  
  <p>The integration I am using is from a download from the Paypal site that hinges around this 'include' file:</p>
  
  <pre><code>&lt;%
      ' ===================================================
      ' PayPal API Include file
      ' 
      ' Defines all the global variables and the wrapper functions 
      '-----------------------------------------------------------
  
      Dim gv_APIEndpoint
      Dim gv_APIUserName
      Dim gv_APIPassword
      Dim gv_APISignature
      Dim gv_Version
      Dim gv_BNCode
      Dim gv_ProxyServer
      Dim gv_ProxyServerPort 
      Dim gv_Proxy
  
      '----------------------------------------------------------------------------------
      ' Authentication Credentials for making the call to the server
      '----------------------------------------------------------------------------------
  
      SandboxFlag = true
  
      '------------------------------------
      ' PayPal API Credentials
      ' Replace &lt;API_USERNAME&gt; with your API Username
      ' Replace &lt;API_PASSWORD&gt; with your API Password
      ' Replace &lt;API_SIGNATURE&gt; with your Signature
      '------------------------------------
  
       gv_APIUserName = "myusername"
       gv_APIPassword = "1404738820"
       gv_APISignature = "AFcWxV21CRCpSSRl31AuDrEW4a9MiULwvS8UDzCPvE28G8"
  
  
      '-----------------------------------------------------
      ' The BN Code only applicable for partners
      '----------------------------------------------------
  
      gv_BNCode = "PP-ECWizard"
  
      '----------------------------------------------------------------------
      ' Define the PayPal URLs.  
      '   This is the URL that the buyer is first sent to do authorize payment with their paypal account
      '   change the URL depending if you are testing on the sandbox
      '   or going to the live PayPal site
      '
      ' For the sandbox, the URL is       https://www.sandbox.paypal.com/webscr&amp;cmd=_express-checkout&amp;token=
      ' For the live site, the URL is        https://www.paypal.com/webscr&amp;cmd=_express-checkout&amp;token=
      '------------------------------------------------------------------------
  
      if SandboxFlag = true Then
          gv_APIEndpoint = "https://api-3t.sandbox.paypal.com/nvp"
          PAYPAL_URL = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&amp;token="
      Else
          gv_APIEndpoint = "https://api-3t.paypal.com/nvp"
          PAYPAL_URL = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&amp;token="
      End If 
  
      gv_Version  = "93"
  
      'WinObjHttp Request proxy settings.
      gv_ProxyServer  = "127.0.0.1"
      gv_ProxyServerPort = "808"
      gv_Proxy        = 2 'setting for proxy activation
      gv_UseProxy     = False
  
      '-------------------------------------------------------------------------------------------------------------------------------------------
      ' Purpose:  Prepares the parameters for the SetExpressCheckout API Call.
      ' Inputs:  
      '       paymentAmount: Total value of the shopping cart
      '       currencyCodeType: Currency code value the PayPal API
      '       paymentType: PaymentType has to be one of the following values: Sale or Order or Authorization
      '       returnURL: The page where buyers return to after they are done with the payment review on PayPal
      '       cancelURL: The page where buyers return to when they cancel the payment review on PayPal
      ' Returns: 
      '       The NVP Collection object of the SetExpressCheckout call Response.
      '--------------------------------------------------------------------------------------------------------------------------------------------   
  
      Function CallShortcutExpressCheckout( paymentAmount, currencyCodeType, paymentType, returnURL, cancelURL) 
  
      '------------------------------------------------------------------------------------------------------------------------------------
          ' Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation
          '------------------------------------------------------------------------------------------------------------------------------------
  
          nvpstr  = "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_AMT") &amp; "=" &amp; Server.URLEncode(paymentAmount) &amp; _
                              "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_PAYMENTACTION")&amp;"=" &amp; Server.URLEncode(paymentType) &amp; _
                              "&amp;" &amp; Server.URLEncode("RETURNURL") &amp; "=" &amp; Server.URLEncode(returnURL) &amp; _
                              "&amp;" &amp; Server.URLEncode("CANCELURL") &amp; "=" &amp; Server.URLEncode(cancelURL) &amp; _ 
                              "&amp;" &amp; server.UrlEncode("PAYMENTREQUEST_0_CURRENCYCODE") &amp; "=" &amp; Server.URLEncode(currencyCodeType)
  
          SESSION("currencyCodeType") = currencyCodeType    
          SESSION("PaymentType")  = paymentType
  
          '--------------------------------------------------------------------------------------------------------------- 
          ' Make the API call to PayPal
          ' If the API call succeded, then redirect the buyer to PayPal to begin to authorize payment.  
          ' If an error occured, show the resulting errors
          '---------------------------------------------------------------------------------------------------------------
          Set resArray = hash_call("SetExpressCheckout",nvpstr)
  
          ack = UCase(resArray("ACK"))
          If ack="SUCCESS" Then
              ' Save the token parameter in the Session 
              SESSION("token") = resArray("TOKEN")
          End If
  
          set CallShortcutExpressCheckout = resArray  
  
      End Function
  
      '-------------------------------------------------------------------------------------------------------------------------------------------
      ' Purpose:  Prepares the parameters for the SetExpressCheckout API Call.
      ' Inputs:  
      '       paymentAmount:      Total value of the shopping cart
      '       currencyCodeType:   Currency code value the PayPal API
      '       paymentType:        paymentType has to be one of the following values: Sale or Order or Authorization
      '       returnURL:          the page where buyers return to after they are done with the payment review on PayPal
      '       cancelURL:          the page where buyers return to when they cancel the payment review on PayPal
      '       shipToName:     the Ship to name entered on the merchant's site
      '       shipToStreet:       the Ship to Street entered on the merchant's site
      '       shipToCity:         the Ship to City entered on the merchant's site
      '       shipToState:        the Ship to State entered on the merchant's site
      '       shipToCountryCode:  the Code for Ship to Country entered on the merchant's site
      '       shipToZip:          the Ship to ZipCode entered on the merchant's site
      '       shipToStreet2:      the Ship to Street2 entered on the merchant's site
      '       phoneNum:           the phoneNum  entered on the merchant's site
      ' Returns: 
      '       The NVP Collection object of the SetExpressCheckout call Response.
      '--------------------------------------------------------------------------------------------------------------------------------------------   
      Function CallMarkExpressCheckout(paymentAmount, currencyCodeType, paymentType, returnURL, cancelURL, shipToName, shipToStreet, shipToCity, shipToState, shipToCountryCode, shipToZip, shipToStreet2, phoneNum) 
          '------------------------------------------------------------------------------------------------------------------------------------
          ' Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation
          '------------------------------------------------------------------------------------------------------------------------------------
  
          nvpstr  = "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_AMT") &amp; "=" &amp; Server.URLEncode(paymentAmount) &amp; _
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_PAYMENTACTION")&amp;"=" &amp; Server.URLEncode(paymentType) &amp; _
                      "&amp;" &amp; Server.URLEncode("RETURNURL") &amp; "=" &amp; Server.URLEncode(returnURL) &amp; _
                      "&amp;" &amp; Server.URLEncode("CANCELURL") &amp; "=" &amp; Server.URLEncode(cancelURL) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("ADDROVERRIDE") &amp; "=1" &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTONAME") &amp; "=" &amp; Server.URLEncode(shipToName) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOSTREET") &amp; "=" &amp; Server.URLEncode(shipToStreet) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOSTREET2") &amp; "=" &amp; Server.URLEncode(shipToStreet2) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOCITY") &amp; "=" &amp; Server.URLEncode(shipToCity) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOSTATE") &amp; "=" &amp; Server.URLEncode(shipToState) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE") &amp; "=" &amp; Server.URLEncode(shipToCountryCode) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOZIP") &amp; "=" &amp; Server.URLEncode(shipToZip) &amp; _ 
                      "&amp;" &amp; Server.URLEncode("PAYMENTREQUEST_0_SHIPTOPHONENUM") &amp; "=" &amp; Server.URLEncode(phoneNum) &amp; _ 
                      "&amp;"&amp; server.UrlEncode("PAYMENTREQUEST_0_CURRENCYCODE") &amp; "=" &amp; Server.URLEncode(currencyCodeType)
  
                  SESSION("currencyCodeType") = currencyCodeType    
          SESSION("PaymentType")  = paymentType
  
          '--------------------------------------------------------------------------- 
          ' Make the API call to PayPal to set the Express Checkout token
          '   If the API call succeded, then redirect the buyer to PayPal to begin to authorize payment.  
          '   If an error occured, show the resulting errors
          '---------------------------------------------------------------------------
          Set resArray = hash_call("SetExpressCheckout",nvpstr)
  
          ack = UCase(resArray("ACK"))
          If ack="SUCCESS" Then
              ' Save the token parameter in the Session 
              SESSION("token") = resArray("TOKEN")
          End If
  
          set CallMarkExpressCheckout = resArray  
  
      End Function
  
      '-------------------------------------------------------------------------------------------------------------------------------------------
      ' Purpose:  Prepares the parameters for the GetExpressCheckoutDetails API and makes the API call.
      '
      ' Inputs:  
      '       token:  The token value returned by the SetExpressCheckout call
      ' Returns: 
      '       The NVP Collection object of the GetExpressCheckoutDetails Call Response.
      '--------------------------------------------------------------------------------------------------------------------------------------------   
      Function GetShippingDetails( token )
          '---------------------------------------------------------------------------
          ' At this point, the buyer has completed authorizing the payment
          ' at PayPal.  The function will call PayPal to obtain the details
          ' of the authorization, incuding any shipping information of the
          ' buyer.  Remember, the authorization is not a completed transaction
          ' at this state - the buyer still needs an additional step to finalize
          ' the transaction
          '---------------------------------------------------------------------------
  
              '---------------------------------------------------------------------------
          ' Build a second API request to PayPal, using the token as the
          '  ID to get the details on the payment authorization
          '---------------------------------------------------------------------------
          nvpstr="&amp;TOKEN=" &amp; token
  
          '---------------------------------------------------------------------------
          ' Make the API call and store the results in an array.  
          '   If the call was a success, show the authorization details, and provide
          '   an action to complete the payment.  
          '   If failed, show the error
          '---------------------------------------------------------------------------
          set resArray = hash_call("GetExpressCheckoutDetails",nvpstr)
          ack = UCase(resArray("ACK"))
          If ack="SUCCESS" Then
              ' Save the token parameter in the Session 
              SESSION("PAYERID") = resArray("PAYERID")
          End If      
          set GetShippingDetails = resArray
      End Function
  
      '-------------------------------------------------------------------------------------------------------------------------------------------
      ' Purpose:  Prepares the parameters for the GetExpressCheckoutDetails API and makes the call.
      '
      ' Inputs:  
      '       finalPaymentAmount:     The final total of the shopping cart including Shipping, Handling and other fees
      ' Returns: 
      '       The NVP Collection object of the DoExpressCheckoutPayment Call Response.
      '--------------------------------------------------------------------------------------------------------------------------------------------   
      Function ConfirmPayment( finalPaymentAmount )
  
          '------------------------------------------------------------------------------------------------------------------------------------
          '----   Use the values stored in the session from the previous SetEC call   
          '------------------------------------------------------------------------------------------------------------------------------------
          token           = SESSION("token")
          currCodeType    = SESSION("currencyCodeType")
          paymentType     = SESSION("PaymentType")
          payerID         = SESSION("PayerID")
  
          nvpstr          =   "&amp;" &amp; Server.URLEncode("TOKEN") &amp; "=" &amp; Server.URLEncode(token) &amp; "&amp;" &amp;_
                              Server.URLEncode("PAYERID")&amp;"=" &amp;Server.URLEncode(payerID) &amp; "&amp;" &amp;_
                              Server.URLEncode("PAYMENTREQUEST_0_PAYMENTACTION")&amp;"=" &amp; Server.URLEncode(paymentType) &amp; "&amp;" &amp;_
                              Server.URLEncode("PAYMENTREQUEST_0_AMT") &amp;"=" &amp; Server.URLEncode(finalPaymentAmount) &amp; "&amp;" &amp;_ 
                              Server.URLEncode("PAYMENTREQUEST_0_CURRENCYCODE")&amp; "=" &amp;Server.URLEncode(currCodeType)
          '-------------------------------------------------------------------------------------------
          ' Make the call to PayPal to finalize payment
          ' If an error occured, show the resulting errors
          '-------------------------------------------------------------------------------------------
          set ConfirmPayment = hash_call("DoExpressCheckoutPayment",nvpstr)
      End Function
  
      '-------------------------------------------------------------------------------------------------------------------------------------------
      ' Purpose:  Prepares the parameters for the DoDirectPayment API and makes the call.
      '
      ' Inputs:  
      '       paymentType:        paymentType has to be one of the following values: Sale or Order or Authorization
      '       paymentAmount:          Total value of the shopping cart
      '       creditCardType      Credit card type has to one of the following values: Visa or MasterCard or Discover or Amex or Switch or Solo 
      '       creditCardNumber    Credit card number
      '       expDate         Credit expiration date
      '       cvv2                CVV2
      '       firstName           Customer's First Name
      '       lastName            Customer's Last Name
      '       street          Customer's Street Address
      '       city                Customer's City
      '       state               Customer's State                
      '       zip             Customer's Zip                  
      '       countryCode     Customer's Country represented as a PayPal CountryCode
      '       currencyCode        Customer's Currency represented as a PayPal CurrencyCode
      '       
      ' Returns: 
      '       The NVP Collection object of the DoDirectPayment Call Response.
      '--------------------------------------------------------------------------------------------------------------------------------------------   
      Function DirectPayment( paymentType, paymentAmount, creditCardType, creditCardNumber, expDate, cvv2, firstName, lastName, street, city, state, zip, countryCode, currencyCode )
  
          ' Construct the parameter string that describes the SetExpressCheckout API call in the shortcut implementation
  
          nvpstr  =   "&amp;PAYMENTACTION=" &amp; paymentType &amp; _
                      "&amp;AMT=" &amp; paymentAmount &amp;_
                      "&amp;CREDITCARDTYPE=" &amp; creditCardType &amp;_
                      "&amp;ACCT=" &amp; creditCardNumber &amp; _
                      "&amp;EXPDATE=" &amp; expDate &amp;_
                      "&amp;CVV2=" &amp; cvv2 &amp;_
                      "&amp;FIRSTNAME=" &amp; firstName &amp;_
                      "&amp;LASTNAME=" &amp; lastName &amp;_
                      "&amp;STREET=" &amp; street &amp;_
                      "&amp;CITY=" &amp; city &amp;_
                      "&amp;STATE=" &amp; state &amp;_
                      "&amp;ZIP=" &amp; zip &amp;_
                      "&amp;COUNTRYCODE=" &amp; countryCode &amp;_
                      "&amp;CURRENCYCODE=" &amp; currencyCode
  
          nvpstr  =   URLEncode(nvpstr)       
  
          '-------------------------------------------------------------------------------------------
          ' Make the call to PayPal to finalize payment
          ' If an error occured, show the resulting errors
          '-------------------------------------------------------------------------------------------
          set DirectPayment = hash_call("DoDirectPayment",nvpstr)
      End Function
  
      '----------------------------------------------------------------------------------
      ' Purpose:  Make the API call to PayPal, using API signature.
      ' Inputs:  
      '       Method name to be called &amp; NVP string to be sent with the post method
      ' Returns: 
      '       NVP Collection object of Call Response.
      '---------------------------------------------------------------------------------- 
      Function hash_call ( methodName,nvpStr )
          Set objHttp = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1")
  
          nvpStrComplete  = "METHOD=" &amp; Server.URLEncode(methodName) &amp; "&amp;VERSION=" &amp; Server.URLEncode(gv_Version) &amp; "&amp;USER=" &amp; Server.URLEncode(gv_APIUserName) &amp; "&amp;PWD=" &amp; Server.URLEncode(gv_APIPassword) &amp; "&amp;SIGNATURE=" &amp; Server.URLEncode(gv_APISignature) &amp; nvpStr
          nvpStrComplete  = nvpStrComplete &amp; "&amp;BUTTONSOURCE=" &amp; Server.URLEncode( gv_BNCode )
  
          Set SESSION("nvpReqArray")= deformatNVP( nvpStrComplete )
          objHttp.open "POST", gv_APIEndpoint, False
          WinHttpRequestOption_SslErrorIgnoreFlags=4
          objHttp.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = &amp;H3300
  
          If  gv_UseProxy Then
              'Proxy Call
              objHttp.SetProxy gv_Proxy,  gv_ProxyServer&amp; ":" &amp;gv_ProxyServerPort
          End If
  
          objHttp.Send nvpStrComplete
  
          Set nvpResponseCollection =deformatNVP(objHttp.responseText)
          Set hash_call = nvpResponseCollection
          Set objHttp = Nothing 
  
          If Err.Number &lt;&gt; 0 Then 
              SESSION("Message")  = ErrorFormatter(Err.Description,Err.Number,Err.Source,"hash_call")
              SESSION("nvpReqArray") =  Null
          Else
              SESSION("Message")  = Null
          End If
      End Function
  
      '----------------------------------------------------------------------------------
      ' Purpose:  Formats the error Messages.
      ' Inputs:  
      '       
      ' Returns: 
      '       Formatted Error string
      '----------------------------------------------------------------------------------
      Function ErrorFormatter ( errDesc, errNumber, errSource, errlocation )
          ErrorFormatter ="&lt;font color=red&gt;" &amp; _
                                  "&lt;TABLE align = left&gt;" &amp;_
                                  "&lt;TR&gt;" &amp;"&lt;u&gt;Error Occured!!!&lt;/u&gt;" &amp; "&lt;/TR&gt;" &amp;_
                                  "&lt;TR&gt;" &amp;"&lt;TD&gt;Error Description :&lt;/TD&gt;" &amp;"&lt;TD&gt;"&amp;errDesc&amp; "&lt;/TD&gt;"&amp; "&lt;/TR&gt;" &amp;_
                                  "&lt;TR&gt;" &amp;"&lt;TD&gt;Error number :&lt;/TD&gt;" &amp;"&lt;TD&gt;"&amp;errNumber&amp; "&lt;/TD&gt;"&amp; "&lt;/TR&gt;" &amp;_
                                  "&lt;TR&gt;" &amp;"&lt;TD&gt;Error Source :&lt;/TD&gt;" &amp;"&lt;TD&gt;"&amp;errSource&amp; "&lt;/TD&gt;"&amp; "&lt;/TR&gt;" &amp;_
                                  "&lt;TR&gt;" &amp;"&lt;TD&gt;Error Location :&lt;/TD&gt;" &amp;"&lt;TD&gt;"&amp;errlocation&amp; "&lt;/TD&gt;"&amp; "&lt;/TR&gt;" &amp;_
                                  "&lt;/TABLE&gt;" &amp;_
                                  "&lt;/font&gt;"
      End Function 
  
      '----------------------------------------------------------------------------------
      ' Purpose:  Convert nvp string to Collection object.
      ' Inputs:   
      '       NVP string.
      ' Returns: 
      '       NVP Collection object created from deserializing the NVP string.
      '----------------------------------------------------------------------------------
      Function deformatNVP ( nvpstr )
          On Error Resume Next
  
          Dim AndSplitedArray,EqualtoSplitedArray,Index1,Index2,NextIndex
  
          Set NvpCollection = Server.CreateObject("Scripting.Dictionary")
          AndSplitedArray = Split(nvpstr, "&amp;", -1, 1)
          NextIndex=0
  
          For Index1 = 0 To UBound(AndSplitedArray)
              EqualtoSplitedArray=Split(AndSplitedArray(Index1), "=", -1, 1)
              For Index2 = 0 To UBound(EqualtoSplitedArray)
                  NextIndex=Index2+1
                  NvpCollection.Add URLDecode(EqualtoSplitedArray(Index2)),URLDecode(EqualtoSplitedArray(NextIndex))
                  Index2=Index2+1
              Next
          Next
          Set deformatNVP = NvpCollection
          If Err.Number &lt;&gt; 0 Then 
              SESSION("Message")  = ErrorFormatter(Err.Description,Err.Number,Err.Source,"deformatNVP")
          else
              SESSION("Message")  = Null
          End If
      End Function
  
      '----------------------------------------------------------------------------------
      ' Purpose: URL Encodes a string
      ' Inputs:  
      '       String to be url encoded.
      ' Returns: 
      '       Url Encoded string.
      '----------------------------------------------------------------------------------
      Function URLEncode(str) 
          On Error Resume Next
  
              Dim AndSplitedArray,EqualtoSplitedArray,Index1,Index2,UrlEncodeString,NvpUrlEncodeString
  
          AndSplitedArray = Split(nvpstr, "&amp;", -1, 1)
          UrlEncodeString=""
          NvpUrlEncodeString=""
  
          For Index1 = 0 To UBound(AndSplitedArray)
              EqualtoSplitedArray=Split(AndSplitedArray(Index1), "=", -1, 1)
              For Index2 = 0 To UBound(EqualtoSplitedArray)
              If Index2 = 0 then
                  UrlEncodeString=UrlEncodeString &amp; Server.URLEncode(EqualtoSplitedArray(Index2))
              Else            
                  UrlEncodeString=UrlEncodeString &amp;"="&amp; Server.URLEncode(EqualtoSplitedArray(Index2))
              End if
              Next
              If Index1 = 0 then
                  NvpUrlEncodeString= NvpUrlEncodeString &amp; UrlEncodeString
              Else            
                  NvpUrlEncodeString= NvpUrlEncodeString &amp;"&amp;"&amp;UrlEncodeString
              End if
              UrlEncodeString=""
          Next
          URLEncode = NvpUrlEncodeString
  
          If Err.Number &lt;&gt; 0 Then 
              SESSION("Message")  = ErrorFormatter(Err.Description,Err.Number,Err.Source,"URLEncode")
          else
              SESSION("Message")  = Null
          End If
  
       End Function 
  
      '----------------------------------------------------------------------------------
      ' Purpose: Decodes a URL Encoded string
      ' Inputs:  
      '       A URL encoded string
      ' Returns: 
      '       Decoded string.
      '----------------------------------------------------------------------------------
      Function URLDecode(str) 
          On Error Resume Next
  
          str = Replace(str, "+", " ") 
          For i = 1 To Len(str) 
              sT = Mid(str, i, 1) 
              If sT = "%" Then 
                  If i+2 &lt; Len(str) Then 
                      sR = sR &amp; _ 
                          Chr(CLng("&amp;H" &amp; Mid(str, i+1, 2))) 
                      i = i+2 
                  End If 
              Else 
                  sR = sR &amp; sT 
              End If 
          Next 
  
          URLDecode = sR 
          If Err.Number &lt;&gt; 0 Then 
              SESSION("Message")  = ErrorFormatter(Err.Description,Err.Number,Err.Source,"URLDecode")
          else
              SESSION("Message")  = Null
          End If
  
      End Function
  
      '----------------------------------------------------------------------------------
      ' Purpose:  It's Workaround Method for Response.Redirect
      '           It will redirect the page to the specified url without urlencoding
      ' Inputs: 
      '       Url to redirect the page
      '----------------------------------------------------------------------------------
      Function ReDirectURL( token )
          On Error Resume Next
  
          payPalURL = PAYPAL_URL &amp; token &amp; "&amp;useraction=commit"
          response.clear
          response.status="302 Object moved"
          response.AddHeader "location", payPalURL
          If Err.Number &lt;&gt; 0 Then 
              SESSION("Message")  = ErrorFormatter(Err.Description,Err.Number,Err.Source,"ReDirectURL")
          else
              SESSION("Message")  = Null
          End If
      End Function
  
  %&gt;
  </code></pre>
  
  <p>As I have a fully working implementation I am reluctant to embrace a different solution (and go through a whole load more development).</p>
  
  <p>I have a sneaking suspicion that the 'CallShortcutExpressCheckout' is nothing more that a glorified call to SetExpressCheckout with some very specific parameters set and that it need modification or replacing with a direct call to SetExressCheckout?</p>
  
  <p>Has anyone got some sample classic ASP code?
  c</p>