PayPal mc_gross在使用不同货币支付时是否会变化?

huangapple go评论62阅读模式
英文:

Does PayPal mc_gross vary when paying with different currency

问题

我对PayPal和IPN的一个简单问题感到困惑。

我计划使用IPN来在购买时向客户发送自动邮件。

假设我在PayPal支付按钮中设置了我的应用的固定价格为19.99欧元。

如果客户以美元下订单,那么“mc_gross”是否仍然包含欧元的价格?

如果不是,我该如何处理下面的情况?

我的意思是我必须在我的IPN处理程序中检查价格。

以下是一些代码(注释不是我写的):

/* 在处理交易之前检查这4件事,根据您的需求处理它们
1. 确保返回的业务电子邮件是您的业务电子邮件
2. 确保交易的支付状态为“已完成”
3. 确保没有重复的txn_id
4. 确保支付金额与您为物品收费的金额匹配(防止价格操纵) */

if ($_POST["payment_status"] == "Completed"
            && $_POST["item_name"] == "MyApp"
            && $_POST["mc_gross"] == "19.99") {
    ...
    ..
    .
}
英文:

I'm confused about a simple thing regarding PayPal and IPN.

I'm planning to use IPN to send automated emails to customers on purchase.

Let's say I charge a fixed price 19.99€ for my app - as set in PayPal payment button.

What if the customer orders in US dollars - does "mc_gross" still contain the price in euros?

If not, how do I handle the situation below?

I mean I have to check the price in my IPN handler.

Here's some code (comments not by me):

/* CHECK THESE 4 THINGS BEFORE PROCESSING THE TRANSACTION, HANDLE THEM AS YOU WISH
1. Make sure that business email returned is your business email
2. Make sure that the transaction’s payment status is “completed”
3. Make sure there are no duplicate txn_id
4. Make sure the payment amount matches what you charge for items. (Defeat Price-Jacking) */

if ($_POST["payment_status"] == "Completed"
            && $_POST["item_name"] == "MyApp"
            && $_POST["mc_gross"] == "19.99") {
    ...
    ..
    .
}

答案1

得分: 1

你收到的一切始终是交易中指定的货币价格(作为按钮或API调用的一部分)。

如果交易是以欧元进行的,但客户使用不同的货币支付,比如美元,这将是不可见的。货币转换只发生在客户和PayPal之间。

英文:

Everything you receive is always the price in the currency specified for the transaction transaction (as part of the button or API call)

If the transaction was in euros but the customer payed with any different currency, such as dollars, this will be invisible. The currency conversion is between them and PayPal only.

huangapple
  • 本文由 发表于 2023年7月3日 16:47:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76603199.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定