HTTP Post: 获取加密的 Paypal 多项目购物车上传按钮

HTTP Post: getting encrypted Paypal multiple-item cart upload button

我在使用按钮管理器 API 的 BMCreateButton 上传多项目购物车时遇到问题。 在 paypal documentation for the cart upload command, the paragraph on "securing your button" implies that it should be possible to get encrypted buttons for all the functions listed above, including the cart upload form. And in this SO thread 中,有人说他们已经用 PHP 解决了这个问题,但是查了一下,他们使用简单的 HTTP Post 并不明显,因为它与 [= =25=] class 的内部运作。

到目前为止,我只能查看一项,而在尝试使用多项语法(item_name_1item_name_2...)时,它根本没有显示任何项目总共 0.00.

这是我的请求代码:

string requestContent =
  "METHOD=BMCreateButton" +
  "&VERSION=85.0" +
  "&USER=<user>" +
  "&PWD=<pwd>" +
  "&SIGNATURE=<sig>" +
  "&BUTTONCODE=ENCRYPTED" +
  "&BUTTONTYPE=BUYNOW" +
  "&BUTTONIMAGE=reg" +
  "&BUTTONCOUNTRY=US" +
  "&BUTTONSUBTYPE=PRODUCTS" +

  //"&L_BUTTONVAR1=cmd%3D_cart" + //having this in here definitely causes an error message to display
  "&L_BUTTONVAR1=button_subtype%3DPRODUCTS" +
  "&L_BUTTONVAR2=business%3Dbiz%40biz.com" +
  "&L_BUTTONVAR3=item_name_1%3DToaster" +
  "&L_BUTTONVAR4=amount_1%3D45.00" +
  "&L_BUTTONVAR5=quantity_1%3D1" +
  "&L_BUTTONVAR6=upload%3D1";

它不起作用 - 我已经询问了 PayPal 技术支持,如果我从他们那里听到有关此主题的任何回复,我会 post 回到这里。

我遇到了同样的问题,由于没有任何进展,我联系了 PayPal 支持。 There is the answer:

万一 link 会死,这里有引用的回复:

It's not only with ENCRYPTED. If you try CLEARTEXT, the same error is thrown.

Upload cart is a slightly different kind of button, that was never intended to be pre-built, and that's why this functionality doesn't exist in BMCreateButton. If you compare the Button Manager in the account and the API functionality - they have the same capabilities and, in both cases, the upload cart isn't there.

Looking at the documentation, you will also notice the BUTTONTYPE=CART refers to Add to cart.

It makes perfect sense to try to secure the upload cart code, but the best way will always be post-transaction consistency verification (with IPN).

所以综上所述,加密是不可能的,我们只能检测篡改,例如使用IPN。

在对我的问题的回应中,PayPal 版主提出了一个问题以在文档中澄清这一点。