【问题标题】:How to submit mutiple items to paypal page during checkout PHP如何在结帐PHP期间将多个项目提交到贝宝页面
【发布时间】:2012-03-09 07:06:52
【问题描述】:
    while ( $CART = mysql_fetch_assoc ( $q_cart ) ) {
    $cart_data .= '<input type="hidden" name="id[]" value="' . $CART ['cart_id'] . '">
                  <input type="hidden" name="item[]" value="' . $CART ['productID'] . '">
                  <input type="hidden" name="price[]" value="' . $CART ['price'] . '">
                  <input type="hidden" name="item_name' . $i . '" value="' . $CART ['product_name'] . '">
                  <input type="hidden" name="amount_' . $i . '" value="' . number_format ( $CART ['price'], 2 ). '">
                  <input type="hidden" name="quantity' . $i . '" value="' . $CART ['quantity'] . '">
                  <table width="600px"  border="0" cellpadding="0" cellspacing="1">
                  <tr>
                      <td valign="top" align="left" width="55%" class="font_st_color"><a href="cart.php?prod_id=' . $CART ['productID'] . '" title="' . $CART ['product_name'] . '">' . $CART ['product_name'] . '</a></td>
                      <td align="center" width="15%" class="padding">' . $CART ['quantity'] . '</td>
                      <td align="center" width="15%" class="pad_st_color"><b>$ ' . number_format ( $CART ['price'], 2 ) . '</b></td>
                  </tr>
                  </table>
                  ';
    $i += 1;
}

我从研究中得到的是 item_name_1 = "Item1" 这就是为什么我做一个变量 i 但是当我链接到结帐页面 Quantity:1 右边应该是 2 并且项目名称确实出现了它出现 Enter Description , 有人可以帮忙吗?

【问题讨论】:

    标签: php paypal checkout


    【解决方案1】:

    确保您有 cmdupload 字段。

    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    

    https://www.paypalobjects.com/IntegrationCenter/ic_std-variable-ref-cart-upload.html#HTMLVariablesOnlyfortheCartUploadCommand

    【讨论】:

      猜你喜欢
      • 2014-07-01
      • 2016-10-08
      • 2015-11-19
      • 2010-12-18
      • 2011-12-27
      • 2021-12-29
      • 2014-03-06
      • 2020-01-19
      • 2017-01-21
      相关资源
      最近更新 更多