付款完成后发送电子邮件 [英] Send email, when paypal payment is made

查看:217
本文介绍了付款完成后发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了互联网,但没有找到与此相关的任何内容。
我想创建一个脚本,当该客户向我的Paypal帐户付款时,该脚本会自动向该客户发送电子邮件。

I searched the internet, but didn't find anything relevant for this. I want to make a script which automatically sends an email to the customer, when that customer makes a payment to my Paypal account.

要执行此操作,我想在成功付款后从Paypal提取3件事,即
1.客户的电子邮件ID,
2。支付的金额
3.产品名称

To do this, I want to fetch 3 things from Paypal after successful payments, 1. E-Mail ID of customer, 2. Amount Paid , 3. Product name

任何想法都将受到高度赞赏。

Any ideas would be highly appreciated.

推荐答案

这个问题非常开放,总之,您可以按照要求进行操作。您可以检索的信息在很大程度上取决于您用来生成原始付款请求的信息。在此处查看服务:

This question is very open, in short yes you can do what you are asking for. The information you can retrieve is highly dependant on what you are using to generate the original payment request. Check out the services here:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_overview

我强烈建议使用IPN初始化电子邮件,为什么?付款数据传输(PDT)高度不可靠,因为它依赖于客户在购买后返回您的网站(这种情况并非总是如此)。

I highly recommend using IPN to initialize the email, why? Payment Data Transfer (PDT) is highly unreliable because it relies on the customer returning to your site after their purchase (which doesn't always happen).

IPN如何工作?贝宝让您网站上的脚本知道已付款,并发送大量订单信息。然后,脚本工作就是将这些数据发布回Paypal服务器,以便您可以验证数据是否真实。然后,您可以使用它进行所需的操作。

How does IPN work? Paypal lets a script on your site know that a payment has been made, sending a bunch of order information. It is then your scripts job to post that data back to Paypal servers so that you can VERIFY that the data is authentic. Then you can do what you want with it.

在此处了解有关IPN的信息:

Read about IPN here:

https://www.paypal.com/ipn

取决于购买时提供的数据应该可以从IPN响应中获得所需的一切,您可以在此处查看变量。

Depending on the data given at time of purchase you should be able to get everything you want from the IPN response, you can see the variables here.

https://cms.paypal.com/us/cgi-bin/? cmd = _render-content& content_ID = developer / e_howto_html_IPNandPDTVariables

这篇关于付款完成后发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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