2015-02-07 46 views
1

是否可以在不使用IPN的情况下获取custom变量的值?不使用IPN访问自定义变量

我有一个非常简单的项目,不需要自动付款验证或类似的东西,一切都是手动完成的。我只需要喜欢付款页面上的一个输入以及该付款。

那么是否有可能从PayPal或PayPal付款收据中的付款确认电子邮件中的custom变量中获取信息?

退房按钮的例子:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal-form" target="_top"> 
<input type="hidden" name="cmd" value="_xclick-subscriptions"> 
<input type="hidden" name="business" value="[email protected]"> 
<input type="hidden" name="lc" value="US"> 
<input type="hidden" name="item_name" value="Item Name"> 
<input type="hidden" name="no_note" value="1"> 
<input type="hidden" name="src" value="1"> 
<input type="hidden" name="a3" value="10.00"> 
<input type="hidden" name="p3" value="1"> 
<input type="hidden" name="t3" value="M"> 
<input type="hidden" name="custom" id="payment-custom" value="CUSTOM VALUE"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest"> 
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
</form> 

所以我想拿到“CUSTOM VALUE”不使用IPN脚本,这可能吗?

回答

0
+0

安德鲁是正确的; CUSTOM字段被认为是机器可读的/有用的,但不一定是可显示/人类有用的(人们通常在ID字段中放置ID或者甚至复合键)。所以它不会显示在电子邮件中,但可以通过getTransactionDetails API(以及IPN或PDT)检索。它也会在事务处理流程结束时返回到您的站点,以便您的Web服务器可以捕获它并对其执行某些操作(包括通过电子邮件发送给您,或将其放入您管理的某个执行队列中)if这有助于。这不需要API集成。 – geewiz 2015-02-08 15:37:40

+0

如果您想在用户返回时处理网站中的CUSTOM字段,请参阅https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_websitepaymentsstandard_integrationguide.pdf中的“传递变量”部分。当然,如果你这样做,请确保你设置PayPal按钮来返回用户,并且要知道,如果他们的网络掉线(或者他们关闭了浏览器或其他东西),他们可能会付钱,然后不会返回。很少见,但可能会发生。 – geewiz 2015-02-08 15:39:01