paypal integration issue

前端 未结 2 714
别跟我提以往
别跟我提以往 2021-01-14 03:38

I cannot figure out what I am doing wrong with my code, I get the error

\"We have detected a problem with this shopping cart. If the problem persists, please contac

2条回答
  •  时光取名叫无心
    2021-01-14 04:16

    I see quite a few problems:

    1. You are using 'undefined_quantity' which is only used with buy now buttons.
    2. You are trying to do a cart upload button but doing the variables incorrectly (you enumerate with '_x', not just 'x' appended to the var name. I will post code below.
    3. You are missing a required '_cart' button parameter. Cart buttons always have either 'add=1' (add to cart), 'display=1' (view cart, overrides add), and 'upload=1' (upload, for sending multiple items at once).
    4. Your cancel return URL does not have 'http://' which is required with PayPal.
    5. PayPal only accepts 'floats' or amounts in two decimal place precision.
    6. Along with #5, I'm guessing your 'tax' value is supposed to be a percentage, and not the actual amount. For this, you would use 'tax_rate' for percents. Use 'tax_cart' if you know the exact tax for the total of all items in the cart.

    See button code for a cart upload button below:

    Upload

    You should check for the variables PayPal supports for Website Payments Standard (buttons) here.

提交回复
热议问题