Paypal response slow - paypal

This is the process flow of a customer buying our service:
Create campaign
Select a payment method (credit card or paypal). User selects paypal
User is redirected to www.paypal.com and makes the payment
User is redirected to www.mywebsite.com/dashboard (return_url)
User sees his new campaign on the dashboard
When using the sandbox everything is working fine. When using the real service, when the user is redirected to www.mywebsite.com/dashboard, then the new campaign doesn't show up among the records.
I made extensive testing and found that with the live service PayPal gives me the response about 5-10 seconds later than when I am using the sandbox. So when the user is redirected to the his dashboard, the new purchase is not yet inserted into the database that's why it doesn't show up! They need to manually hit F5 after a couple of seconds to display the new record.
What can I do about it?
EDIT
I managed to bring up this delay problem with the sandbox as well. I found that there is a difference between the demo and the live payment:
In the sandbox, after the payment I see a window with the title Your payment is complete saying that I completed the payment, this is the transaction code, and the details will be sent to my email address soon, with two options: Back to the seller account (Back to [sandbox seller account]) and go to the paypal account overview. When I click the first one, it opens another window with the title Thanks for your order saying
Your payment of $0.99 USD is complete
If you are not redirected within 10 seconds, click here.
In the live system after I click Pay Now and the payment is complete, then the first screen does not show up, meaning right after the payment the Thanks for your order page is seen then I am redirected to my website (dashboard) within a few seconds.
How could I generate this delay problem in the sandbox?
In the sandbox when the screen shows up about the completed payment when I click quickly the Back to the seller account link, then I click quickly the click here link on the next screen in order to skip the redirection time, the new purchase does not show up on my dashboard on my website, because the data is not yet written into the database.
So the loading of the Your payment is complete window in the sandbox plus the time I click the Back to the seller account link is enough for paypal to give me the necessary data and for me to insert it into the database.
I guess the solution could be to activate that first screen in the live system, but how? What do you think?
I thought the solution would be to turn off Auto return but I can't. When I turn it off and click Save, I receive an error You have not turned on Auto Return. You must turn on Auto Return in order for Payment Data Transfer to work properly.

Start with adding Payment Data Transfer and Auto Return to PayPal Payment Data Transfer Information.
This is from the official PayPal Documentation:
Payment Data Transfer allows you to receive notification of successful payments as they are made. To use Payment Data Transfer, you need to turn on Auto Return. Here's how:
Log in to your PayPal account.
Click Profile.
Click My selling tools.
Click Update near "Website preferences".
Select On under "Auto Return for Website Payments", and enter your Return URL below.
Select On under "Payment Data Transfer".
Click Save.
The identity token will then appear in the Website Payment Preferences page of your PayPal account under the "Payment Data Transfer" section. For security purposes, we do not email you the identity token.
You'll need to pass this identity token along with the transaction token to us so you can receive confirmation that the payment is complete.
The slow load can be caused be a number of factors. One of which may be code related. Can you please post some code if you have already enabled Payment Data Transfer, and Auto return?

Related

PayPal Express Checkout Integration does not fully complete the transaction

I'm implementing the v2 Express Checkout Paypal Integration; It works fine, however it does not fully complete the transaction (business account does not receive the payment).
I'm running tests on sandbox.
The token is generated as well as the Order ID.
I copy and paste the given link into the URL bar and press enter to proceed to complete the transaction. https://www.sandbox.paypal.com/checkoutnow?token=2463323E24235WQ.
The transaction is completed and redirects to a new URL https://example.com/return?token=2463323E24235WQ&PayerID=UEJ2NE9233DS5W.
Everything seems to work well, however when I come to check the notifications of the sandbox business account (in which the payments were supposed to go to), it does not show any payment.
Everything seems to be set accordingly but the payments just don't go to my account.
transaction is completed
Nope, wrong; the buyer approved the payment. There is no transaction.
To create a transaction, when the buyer returns to e.g. https://example.com/return?token=2463323E24235WQ&PayerID=UEJ2NE9233DS5W , you must display an order review page and capture the order with the appropriate API call.
If you want to capture the order immediately (skipping the display of an order review page), you can specify this in the initial order setup so that the "Continue" button the buyer clicks to return to your site instead says "Pay Now".

How to resend PayPal ipn data?

