Paypal IPN 消息

发布于 2024-09-08 10:52:56 字数 491 浏览 0 评论 0原文

我已使用贝宝将支付系统纳入我的网站。

在paypal中,我选择了IPN作为支付消息服务。

现在我对我的网站的流程有一些疑问,我不知道如何处理。

1)现在,如果用户名“A”已经支付了某些服务的费用,同时用户名“B”也在支付费用,那么我知道哪个用户支付了该服务怎么样? [ 意味着我应该在付款流程中包含哪些内容才能了解用户?我应该添加用户 ID 和我的商品名称,然后从 IPN 消息 url 中的商品名称获取该 id]

2) IPN 消息花费的时间是多少,BCZ 上次我检查支付模块时我不知道当我的消息是通过 paypal 发送的,但肯定需要时间,比如 3 - 5 分钟,现在我应该做什么才能立即在我的网站中获取付款状态 bcz 我希望这样,一旦用户付款,那么该服务就应该立即开始。

编辑:我可以在付款中包含任何自定义数据吗? Bcz 在 paypal 发送的 IPN 消息中,他们是一个由 paypal 发送的名为“自定义”的文件,所以要补充一点,如果我必须在我的付款表单中包含该文件。

i have included the payment system in my site using paypal.

in paypal, i have choose the payment message service as IPN.

Now i have some question about the flow my site, i don't how to handle it.

1) Now If the user name called "A" had paid for some service and at the same time user name called "B" is also making payment, How about I came to know that which user had paid for the service? [ means what should i include in my payment flow to know about the user? should i add the user id with my item name and then get that id from that item name in IPN message url]

2) What time is taken by IPN message, bcz last time when i was checking my payment module then i don't know when my message was sent by paypal, but it was certainly taken time say more 3 - 5 min, now what should i do to get the payment status immediately bcz in my site i want that, as soon as user had paid then that service should start immediately.

EDIT: Can i include any custom data with my payment. Bcz in IPN message sent by paypal, their is one filed called "custom" sent by the paypal so to add that if i have to include that file in my payment form.

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

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

发布评论

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

评论(1

地狱即天堂 2024-09-15 10:52:56

1.)
可以为此类设置自定义 HTML 事务变量,并且您必须相应地命名输入标记。您要保存的每个自定义字段都有两个输入元素。一项用于字段名称,一项用于字段值。

这些标签为自定义字段名称的 on0on1on2 以及 os0os1< /strong> 和 os2 用于自定义字段值。

我将发送值为“UserID”的 on0 和 os0 的实际 ID。

这些值将在 IPN 中表示如下:

os0 表示为 option_selection1

on0 表示为 option_name1

这是有关 PayPal 参数的信息

2.) 它们几乎总是在 5 分钟内,但我听说有时可能会出现这种情况显着更多。您始终可以创建一个 PDT 成功页面来消化 IPN 消息中的相同信息。这将是您从 PayPal 网站返回的页面,您的所有数据都将包含在请求中。只需确保您跟踪您仍然使用 IPN,以防交易成功但用户永远不会返回您的网站。我喜欢使用这两种方法,这样您就可以根据用户的交易自定义欢迎返回您的网站的信息。如果您这样做并拥有所需的所有信息,也可以处理订单。

1.)
there are custom HTML transaction variables that can be set for things like this and you will have to name the input tag accordingly. There would be two input elements for each custom field that you want to save. One for the field name and one for the field value.

These tags are on0, on1, or on2 for the custom field names and os0, os1, and os2 for the custom field values.

I would send on0 with a value of "UserID" and os0 the actual ID.

These values will be represented in the IPN as follows:

os0 is represented as option_selection1

on0 is represented as option_name1

Here's the info on PayPal's Parameters

2.) They are almost always within 5 minutes, but I have heard that from time to time there can be periods where this might be significantly more. You can always create a PDT success page that digests the same info that would be in the IPN message. This would be your return page from the paypal site and all your data would be included in the request. Just make sure you keep track of you still use the IPN in case the transaction succeeds but the user never makes it back to your site. I like using both methods so you can customize the welcome back to your site for the user based on their transaction. And if you doing that and have all the info you need, might as well process the order as well.

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