捕获paypal的付款

i just trying to figure it out how to capture payment using php. I have got transaction id using paypal DoDirectPayment - 'Authorization' method. Now i am stuck as i am not finding any way out. When i log into my paypal account i can see payment with status "Capture". But i want To capture payment using PHP. Below is the response i got using Do direct "Authorization"

TIMESTAMP:  2013-11-21T12:13:41Z 
CORRELATIONID:  b414c9ae6cae
ACK:    Success 
VERSION:    65.1
BUILD:  8311702
AMT:    1.00
CURRENCYCODE:   USD
AVSCODE:    X
CVV2MATCH:  M
TRANSACTIONID:  2AF04265L6353****

Any help or suggestions would be appreciated.

You can capture authorizations using our DoCapture API.
Documentation for this API is available here, but basically a request would look like this:

USER=your_api_user
PWD=your_api_password
SIGNATURE=your_api_signature
METHOD=DoCapture
AUTHORIZATIONID=authorizationid_from_dodirectpayment_response
AMT=amount_goes_here
CURRENCYCODE=currency_codes_goes_here
COMPLETETYPE=complete_or_not_complete

You can use Paypal IPN (Instant Payment Notification). This basically means that you can include a call back url which can be used to initiate a notification from Paypal.

Paypal IPN

Paypal will notify your PHP application with details of the transaction, if it's successful etc. In your script (which is defined in the IPN url) you can then process the response. For testing, it's very handy to be able to output the transactions to a log file in Apache as you won't be able to directly see when Paypal actually does the IPN.

Note: Paypal will need to be able to connect to your server in order for this to work so if you are using a local host in development it's not going to work.