现在我想为当前用户将已确认的付款(即金额、日期等)-6ren">
gpt4 book ai didi

javascript - 检索和存储 Paypal 订阅

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

我正在使用 Paypal 订阅付款,当用户在注册后输入订阅时。

下面是向用户收费的paypal代码:

<form id="myForm" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="">
<input type="hidden" name="lc" value="CA">
<input type="hidden" name="item_name" value={{currentUser.get('plan')}}>
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="0.01">
<input type="hidden" name="p3" value="1">




<input type="hidden" name="t3" value="M">
<input type="hidden" name="return" value="">
value="">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest">

</form>

现在我想为当前用户将已确认的付款(即金额、日期等)存储到 Parse 中,但不确定如何操作。任何帮助将不胜感激。

如有任何帮助,我们将不胜感激。

更新:success.php?tx=6BA48179L4889664N&st=Pending&amt=0%2e01&cc=CAD&cm=&item_number=&sig=Hfh95Y%2fv8XTcl9zZasPjTwswbzJ2CRgSxRX%2f5U%2fmtDxQQk1cCOpuUH 4awkCCGSQsI%2fgQnNeg%2bKUa7a9p0UPwNHQgL%2bST1aonNptQBSXKCVqAlVGY9QMb%2bQJJk2QMxttgKxysFZnBaKxBxLl8E2vbtLNsDflWf%2fJfT2eCMnSlzSc%3d ,我需要获取我尝试使用的金额、货币和交易

<?php
//Getting payment details from paypal
$amount = $_GET[‘amt’];
$currency = $_GET[‘cc’];
$trx_id = $_GET[‘tx’];
$invoice = mt_rand();
//inserting the payment to table


echo "$trx_id";

?> 但它不起作用

最佳答案

PayPal 可以使用此处描述的 PDT/IPN 变量向您返回有关订阅的信息:

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id091EB0901HT

如果您从 PayPal 获取订阅详细信息,您应该使用 PDT 或 IPN 来确保发回给您的邮件是合法的。

但是,由于您必须首先获得订阅详细信息才能将它们发送到 PayPal,因此您可能会发现自己以原始格式记录信息比从 PayPal 的变量重建信息更容易/更可靠。

关于javascript - 检索和存储 Paypal 订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28300655/

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