如何使用自定义字段制作 PayPal 加密的“立即购买"按钮? [英] How do I make a PayPal encrypted buy now button with custom fields?

查看:23
本文介绍了如何使用自定义字段制作 PayPal 加密的“立即购买"按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让我的 PHP 代码生成一个加密的 BuyNow 按钮,该按钮还包含自定义字段并实现 IPN URL 和重定向页面?

Is there a way that my PHP code can generate an encrypted BuyNow button that also includes custom fields and also implements an IPN URL and redirect page?

推荐答案

您不必加密.只需采用自定义"变量,除其他事项外,您可能需要在其中添加价格和产品编号的哈希值,如下所示:

You don't have to encrypt. Simply take the 'custom' variable, and, among other things you might need to put in there, add a hash of the price and product number, like so:

$sCustom .= '|' . md5($sSalt . $sProduct . $sPrice);

然后,在处理 IPN 时,请确保此散列不受接收到的内容的干扰.如果是,则阻止交易.

Then, when the IPN is processed, ensure that this hash was not disturbed with what is received back. If it was, then block the transaction.

这篇关于如何使用自定义字段制作 PayPal 加密的“立即购买"按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