简体   繁体   中英

Paypal shopping cart with multiple items are not working

I am unable to implement paypal shopping cart, here is my sandbox URL with multiple items:

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_cart&business=salman-facilitator@mywebsitedomain.com&lc=US&item_name_1=Donation+for+1&amount_1=81.41&item_number_1=1&quantity_1=1&item_name_2=Donation+for+2&amount_2=141.30&item_number_2=2&quantity_2=1&txn_type=cart&num_cart_items=2¤cy_code=USD&first_name=&email=&no_note=0&no_shipping=1&rm=2&return=http%3A%2F%2Fmywebsitedomain.com%2Fbeta%2Fdonation%2Fcart%2Fpaypal_success&cancel_return=http%3A%2F%2Fmywebsitedomain.com%2Fbeta%2Fdonation%2Fcart%3Fcancel%3D1&custom=_token=t00QTMrPNidVnWxkBSsTGQJ1FDnl8vsnW0z2FIOw¬ify_url=http%3A%2F%2Fmywebsitedomain.com%2Fbeta%2Fdonation%2Fipn&_token=t00QTMrPNidVnWxkBSsTGQJ1FDnl8vsnW0z2FIOw

Paypal is giving this error: "We have detected a problem with this shopping cart. If the problem persists, please contact the merchant."

URL seems to be fine but its not working and tried a lot but now I have no idea why this is happening?

PayPal does not want to display particulars of the merchant's error to the buyer's browser, thus the generic error message you see. But these are not hard to diagnose.

Try basic debugging tehniques to triangulate the error. Strip out sets of fields to see where the error is (eg remove the return URL/cancel URL stuff; if that doesn't change it, reduce the cart complexity or try a regular xclick (no cart).

BTW, you have several oddities (apparent character encoding issues) in the URL above; not sure if these are from your cut-and-paste into SO or are in the source. If they are in the source, there's your problem. See eg (but not only) the attempt to specify currency code.

There is some mis-spelled code like "¤cy_code=USD" please check and correct it. This is should be "currency_code" See here .

May be this is your solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM