PayPal express checkout on the shopping cart

Posted by Noam Smadja on Stack Overflow See other posts from Stack Overflow or by Noam Smadja
Published on 2010-06-17T21:57:59Z Indexed on 2010/06/17 22:43 UTC
Read the original article Hit count: 314

Filed under:
|

i wish to achieve: alt text

so in my shopping cart page i set session("Payment_Amount") = total and downloaded both asp files the wizard told me. expresschecout.asp and paypalfunctions.asp. and added the API credentials to the corect place. and i add the form from their wizard:

<form action='expresscheckout.asp' METHOD='POST'>
<input type='image' name='submit' src='https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif' border='0' align='top' alt='Check out with PayPal'/>
</form>

But when i go to my shopping cart and press on the paypal submit button i am taken to expressheckout.asp but the page stays whit, saying Done in the status bar. how can i debug that? :/

EDIT ADDED MY CODE, ASP:

<!-- #include file ="paypalfunctions.asp" -->
<%
' ==================================
' PayPal Express Checkout Module
' ==================================

On Error Resume Next

'------------------------------------
' The paymentAmount is the total value of 
' the shopping cart, that was set 
' earlier in a session variable 
' by the shopping cart page
'------------------------------------
paymentAmount = Session("Payment_Amount")

'------------------------------------
' The currencyCodeType and paymentType 
' are set to the selections made on the Integration Assistant 
'------------------------------------
currencyCodeType = "USD"
paymentType = "Sale"

'------------------------------------
' The returnURL is the location where buyers return to when a
' payment has been succesfully authorized.
'
' This is set to the value entered on the Integration Assistant 
'------------------------------------
returnURL = "http://www.noamsm.co.il/index.asp"

'------------------------------------
' The cancelURL is the location buyers are sent to when they click the
' return to XXXX site where XXX is the merhcant store name
' during payment review on PayPal
'
' This is set to the value entered on the Integration Assistant 
'------------------------------------
cancelURL = "http://www.noamsm.co.il/index.asp"

'------------------------------------
' Calls the SetExpressCheckout API call
'
' The CallShortcutExpressCheckout function is defined in the file PayPalFunctions.asp,
' it is included at the top of this file.
'-------------------------------------------------
Set resArray = CallShortcutExpressCheckout (paymentAmount, currencyCodeType, paymentType, returnURL, cancelURL)

ack = UCase(resArray("ACK"))
If ack="SUCCESS" Then
    ' Redirect to paypal.com
    ReDirectURL( resArray("TOKEN") )
Else  
    'Display a user friendly Error on the page using any of the following error information returned by PayPal
    ErrorCode = URLDecode( resArray("L_ERRORCODE0"))
    ErrorShortMsg = URLDecode( resArray("L_SHORTMESSAGE0"))
    ErrorLongMsg = URLDecode( resArray("L_LONGMESSAGE0"))
    ErrorSeverityCode = URLDecode( resArray("L_SEVERITYCODE0"))
End If
%>

i am guessing i am getting one of the errors from the bottom but cant find where to see thm..

© Stack Overflow or respective owner

Related posts about asp-classic

Related posts about paypal-api