"> 这是我的 Paypal 交易表格。我的交易运作良好。我想知道的是如何从 paypal 获取 customer-6ren">
gpt4 book ai didi

php - paypal交易成功/失败后,我如何才能知道客户ID?

转载 作者:太空宇宙 更新时间:2023-11-03 16:05:34 28 4
gpt4 key购买 nike

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="xxxxxxxxxxx@gmail.com">

<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">

<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="<?php echo $pro_title;?>">
<input type="hidden" name="amount" value="<?php require('inc/shipcalc.php');?>">
<input type="hidden" name="currency_code" value="USD">

<!-- success transaction and failed transaction url -->
<input type="hidden" name="return" value="http://httpwwwsachinsinghxyz.000webhostapp.com/su-pay.php" />
<input type="hidden" name="cancel_return" value="http://httpwwwsachinsinghxyz.000webhostapp.com/fa-pay.php" />

<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="images/paypal.jpg"
alt="Buy Now">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>

这是我的 Paypal 交易表格。我的交易运作良好。我想知道的是如何从 paypal 获取 customer_id 或 customer_name。因此,我可以在 payapl 交易后邮寄发票详细信息。我应该将表单数据中的客户 ID 变量发送到 paypal 吗?如果是这样,我如何通过 Paypal 将该 ID 取回我的网站。给我建议可能的方法

最佳答案

如果我对 PayPal 的理解正确的话,他们实际上并没有“客户 ID”,更像是交易 ID,当您从商店或类似的地方收到另一封电子邮件时,主要使用它。

例如,如果您查看以下内容:https://www.codexworld.com/paypal-standard-payment-gateway-integration-php/他们如何使用交易 ID 对其进行排序,这可能会引导您找到方向。

此外,对于通常使用 PayPal 付款的处理方式,商店随后发送的电子邮件通常包含交易 ID,但包含填写信息的客户的姓名。

例如Jon Doe 想在您的商店购物,但使用不同的 PayPal 付款,例如他的母亲。

所以在电子邮件中,它将是 Jon Does 的名字,但交易 ID 将指代母亲 PayPal 支付的款项。

希望这能有所帮助。

关于php - paypal交易成功/失败后,我如何才能知道客户ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46093122/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com