Http 如何从sandbox paypal获取事务Id

Http 如何从sandbox paypal获取事务Id,http,grails,paypal,Http,Grails,Paypal,这是我的问题 <form name="_xclick" action="https://www.sandbox.paypal.com/in/cgi-bin/webscr" method="post" style="opacity:0;height:42px;background:red;left:0;top:0; width:100%;margin:0px;position:absolute;"> <input type="hidden" name=

这是我的问题

<form name="_xclick" action="https://www.sandbox.paypal.com/in/cgi-bin/webscr" method="post" style="opacity:0;height:42px;background:red;left:0;top:0; width:100%;margin:0px;position:absolute;">
              <input type="hidden" name="cmd" value="_xclick">
              <input type="hidden" name="business" value="walapaybusiness@gmail.com">
              <input type="hidden" id="paypal_text" name="return" value="${request.serverUrl}/marketProducts/productBuySuccess?productId=1&flag=10"/>
              <input type="hidden" name="cancel_return" value="${request.serverUrl}/dudewala/paymentSuccess" />
              <input type="hidden" name="currency_code" value="USD">
              <input type="hidden" name="item_name" value="Dude dollar">
              <input type="hidden" name="amount" value="10">
              <input class="paypalBtn" type="image" style="height:42px;width:100%;  " src="http://www.paypal.com/en_GB/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
              &nbsp;
</form>  
因此,我可以将事务
id
作为
params.transactionId

我在grails中做这件事,所以如果你能在grails中给出我的答案,那就太好了


提前感谢:)

贝宝将
交易ID
txn\u ID
名称一起发送给您。你也可以使用其他的,比如
付款人id
,等等。

:paypal如何发送?我使用的是沙盒paypal。我应该添加什么参数??你能写代码并解释吗?当paypal在你的URL中发回信息时。您可以使用事务id代码读取变量
txn_id
。请参阅Croises,我的返回成功url是在我的代码中定义的****这里没有任何变量名称txn_id。请查看上面的代码并给出一个清晰的想法。我正在定义我的成功url是!,您必须使用:
。无需询问信息,PayPal会将所有信息发送回。因此,当交易完成时,它会自动插入我在previus评论中提到的成功url,那么我如何在其中添加参数?
${request.serverUrl}/marketProducts/productBuySuccess?transactionId=123456789000