2
I have PayPal PDT (Payment Data Transfer) enabled on my PayPal account, and I have auto-return turned on, pointing to a "Complete_Paypal_Order" page on my site.
When a customer makes a purchase, and they pay using PayPal's site, they are sent to a page which will redirect them back to my site within 10 seconds. If the customer waits for the redirect, the GET request to my site contains the transaction id, just as it is supposed to.
If, however, the customer clicks the link on PayPal's redirect page that says "If you are not redirected within 10 seconds, click here," the transaction id is not passed to my site.
Has anyone run across this before, and if so, do you know of a solution?
Also, just to be clear, I am aware of some of the drawbacks of PDT, but suffice to say that, for various reasons, changing to IPN or API calls is not an option for the site at this time. So, please don't suggest "just use IPN" or "just use ExpressCheckout API calls."
A very rough history of PayPal integrations (forgive me if my dates are off by several years)
PDT: Circa 2002.
IPN: Circa 2004?
Express Checkout: Circa 2006?
I won't tell you to just use something else, but I will tell you this about PDT: It is a terrible choice, completely undependable for payment confirmation purposes, and suitable for extra informational purposes only. Basically, you can use it to display some transaction details if and when if the buyer does return to your site, since in many cases they may not return at all in such an API-less integration. For example, if they pay as a guest and PayPal is legally obligated to show them a receipt and they just close their browser treating that as the final confirmation.
Anyway, have you looked in the POST (not GET) for the PDT data?
As far was what you should be using, if you really can't implement an API, a client-side JS integration is at least somewhat more reliable: https://developer.paypal.com/demo/checkout/#/pattern/client
(But, something like the Express Checkout you mentioned (using current v2/checkout/orders API for 2 routes of 'Set Up Transaction' and 'Capture Transaction', documented here, and the server demo pattern paired with those 2 routes -- will of course be most ideal, whenever it does become an option for you)
Related
I'm new to PayPal and overwhelmed by all the possible approaches for integrating with PayPal.
As a start I want to implement one single subscription with monthly recurring payment. When the user returns to the site after fulfilling the payment, he/she will instantly be upgraded to "premium" member (digital product only - no shipping involved).
The first alternative I've looked into is the Express Checkout API, which looks ok, but is there any simpler way to do it?
Can I for example create a standard button (JS button or the form based), but still be able to verify the payment details when the user returns, using either the REST API, IPN or something else?
Any hints on best practices are appreciated.
Yes, there are entirely too many ways to solve this problem by now.
You can probably satisfy your requirements via buttons (aka Standard), Express Checkout (aka Pro) style APIs, or RESTful APIs, but there are a few gotchas to know:
First, PayPal has several products to do recurring payments; these products have functional differences and are tied to different integration styles. So (for example) PayPal's product called "subscriptions" (tied to Website Standard aka buttons) has different (and generally less flexible) capabilities than "recurring payments" (tied to Express Checkout) which in turn differs from "billing agreements" (tied to REST APIs, although the term "billing agreements" is also used in the express checkout recurring payments product). Oh, and there's another similar product tied to the Adaptive Payments suite of APIs.
Confused yet? Sorry. But it is important to determine whether the specific product you want to use will satisfy your requirements first before you do any integration, or you might end up redoing that integration work later (and potentially have to migrate customers, if you have already opened your business) in order to get access to specific features of another product later on. E.g., the subscriptions product has very limited ability for sellers to modify the subscriptions after they are set up. If that is OK, then great, use it -- it's simple to integrate. If I can oversimplify a bit: the Standard subscriptions product is the oldest and most limited; the Pro recurring payments is more flexible and mature; the REST billing agreement product is the newest, very flexible, but not yet as widely used; it may lack a feature you need today, but is the most likely to be continually improved going forward. I would not personally recommend the Adaptive product, although it also has its benefits.
Now, to your integration question: fortunately all these PayPal products can use IPNs. Unfortunately, IPNs are not instant. They generally arrive quickly (1-2 seconds) but delays can happen and it is quite awkward to be unable to process the customer. I would use IPNs only when shipping physical goods, not for immediate access to digital goods or in other cases where customers are waiting for a page from you. Fortunately, each of the other methods has a way to instantly determine the success of a PayPal action without waiting for an IPN:
Website Standard Payments will include GET or POST variables when it posts the user back to your site that will tell you about the outcome. If you use the Payment Data Transfer feature, these variables will include signature information so that you can post them back to PayPal & PayPal will verify their validity (so that a would-be thief could not fool you by engineering a post that looks like a PayPal success redirect).
The two API-based methods are even easier: the APIs themselves return all the information you need in the API response. So wherever in your code you make the call to create the subscription/agreement, if you get back a success then do your work to make your user premium.
There is the odd case of a user successfully paying and then getting "lost", as it were, e.g. the redirect failing/browser closing before they return to your site, or your site choking while trying to turn on the user. For this reason many people advise using IPNs, which PayPal will attempt to redeliver until you verify them back to PayPal. Not a bad idea, depending.
And of course you can call search & get details type APIs to get information about your transactions & agreements at PayPal -- although again, you will need to integrate with the right API that matches the product you are integrated with (e.g. Standard-based subscriptions won't show up if you ask the REST interface for billing agreements).
Hope this helps.
Hi I have searched for this solution and although others have experienced the same problem I couldn't find a solution that works for my site.
My wordpress site mainly sells registrations/bookings for events and I'm using the s2Memberplugin to process the payments with Paypal. The problem is that when we direct the users/customers to the paypal page to complete the transaction which i want set up with the option of paying via credit/debit card if the user/customer doesn’t have (or doesn’t want to create one) a paypal account. That has been working perfectly except for when users/customers are using a variety of internet browser with various cookie settings so the user/customer get’s directed to a completely different page both in appearance and functionality from the page I want them to see. This incorrect page ‘requires’ users/customers to have or create a paypal account to make the payment, no option to pay via card is available. I tried calling paypal and of course they say it is something wrong with my site.
Over 20 days ago i lodged a support ticket with Paypal MTS (or whatever they are called) and of course no response. I have lodged about 5 more tickets and made about 10 more phone calls and they simply don't care about customers. That is clearly demonstrated when you ask to speak to the complaints section and they say "We don't have a complaints section'
Thanks very much, any assistance is greatly appreciated
I haven't been provided with any error codes, unfortunately - i did ask for them but nobody supplied them.
we just discovered that the payflow and IPN settings within my sites plugin were empty but i'm filling them in now but i have two questions:
The vendor, is that just my username for my paypal account? (why don't they just use the same terminology - confusing)
My s2Member plugin say's i'll need my IPN url (and then supplies a url, but whn i look at the IPN notification url within my paypal settings it's a totally different link. Should i be changing my paypal IPN url to that which is supplied by my s2Member plugin or am i getting two different url's confused?
Thanks for your help again mate.
If you're using Payments Standard this experience is cookie based as you mentioned. If you want to make sure the full credit card form shows up and allows people to pay with a credit card without creating an account you can use the Express Checkout API instead.
In your SetExpressCheckout request you just need to set SOLUTION=Sole and LANDINGPAGE=Billing.
I have PayPal PDT (Payment Data Transfer) enabled on my PayPal account, and I have auto-return turned on, pointing to a "Complete_Paypal_Order" page on my site.
When a customer makes a purchase, and they pay using PayPal's site, they are sent to a page which will redirect them back to my site within 10 seconds. If the customer waits for the redirect, the GET request to my site contains the transaction id, just as it is supposed to.
If, however, the customer clicks the link on PayPal's redirect page that says "If you are not redirected within 10 seconds, click here," the transaction id is not passed to my site. Instead, the get request looks like: "http://.../Complete_Paypal_Order?merchant_return_link=click+here&form_charset=UTF-8", no matter what the customer ordered. This happens in both sandbox and live PayPal sites.
Has anyone run across this before, and if so, do you know of a solution?
Also, just to be clear, I am aware of some of the drawbacks of PDT, but suffice to say that, for various reasons, changing to IPN or API calls is not an option for the site at this time. So, please don't suggest "just use IPN" or "just use ExpressCheckout API calls."
Related questions (as yet unanswered):
Paypal PDT - unable to get transaction ID.
Paypal PDT AutoReturn
I am trying to setup Google Analytics Ecommerce Tracking. I appreciate this can relatively easily be done using PDT but I can't find any reference to using the IPN page to track the sales (which makes sense because a user never actually visits these). We use IPN to track the successful orders and it makes sense to tie the tracking in with this as this is the point that a successful order is flagged. We could in theory use PDT as well to track the sales but this will not contain all of the information for the transactions and (more importantly) the sale may not have actually completed when the PDT variables are passed back. To me this makes it much less desirable as it won't always be completely correct. Does anyone know of any way to use the ecommerce tracking via the IPN page instead, or is this not possible (or not sensible for another reason)?
Thanks so much as ever guys,
Dave
I'm facing the same issue. There could be a part of a solution, that could lose some transactions, by doing this:
set a cookie on the user's browser just before he's redirected to Paypal (or on the final basket), when you set your Order ID.
the user is sent to Paypal
Paypal IPN is triggered
user goes back to your website (one day, he will!)
read the cookie you've set, on your «my account» pages for example, and if it matches an order:
Paypal status «Completed»: add the Google tracking code, using order ID, then delete the cookie
Paypal status not «Completed»: don't do anything
It's not 100% perfect, as some transactions may never be tracked, but at least it's the same user who executes the tracking code.
The payments we gather on our website are for online subscriptions and registrations for conferences. In both cases, we want to gather absolutely all information other than the payment information ourselves, and ideally pass some of it on to PayPal (so users don't have to fill in name, address, etc. twice).
I know there are solutions where the information is gathered by the server itself and then redirected to PayPal via a web services call but that's not an option, unfortunately. All secure payment information gathered has to happen off-server due to network policy.
In addition, not every form will need to be processed using PayPal. Some people will be paying via check, etc. so they shouldn't be sent to a payment page at all. Most solutions I've looked at have a "Pay with Paypal" button, so I assume a form post is necessary to go to the PayPal site, but ideally we'd want to get there via a 302 redirect. Is that at all possible? (I'm aware we could do something like a form that was auto-submitted by JavaScript but I'd prefer to not go down that route).
Whichever system we implemented would need to handle recurring (periodic) payments also.
Paypal has something called Payflow Pro. They bought it from VeriSign a few years ago.
You can use it to do a full integration with the paypal api. So that the user enters their payment details on your site, and your backend code submits the transaction to paypal's servers. Paypal will then give you a transaction id back. Keep the transaction ID, chuck everything else (like the card number) out the window.
We have several clients that use Payflow Pro. It's very good and easy to use api.
I'm not entirely sure I understand the full scope of your question, but I think I do. I've coded a number these conf. registrations (though I have not interfaced with PayPal...rather iTransact and Plug'NPay) and in my applications, I had to read through the API documentation for the system being used (PayPal in this case). Then I logged into the payment gateway and usually they have an html form generator. All this does, of course, is returns an html form with the fields labeled appropriate to their API (so the billing name and address carry over from your system to PayPal's and the user doesn't have to re-enter their information), shows you what hidden fields you'll need(like cutomer_id, etc) and the form POST path.
Then what I do is I have the user register, preview their order details on another page (where you can choose to drop their info into a DB or wait until AFTER their credit card is processed) and then upon confirmation, they go to PayPal, pay with either credit card OR check (the options always exist) and when they hit confirm, the passback URL you put into a hidden var somewhere, takes you to a custom Thank You page (and hopefully processing script to capture successful transactions) which can be hosted anywhere on your servers.
It's pretty simple, just a bit labor intensive at first as you try and figure out the new form variables specific to a payment gateway API.
Hope this helped!