JBWebWorks: the return hidden element sets the page that the user will be returned to from the paypal site
<input type="hidden" name="return" id="return" value="http://www.mydomain.com/checkout_success.php" />
jvorzimer358609: At his point in the transaction process, there is no way to know if the status of the transaction is success or failure.
this is the week point of using paypal payments standard.
paypal payments standard is not a real time payment process, when the user is sent back to your site, the payment has been added to a queue and will be processed through the merchant bank on a first come first served basis.
the success page only means that PayPal has accepted the payment method.
Paypal uses a service called IPN (Instant Payment Notification). IPN Will send a post to page you configure on your site with the details of the transaction once it is processed. see the following page for more details on IPN:
paypal standard is one of the more difficult payment gateways to configure properly, I strongly recommend using PayPal Payments pro just for the ease of use.