duanpo7282 2013-02-19 14:54
浏览 21
已采纳

如何在没有登录的情况下实现付款后提供信息的秘密网址?

I would like to deliver some information to customers after a paypal payment, using the paypal return url, and without having the customer log in.

So I think I need a system to create urls for each transaction, and to avoid that a url for another transaction is guessed.

I have thought of something like:

http://www.domain.com/product/send.php?productID=12&transactionHash=[thisTransactionHash]

using a transactionHash that could be calculated based on the customer's email and the product unique id.

Does this method make sense? or what would be your recommendation delivering information without login, and avoiding customers guessing the url for other products?


Although they were several interesting answers about hashes, there is still one concern with the idea I mention above: Paypal needs to receive the return url, therefore the information is passed before payment and therefore the method is not securing against fraud.

The only secure way I see is the Paypal delivery system, which is why I accepted that answer.

  • 写回答

5条回答 默认 最新

  • duanbohan2015 2013-02-19 15:22
    关注

    If you target PayPal only, why don't you check Instant Payment Notification Guide? https://www.x.com/sites/default/files/ipnguide.pdf

    I didn't use Paypal before, but it seems this solves your problem.

    Create table: | product_id (unique ID of you product) | varchar transaction_hash |

    In this sample code (PHP example): https://www.x.com/developers/PayPal/documentation-tools/code-sample/216623

    After validating that the payment is correct, insert product ID and verify_sign( value from paypal POST data) in the table. and Give the user a URL with with product ID and verify_sign.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False