怎样使一个PayPal加密的自定义字段现在购买按钮? [英] How do I make a PayPal encrypted buy now button with custom fields?

查看:245
本文介绍了怎样使一个PayPal加密的自定义字段现在购买按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有我的PHP code可生成一个加密按钮,现在购买还包括自定义字段和还实现了一个IPN的网址和重定向页面的方式?

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天全站免登陆