How do I make a PayPal encrypted buy now button with custom fields?

后端 未结 2 1199
独厮守ぢ
独厮守ぢ 2020-12-12 03:58

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?

相关标签:
2条回答
  • 2020-12-12 04:14

    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);
    

    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.

    0 讨论(0)
  • 2020-12-12 04:26

    in the encrypted buttons theres is one field called 'custom', you can serialize an array into it and it will be returned to your IPN :)

    0 讨论(0)
提交回复
热议问题