PayPal Question - How to recheck the status of a pending order?

Hi!

I am storing the transaction ID of a pending order and want to recheck the status of it from my website.

Does anybody know how to resubmit the transaction ID to PayPal inorder to find out the current status of that order?

Thanks in advance,
S:
LVL 5
prsupriyaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bendaltonCommented:
try the script on this url:
http://www.sandbox.paypal.com/cgi-bin/webscr?cmd=p/pdn/ipn-codesamples-pop-outside#php

it allows you to pass variables to paypal and get a response....

check out the other resources on sandbox.paypal.com for more info..

hope that helps
prsupriyaAuthor Commented:
Hi!

The above URL you gave checks to see whether the transaction id is duplicated or not. What I want is, I am actullay storing all the pending orders with the transaction id retuned and want to recheck to see whether the status has changed to "Completed". If yes.... then only ship the items.

thanks,
S:
bendaltonCommented:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=p/dmo/demo_ipn_1-outside

see the above demo url, and look in the comments for the code:
// check the payment_status is Completed

from the url:
"When you receive a VERIFIED response, you need to perform several checks before fulfilling the order (an INVALID response should be treated as suspicious and investigated)
After successfully completing the checks, you can update your database and process the purchase."

VERIFIED response from that code indidcates that the payment_status is completed...



.
bendaltonCommented:
https://www.paypal.com/cgi-bin/webscr?cmd=xpt/cps/general/SoftwareDevKit-outside

you can download their sdk in php..

in their examples,  using their code base:

<?php

require_once './request_base.php';

$d =& Services_PayPal::getType('GetTransactionDetailsRequestType');
$d->setTransactionId('16Y927061V203442U');

$response = $caller->GetTransactionDetails($d);
var_dump($response);


looks pretty straightforward to me
?>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
prsupriyaAuthor Commented:
Thanks! bendalton. I will try the above code and see.

S:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.