【发布时间】:2010-06-17 21:57:59
【问题描述】:
我希望达到:
所以在我的购物车页面中我设置了session("Payment_Amount") = total
并下载了向导告诉我的两个 asp 文件。 expresschecout.asp 和 paypalfunctions.asp。并将 API 凭据添加到正确的位置。
我从他们的向导中添加了表单:
<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>
但是当我进入我的购物车并按下 paypal 提交按钮时,我被带到 expressheckout.asp 但页面保持不变,在状态栏中显示完成。我该如何调试呢? :/
编辑添加了我的代码,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
%>
我猜我从底部得到了一个错误,但找不到在哪里看到 thm..
【问题讨论】:
标签: asp-classic paypal