Paypal Payment Button - "Finish checkout" URL sometimes does not contain transaction details - paypal

We use "Paypal Payment Button " in our web-site.
From some reason the "Finish checkout URL" sometimes does not contain any transaction details, and arrives with no parameters, although we got the actual payment.
How can it be?

Related

PayPal express useraction not working when legacy fallback happens

Trying to Accomplish:
In checking out using PayPal Express lightbox pops up and displays "Pay Now." I bypass the order review page and send user to an order confirmation page that completes payment and displays confirmation.
Problem: PayPal will sometimes display lightbox overlay with "Pay Now" and sometimes redirect the whole page to a legacy paypal page that shows "Continue - You're almost done. You will confirm your payment on New Owner's Test Store."
Why this is a problem?
They get sent to an order confirmation page that bypasses an order review page, it would look strange if they click continue and they are immediately transferred to a payment success order confirmation page.
Technical details:
URL they are sent to after handshake for token-https://www.sandbox.paypal.com/checkoutnow?useraction=commit&token=&useraction=commit#/checkout/login
Fallback URL they sometimes get redirected to-https://www.sandbox.paypal.com/webapps/hermes/fallback?product=ec&reason=hermes_to_legacy&fallback=1&incontext=1&token=&useraction=commit
-The fallback URL shows users 'continue' even though I selected commit (ie.pay now)
What I don't know how to do:
I don't know how I can create a catch on the return URL in the response I get from PayPal so I know whether or not the user was shown a "Pay Now" button or a "Continue - You're almost done. You will confirm your payment on New Owner's Test Store." If they were shown "Pay Now", I want it to show a payment confirmation page, if they are shown "Continue" I want to not call the DoExpressCheckoutPayment and instead show a "Complete Order" button which will then call the DoExpressCheckoutPayment and show them then payment confirmation.
Note: I am working in the Sandbox.

Paypal express-checkout with option useraction=commit not creating transaction

I have integrated paypal express-checkout in a website. All seems to work fine. When customer is redirected to paypal for payment, the button Pay Now appears, since I am using:useraction=commit, i.e.:
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=MYTOKEN&useraction=commit
Customer logs in from Paypal and clicks on the Pay Now button. Paypal gives no error, everything seems to be successful and customer is redirected at the RETURNURL, but no transaction is created in the buyer or in the seller account.
I'm afraid I missed some points from Paypal API documentation.useraction=commit will NOT complete the transaction. After returning from Paypal, we still need to execute DoExpressCheckoutPayment in order to complete the transaction.
Like George said, useraction=commit does not complete the transaction. It only changes the PayPal UI so the customer feels they have confirmed it there, so you don't have to add confirmation UI on your site. You still need to make the request behind the scenes to confirm it.
PayPal's docs say this:
The useraction URL parameter in your redirect to PayPal determines
whether buyers complete their purchases on PayPal or on your website.
If you set useraction to commit, PayPal sets the button text to Pay
Now on the PayPal Review your informaton page. This text lets buyers
know that they complete their purchases if they click the button.
After PayPal redirects buyers to your site, call
GetExpressCheckoutDetails and DoExpressCheckoutPayment to have PayPal
complete the payment successfully. Call DoExpressCheckoutPayment
without waiting for buyer interaction. Use information in the
GetExpressCheckoutDetails response to fill out your order confirmation
page.

Paypal IPN with uncompleted checkout

I am aware of how to use paypal IPN to set an inventory after checkout has been completed, but there is one part of IPN I can not figure out.
When the user clicks "checkout with paypal" on the website, I would like to set the contents of the cart to "reserved" so that they are temporarily removed from inventory. Then, after a successful checkout, I will use IPN to permanently remove these items from the inventory. HOWEVER, if the user decides not to follow through with the paypal payment, my items are left in "reserved" limbo. IPN will not, as far as I know, report back to the site that the checkout session timed out or was terminated.
How can I get my inventory out of reserved and back on the site if a user bails out during paypal checkout, or walks away from their computer and lets the checkout session timeout?

Paypal Payment Standard: Callback URL

On Paypal Sandbox:
After logging in using a test account and then clicking the "Pay Now" button, the user is redirected to "Thanks for your order" page inside Paypal. The page has three(3) links below the message that says:
Return to Test Store
Go to PayPal account overview
Add funds from your bank
Clicking the "Return to Test Store" will redirect me to the return URL I specified on my query string. This marks the order as "Completed" or whatever the value of the payment_status returned by Paypal is.
The Problem:
Clicking the other links bypasses the return URL and goes to user account profile which leaves the order incomplete even if the transaction was successfully paid because the return URL has the script to mark the outcome of the transaction.
The Question:
Is there a way to bypass the Thank you page and just redirect to my return URL so the transaction can be concluded accordingly?
BTW, I have my Test Business Account set to autoredirect to the return URL after the order.
You want to read about PayPal's Instant Payment Notification and about Identifying Your IPN Listener to PayPal.
You have the option to be notified whenever a transaction takes place, regardless of what users clicks on. Paypal's servers will make requests to a Notification URL you provide and give you informations about that transaction.

How can I ensure a PayPal payment bounces back to my website to immediately credit a user?

Well I am working on a site that basically accepts PayPal payments to give their accounts a premium status, don't need to get into exact details of what it does but what I am trying to accomplish is to have a "Pay Now with PayPal" button that will accept the payment then bounce them back to my site with some kind of verification code so I can say "Okay, paid let me run this code to set your account to premium"
Any idea how I can do this? I can specify a success URL but it requires a user to click a button saying "Return to *" after they pay and even that gives them a scary warning message.
https://www.paypal.com/ipn