使用 PHP 在数据库中插入 Paypal 付款日期

发布于 2024-09-17 19:50:08 字数 94 浏览 1 评论 0原文

我不知道该怎么做。我想在我的网站上添加一个 Paypal“立即购买”按钮,当用户付款时,我想使用 mysql 将他们付款的日期保存到数据库中。

这怎么可能呢?

I'm not sure how to go about doing this.. I want to add a Paypal "buy now" button on my website and when a user pays I want to save the date they paid into the database using mysql.

How would this be possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

三月梨花 2024-09-24 19:50:08

您需要做的是创建一个 PayPal IPN 脚本,这将使 PayPal 在您每次收到付款时调用您服务器上的 PHP 脚本。 完整详情请访问 PayPal 网站< /a>,但这里是它如何工作的概述:

即时付款通知 (IPN) 已
通知您的消息服务
与 PayPal 交易相关的事件。
您可以使用它来自动化后台办公
和行政职能,例如
履行订单、跟踪客户、
并提供状态和其他
与交易相关的信息

您检测并处理 IPN 消息
与听众,有时称为
处理程序,它是一个脚本或程序
你写的。它等待消息
并将它们传递到各种后端或
响应的行政流程
的消息。 PayPal提供样品
您可以修改以实现的代码
检测 IPN 消息的侦听器。

当你的听众
收到特定事件的通知
满足您的需求。种类举例
当你的
监听器收到IPN消息
包括以下内容:

触发订单履行或启用
支票清除或时下载媒体
已付款 更新您的列表
客户更新会计记录
创建专门的“待办事项”列表
关于您通常参加的活动类型
也通过电子邮件通知事件,
但IPN消息服务使得
您可以自动回复
事件。下图显示
事件如何发生以及 PayPal 如何发生
用 IPN 消息进行响应
发送到您的听众:

IPN

What you'll need to do is create a PayPal IPN script, which will cause PayPal to call upon a PHP script on your server every time you receive a payment. The full details are available on PayPal's website, but here's an overview of how it works:

Instant Payment Notification (IPN) is
a message service that notifies you of
events related to PayPal transactions.
You can use it to automate back-office
and administrative functions, such as
fulfilling orders, tracking customers,
and providing status and other
information related to a transaction

You detect and process IPN messages
with a listener, sometimes called a
handler, which is a script or program
that you write. It waits for messages
and passes them to various back-end or
administrative processes that respond
the messages. PayPal provides sample
code that you can modify to implement
a listener that detects IPN messages.

The actions to take when your listener
is notified of an event are specific
to your needs. Examples of the kinds
of actions you might take when your
listener receives an IPN message
include the following:

Trigger order fulfillment or enable
media downloads when a check clears or
a payment is made Update your list of
customers Update accounting records
Create specialized “to do” lists based
on the kind of event You are typically
notified of events by email as well,
but the IPN message service enables
you to automate your response to
events. The following diagram shows
how events can occur and how PayPal
responds with IPN messages that it
sends to your listener:

IPN

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文