当人们在我的 Magento 网上商店中使用 PAyPal 成功付款时,它会自动创建具有唯一发票号码的发票。出于簿记的原因,我必须禁用它。
我已经搜索了几个星期了,但仍然没有找到这个问题的解决方案。据我所知,这是由IPN引起的。问题是我不知道如何在不损坏我的商店或贝宝付款的情况下关闭此功能。
更多规格:
- 版本:Magento 1.6.2.0
- 包含 IPN 的标准 paypal
文件:
www/app/code/core/Mage/Paypal/controllers
When people make a successful payment with PAyPal in my Magento webshop it automatically creates an invoice with unique invoice number. For bookkeeping reasons, I have to disable it.
I've been searching for a few weeks now but I still haven't found the solution for this problem. What I know so far is that this is caused by IPN. The problem is I don't know how to turn this off without damaging my shop or paypal payments.
Some more specs:
- Version: Magento 1.6.2.0
- Standard paypal
Files containing IPN:
www/app/code/core/Mage/Paypal/controllers
发布评论
评论(5)
“关闭它”有点含糊,但 Magento 端没有配置设置允许您使用 IPN 系统接受 PayPal 标准付款,但不能创建发票。您正在考虑编写自定义代码来执行此操作。以下是一些出发点。
PayPal IPN 使用回调 URL。也就是说,一旦 PayPal 处理了付款,它就会从 Magento 获取特定的 URL,并在 post 字段中包含一组特定的数据。然后,根据此信息,采取适当的操作(创建发票、发放信用证等)。因此,实现目标的最快方法是更改 PayPal 配置中的 IPN URL。这意味着 PayPal 仍会通知 URL,但不会通知 Magento URL,并且永远不会创建发票。
如果这不起作用或有不可接受的副作用,这里是您感兴趣的代码点。假设您使用标准 Magento PayPal 设置,并在
Magento 上配置了 IPN URL,将使用
indexAction< 处理此请求/code> 方法
此方法的业务逻辑(包括发票创建)从
paypal/ipn
模型开始。在标准系统中,这会解析为从此处跟踪代码的类,以找到您想要
重写
的方法并实现所需的功能更改(而不是创建发票)。最好的选择是设置一个 PayPal 开发者沙箱帐户,这样您就可以重复点击 URL,直到您将代码跟踪到正确的位置。祝你好运!
"Turning it Off" is sort of vague, but there's no configuration setting on the Magento side that will allow you to accept PayPal standard payments using the IPN system but not create invoices. You're looking at writing custom code to do this. Here are some starting points.
PayPal IPN works with a callback URL. That is, once PayPal has processed a payment, it fetches a specific URL from Magento with a specific set of data in the post field. Then, based on this information, appropriate action is taken (an invoice is created, a credit is issued, etc.). So the quickest way to achieve your goal would be to change the IPN URL in your PayPal configuration. This means PayPal is still notifying a URL, but not the Magento URL, and an invoice never gets created.
If that doesn't work or has unacceptable side effects, here's the code points you're interested in. Assuming you're using a standard Magento PayPal setup with an IPN URL configured at
Magento will handles this request with the
indexAction
method inThe business logic for this method (including your invoice creation) starts in the
paypal/ipn
model. In a standard system this resolves to the class atTrace the code from here to find the method you'll want to
rewrite
and implement your desired functionality changes (not creating an invoice). Your best bet will be setting up a PayPal developer sandbox account so you can repeatedly hit the URL until you've traced your code to the right spot.Good luck!
无需破解您的核心 Magento 文件,只需关闭 PayPal 中的 IPN 即可。
默认情况下,PayPal IPN 有以下三种状态:
开启
离开
残疾人
第一个选项允许您在 PayPal 个人资料中指定 IPN URL,并且您可以访问“历史记录”选项卡下的“IPN 历史记录”。您帐户的所有 IPN 数据都将发送到您指定的 URL,除非您在每笔交易的基础上使用 notification_url / NOTFIFYURL 覆盖它。
第二个选项将关闭您帐户上的 IPN,但您仍然可以通过在每笔交易的基础上设置 notify_url / NOTIFYURL 来使用它。这就是 Magento 使用的方法。
第三个选项将停止为您的帐户生成 IPN 消息,即使您的购物车(在本例中为 Magento)通过发送 notification_url / NOTIFYURL 专门请求 IPN 消息。不会传送任何 IPN 消息。
要将 IPN 设置为“禁用”,请首先在您的 PayPal 帐户中将其设置为“打开”,并提供 IPN 地址的 URL(尽管这可以是任何地址,只需输入 http://www.google.com/ 例如)。
启用后,查找标有“停止接收 IPN 消息(禁用)”的选项。使用它可以完全禁用 IPN。
来源:-https://lastdropofink.co.uk/tools/magento/magento -paypal-ipn/
instead of hacking your core Magento files, just turn off IPN within PayPal.
By default, there are three states for PayPal IPN:
On
Off
Disabled
The first option will let you specify an IPN URL within your PayPal Profile, and you'll have access to 'IPN History' under the 'History' tab. All IPN data for your account will be sent to the URL you specified, unless you override it with notify_url / NOTFIFYURL on a per-transaction basis.
The second option will turn IPN off on your account, but you can still use it by setting notify_url / NOTIFYURL on a per-transaction basis. This is what Magento uses.
The third option will stop generating IPN messages for your account, even if your shopping cart (Magento, in this case) specifically asks for IPN messages by sending notify_url / NOTIFYURL. No IPN messages will be delivered whatsoever.
To set IPN to 'Disabled', first set it to 'On' in your PayPal account and provde a URL to an IPN address (though this can be any address, just enter http://www.google.com/ for example).
Once enabled, look for the option stating 'Stop receiving IPN messages (Disable)'. Use this to disable IPN altogether.
Source:-https://lastdropofink.co.uk/tools/magento/magento-paypal-ipn/
如果我没猜错的话,您应该将 PayPal 付款方式的付款操作更改为授权。在那里查看更多信息:
http://www.magentocommerce .com/knowledge-base/entry/setting-up-paypal-for-your-magento-store#1.1
If I got you right, you should change Payment Action to Authorization for your paypal payment method. See more info there:
http://www.magentocommerce.com/knowledge-base/entry/setting-up-paypal-for-your-magento-store#1.1
或者,不用破解您的 Magento 核心文件,只需关闭 PayPal 中的 IPN。
默认情况下,PayPal IPN 有三种状态:
第一个选项允许您在 PayPal 个人资料中指定 IPN URL,并且您可以访问“历史记录”选项卡下的“IPN 历史记录”。您帐户的所有 IPN 数据都将发送到您指定的 URL,除非您在每笔交易的基础上使用 notification_url / NOTFIFYURL 覆盖它。
第二个选项将关闭您帐户上的 IPN,但您仍然可以通过在每笔交易的基础上设置 notify_url / NOTIFYURL 来使用它。这就是 Magento 使用的方法。
第三个选项将停止为您的帐户生成 IPN 消息,即使您的购物车(在本例中为 Magento)通过发送 notification_url / NOTIFYURL 专门请求 IPN 消息。不会传送任何 IPN 消息。
要将 IPN 设置为“禁用”,请首先在您的 PayPal 帐户中将其设置为“打开”,并提供 IPN 地址的 URL(尽管这可以是任何地址,只需输入 http://www.google.com/ 例如)。
启用后,查找标有“停止接收 IPN 消息(禁用)”的选项。使用它可以完全禁用 IPN。
Or, instead of hacking your core Magento files, just turn off IPN within PayPal.
By default, there are three states for PayPal IPN:
The first option will let you specify an IPN URL within your PayPal Profile, and you'll have access to 'IPN History' under the 'History' tab. All IPN data for your account will be sent to the URL you specified, unless you override it with notify_url / NOTFIFYURL on a per-transaction basis.
The second option will turn IPN off on your account, but you can still use it by setting notify_url / NOTIFYURL on a per-transaction basis. This is what Magento uses.
The third option will stop generating IPN messages for your account, even if your shopping cart (Magento, in this case) specifically asks for IPN messages by sending notify_url / NOTIFYURL. No IPN messages will be delivered whatsoever.
To set IPN to 'Disabled', first set it to 'On' in your PayPal account and provde a URL to an IPN address (though this can be any address, just enter http://www.google.com/ for example).
Once enabled, look for the option stating 'Stop receiving IPN messages (Disable)'. Use this to disable IPN altogether.
在过去的几周里,令我真正惊讶的是,有很多网站实际上没有启用此功能,而且它不仅限于自行构建,甚至非常昂贵的 Magento 构建也忽略了此步骤。
打开 PayPal 即时付款通知(简称 IPN)是一个好主意,因为这意味着当客户使用 PayPal 为商品付款时,付款信息将在管理面板中的 Magento 订单详细信息中更新。
只需几分钟即可启用,下面我将向您展示如何为您的 Magento 站点启用 IPN。这意味着,例如,当您通过 PayPal Express 收到订单时,您实际上可以在 Magento 中看到交易详细信息,并且如果您使用 eSellerPro 并启用了 eSellerPro 连接器来处理销售订单,您的订单和信息将显示在 Magento 中。付款详细信息将自动匹配。
设置不会花费太多时间,这里有 6 个简单步骤:
1 登录 PayPal
2 将鼠标悬停在“个人资料”上,然后选择“我的销售偏好”
3 在页面中间,单击“更新”现在
,输入以下详细信息:
通知 URL – 这只是 http://your-magento-store.com/paypal/ipn/ 将“your-magento-store.com”替换为您的网站地址。 <= 这部分通常会让每个人都感到困惑,因为他们不确定在这里输入什么。
IPN 消息 – 将其设置为“接收 IPN 消息(启用)”
按保存
就完成了。
要测试 IPN 是否正常工作非常简单,只需通过您的网站进行测试交易(您将需要一个辅助 PayPal 帐户),几分钟后,检查 Magento 管理面板中的订单是否已更新PayPal 交易详细信息。
为了帮助您,我放置了下面的图像,左侧的图像没有 IPN 详细信息,右侧的图像有。
What I’ve been really surprised by over the past few weeks is the number of sites that don’t actually have this turned on and it’s just not limited to self-builds even the really expensive Magento builds are missing this out this as a step.
Turning on the PayPal Instant Payment Notification (IPN for short) is an excellent idea as means that when a customer pays for an item using PayPal then the payment information will be updated on the Magento order details in the administration panel.
It only takes a few moments to enable and I’ll show you how to enable IPN for your Magento site below. This will mean that when you receive an order via PayPal Express for example, you can actually see the transaction details in Magento and if you’re using eSellerPro and have the eSellerPro Connector enabled for sales order processing, your order & payment details will match up automatically.
Setting this up won’t take more than a few moments and here are 6 simple steps to do this:
1 Login to PayPal
2 Hover on “Profile” and select “My Selling Preferences”
3 Halfway down the page, click on “Update” next to “Instant payment notifications”
Now enter the following details:
Notification URL – This is simply http://your-magento-store.com/paypal/ipn/ replacing “your-magento-store.com” with your website address. <= This is the part that normally trips everyone up as they’re not sure what to enter here.
IPN messages – Set this to “Receive IPN messages (Enabled)”
Press Save
That’s it job done.
To test whether IPN is working or not is dead simple, just make a test transaction through your website (you will need a secondary PayPal account for this) and a few minutes later, check on the order in your Magento admin panel has been updated with the PayPal transaction details.
To help you, I have put to images below, the image on the left has no IPN details, the image on the right does.