我对在网页中购买的 Paypal IPN(或其他方法)有疑问。
实际上,我使用 IPN“后台”方法设置如下形式:
<form id="TPVFORM" name='formTpv' method='post' action='https://www.sandbox.paypal.com/cgi-bin/webscr'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='business' value='[email protected]'>
<input type='hidden' name='item_name' value='MORE THINGS'>
<input type='hidden' name='item_number' value='99.00'>
<input type='hidden' name='amount' value='23.00'>
<input type='hidden' name='page_style' value='paypal'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='return' value='http://www.xxxx.com/web/payOrder'>
<input type='hidden' name='cancel_return' value='http://www.xxxx.com/web/payFail'>
<input type='hidden' name='rm' value='2'>
<input type='hidden' name='no_note' value='1'>
<input type='hidden' name='currency_code' value='EUR'>
<input type='hidden' name='cn' value='PP-BuyNowBF'>
<input type='hidden' name='custom' value=''>
<input type='hidden' name='lc' value='es'>
<input type='hidden' name='country' value='ES'>
<input type="submit" />
</form>
并在我的 Paypal 帐户中配置 IPN 检查 .PHP 文件的地址。
好的,到目前为止,一切正常,但有一个问题让我困扰:Paypal 有更多“付款”状态,“已完成”,“待处理”,“正在修订”。
如果付款状态为“已完成”,我会验证其他参数,并将订单保存在我的数据库中,但如果状态为“待处理”,则如果 Paypal 在以下情况下通过 IPN 发送通知,我不会保存订单:状态为“待处理”,“稍后”在状态为“已完成”时发送其他状态我没有问题,但如果只发送第一个状态“待处理”或“whaiting”或其他想法,我如何检查付款状态? ¿当状态发生变化时,Paypal 会向我的脚本发送一个 IPN 调用吗?
我迷路了..
i have a question about Paypal IPN (or other methods) to buy in a webpage.
Actually I use the IPN "background" method setting a form like this:
<form id="TPVFORM" name='formTpv' method='post' action='https://www.sandbox.paypal.com/cgi-bin/webscr'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='business' value='[email protected]'>
<input type='hidden' name='item_name' value='MORE THINGS'>
<input type='hidden' name='item_number' value='99.00'>
<input type='hidden' name='amount' value='23.00'>
<input type='hidden' name='page_style' value='paypal'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='return' value='http://www.xxxx.com/web/payOrder'>
<input type='hidden' name='cancel_return' value='http://www.xxxx.com/web/payFail'>
<input type='hidden' name='rm' value='2'>
<input type='hidden' name='no_note' value='1'>
<input type='hidden' name='currency_code' value='EUR'>
<input type='hidden' name='cn' value='PP-BuyNowBF'>
<input type='hidden' name='custom' value=''>
<input type='hidden' name='lc' value='es'>
<input type='hidden' name='country' value='ES'>
<input type="submit" />
</form>
And configure in my Paypal account the address of the IPN check .PHP file.
OK, to this point, all work correctly, but one question break me: Paypal have more "payment" status, "completed", "pending", "in revision".
If the pay status its "completed", I verify the other params, and SAVE the order in my DB, but if the status is, for example "pending", i DONT SAVE the order, if Paypal send a notificacion via IPN when the status is "pending", and "later" send other when the status is "completed" I no have problem, but if ONLY send the first status "pending" or "whaiting" or other think, ¿how i can check the payment status? ¿Paypal send one IPN call to my script when the status change?
Im lost..
发布评论
评论(1)
是。付款完成后,Paypal 将调用您的 IPN 脚本,即使在最初购买时处于待处理或类似状态。
PayPal 开发者网络中提出的问题
YES. Paypal will make a call to your IPN script when the payment is Completed, even if at the initial time of purchase, it is Pending or similar.
Question asked in the PayPal Developer Network