PayPal结账按钮和自定义变量

Tys*_*rre 6 paypal checkout

我创建了一个相当简单的照片库,我想应用PayPal Checkout按钮.基础很简单,但我想要做的是至少预先填充命名字段作为按钮的一部分或将每个单独页面中包含的变量传递到购物车.

每个页面都包含图片ID,日期和标题.我希望能够传递这些数据,以便当有人点击"添加到购物车"时,数据已经存在.现在,我可以看到按钮工作的唯一方法是创建自定义字段并让客户自己复制和粘贴数据,这很痛苦.

如果我能算出这一点,PayPal结账可能值得一试.有人在这做过吗?

gmo*_*ore 6

你需要这样的东西吗?我把它从PayPal文档中拿出来了一段时间.我现在正在生产应用程序中使用它.请在使用之前测试:)

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:4px 0px 0px 4px;">
<input type="image" src="<ADD_TO_CART_BUTTON>.jpg" border="0" name="submit" alt="Add this item to your shopping cart">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="add" value="1">

<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="<YOUR_PAYPAL_EMAIL>">
<input type="hidden" name="item_name" value="<THE_ITEM_NAME>">
<input type="hidden" name="item_number" value="<THE_ITEM_NUMBER_SKU_OR_WHATEVER>">
<input type="hidden" name="amount" value="<HOW_MUCH_IT_COSTS>">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="cn" value="<CUSTOM_TEXT_FOR_THE_BUYER_TO_LEAVE_YOU_SPECIAL_INSTRUCTIONS>">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">

<input type="hidden" name="bn" value="PP-ShopCartBF">
<input type="hidden" name="address_override" value="1">
<input type="hidden" name="business_cs_email" value="<YOUR_PAYPAL_EMAIL>">
    <input type="hidden" name="return" value="<WHERE_TO_TAKE_THE_USER_AFTER_PURCHASE_LIKE_thankyou.html>">
    <input type="hidden" name="notify_url" value="<IF_YOU_PROCESS_ORDERS_THROUGH_YOUR_SITE_THE_CALLBACK_URL_GOES_HERE>">

</form>
Run Code Online (Sandbox Code Playgroud)

对于您销售的每件商品,您都需要其中一件.

http://sandbox.paypal.com注册并开始在他们的沙箱中进行尝试.

另请查看http://www.x.comhttp://www.paypal-labs.com.他们一直在用收银台做一些很酷的事情.