Because of some reason, I lost a PayPal IPN data log. Does PayPal have an option to resend the ipn data or what can I do? Is it possible at all?
Yes, as long as it's been less than 28 days since the IPN was generated. Log in to your PayPal account; then, depending on what your account layout is, do one of the following:
(Most business accounts in the live environment) Click on Profile >> Profile and settings >> My selling tools. Find Instant payment notifications and click the Update link directly to the right of it. Then, find the link that says IPN History page and click on it.
(Older Website Payments Pro accounts) Click on Profile, then click Instant Payment Notification preferences (under the Selling preferences heading). Find the link that says IPN History page and click on it.
(Most business accounts in the sandbox, some business accounts in the live environment) Go to History >> IPN History.
This will bring you to a page that will let you search for any IPNs that were generated for your account within the last 28 days. Once you find the IPN in question, click the checkbox to the left of it, then click "Resend Selected".
A couple of things to note:
PayPal will only resend the IPNs to the same endpoint they were originally sent to. If you screwed up the URL, too bad.
The IPN may not be sent instantly. The resend request is placed into a queue (like all other IPNs) and processed later. In most cases, you should see the IPN sent within a few seconds to a few minutes.

Update database after paypal payment successful

i want get transaction id from paypal after customer already paid by paypal account to update my database Please Help.
if you want to get the transaction ID from your PayPal account just login into your PayPal account and go to the "Transaction History", now next to each transaction you can click on details and you can see the transaction ID. If you mean to get this detail through customized code please explain in details your request, Thanks, Andre.
IPN is a message service that notifies you of events related to PayPal transactions. You can use it to automate your back-office and administrative functions and get information on transactions.
In order to use this feature you need first to activate it on your account.
1) Access your PayPal account (www.paypal.com)
2) Click on Profile
3) Click on Instant Payment Notification Preferences
**Please note that if you have new Layout on your PayPal account you need to click on My selling preferences and then on Update just beside Instant payments notifications
4) Click on Choose IPN Settings
5) Add a Notification URL (you must have a listener ready, examples below)
6) Make sure to check IPN messages on Receive IPN messages (Enabled)
7) Click on Save
Make sure also to check every value of the variable notify_url (if you use WPS) in every PayPal button or PAYMENTREQUEST_n_NOTIFYURL (if you use Express Checkout). Their value can overwrite the value you wrote on your PayPal profile for Notification URL.
Please find below some useful links:
Instant Payment Notification:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
Setting up IPN:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/

Need help regarding IPN and paypal payment page

I'm working on a website where the users can create listings like in a regular classifieds website.
My concern is that if a user wants to feature his listing on the website, he has to make a payment via Paypal (IPN). The problem is that when the user completes the payment, the paypal payment confirmation page will give the user 2 links at the bottom of the confirmation page. The first one is "return to your website" and the second one is "view your paypal account".
If the user clicks the first link it will trigger the featured option and make his listing featured. However if he clicks the second link the user will be sent to his paypal account and will not trigger the featured option.
My concern is that users who will click the second link will pay however will not get the service they paid for. This portion of the website was done by my developer and he said that it would only work if the user clicks the "return on your website" link.
Would you guys have any suggestions or help on how to resolve this? If Paypal did not show the second link it would resolve this pb.
That's what IPN is for. If you enable it, PayPal will send you a payment notification. You should enable the feature for the user when you get the money, regardless of what the user navigates to.

Redirect to PayPal checkout before or after order confirmation

So I'm making a small shopping cart app.
The checkout project goes like this:
Collect user info -> Order confirmation page where all order data is listed -> User clicks OK and gets redirected to paypal -> User logins to his pp account -> Gets redirected back to my page, his pp account is charged, and is greeted with the message "Thank you for ordering here's your order code: xxx".
OR is this the preferred way:
Collect user info -> Redir to paypal -> User logins to his pp account -> Redirected back to my site, to the order confirmation page which includes all order's info and the message "Your account is not charged yet, pressing confirm will place the order and charge your account" -> User presses confirm, order is saved, charge is made
I think way #1 is better because its less confusing to the buyer, however I've seen some sites (including ebay) that work like way #2.
Which way would you prefer and why?
Thanks
If you want do something after "Redirected back to my site", e.g. some validation that may block few customers (say if you have some black list of PayPal accounts), then you want to go with option#2. If you will accept the payment anyway, option#1 is enough. Both options are widely accepted on many online merchants.
If I remember correctly, for option#1, customer will see "Pay" button when he confirm the transaction on PayPal, while for option#2, it will be "continue" since there's no immediate payment.
And for option#2, you have to call PayPal one more time to finish the payment (you may want to do it in back end so you can retry if anything went wrong), this will be an extra work to be trade off when compared with option#1.