javascript - 将产品 ID 传递给 PayPal 按钮

标签 javascript paypal elixir phoenix-framework

我有一堆产品,价格都一样(我无法为每个产品创建一个 PayPal 按钮,因为会有数千个)。

有没有办法将产品 ID 传递给 PayPal,以便我知道客户购买了哪种产品?

例如:我在 www.mysite.com/products/1 有一个产品页面...其中 1 是产品 ID。

在 www.mysite.com/products/2 等处也有产品页面...

每个产品页面上都有一个 PayPal 按钮。有没有办法将产品 ID 传递给 PayPal,以便我知道购买了哪个产品?

感谢您的宝贵时间。

最佳答案

item_number 可用时,不要使用 custom

item_number See description.
Pass-through variable for you to track product or service purchased or the contribution made. The value you specify is passed back to you upon payment completion. This variable is required if you want PayPal to track inventory or track profit and loss for the item the button sells.
127 characters max

来自 https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

关于javascript - 将产品 ID 传递给 PayPal 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36488851/

相关文章:

javascript - JSON 文件仅在键存在时才使用值

JavaScript 函数作为对象

Java/PayPal 集成指向错误的端点

elixir - 多态嵌入结构

erlang - 为什么透析器检测不到这种不良类型?

javascript - 将 float 元素动画化为相反的浮点

javascript - paper.js 随机三 Angular 形

PayPal 高级卡支付 - 如何测试 3D Secure?

ruby - 如何使用 Paypal 的 Adaptive Payments API 和 Ruby 避免身份验证和时间问题?

elixir - 如何在 elixir 中拆分字符串以保持分隔符?