Script for PayPal to action on receipt of money - paypal

I want to allow access to an article that I have written and is on my website. I have set up an account with PayPal Merchant. I have now got two articles in HTML on my site. One is the full article and the other is an abridged version. The abridged version asks the reader to pay the fee via PayPal. He is taken to PayPal, makes the payment and is then returned to the abridged article. I have a button on the site which loads the unabridged article when pressed.
What I want is for the reader to have access to the unabridged article once he has paid my fee. I would prefer immediate access but it can be after he has returned to the abridged article.
How can I achieve this? I need an appropriate script.
Any assistance would be gratefully received. Thanks.

Using PayPal "Buy Now" buttons, I would create a return page for each button and place a link to the respective product on the return page. Once the payment is successful the buyer would be redirected to the page with the download link.

Related

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.

How to integrate with Paypal suggested solution: "Add payment buttons to your website"

I hope to integrate Paypal using "Add payment buttons to your website" https://developer.paypal.com/webapps/developer/docs/integration/web/ since my site only needs one time purchase so this solution is perfect.
But it requires an IPN implemented as an async solution at the merchant side to receive the transaction result. While the button redirects user to paypal.com to finish the payment process. But after that is done. User is not automatically redirected back to merchant site.
I found on the forum that I can add an "data-return" attribute in the script element so when user is done paying there is an additional link that points to the merchant site. Now since IPN is asynchronous, once user views the "data-return" page, IPN may not have been called yet. My questions are:
1. So what's the suggested solution of synchronizing between return page and IPN?
2. When testing, I found a lot of query strings are appended to the "data-return" URL, looks related to transaction result. Can I use them to replace IPN so I have a SYNCHRONOUS way of verifying the transaction result?
Thanks!
Use Payment Data Transfer (PDT, for short). https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/paymentdatatransfer/

PayPal won't automatically redirect to my site after payment complete

For some reason PayPal won't redirect to my site after a payment is confirmed.
I have set auto return and set a valid url.
I have set a hidden param of return to the same url.
It just shows me a payment complete page with a link back to my site (the same url as above). If i click this then it takes me back to my site - hence I know the url is valid.
I just want this to happen automatically, which is what is supposed to happen if I set these options is it not?
Why is paypal so cumbersome? Or am I missing the blindingly obvious?
I'm using paypal standard with a business account.
Go to profile website preference page and turn on the auto return option.
Edit:
In addition to the answer posted above, to turn on the auto return option, follow the below links:
Click on Profile underneath the My Account Tab
Click on My Selling Tools on the left hand side
Select the update option next to
Website preferencesReturn customers to my website after they pay with PayPal.
Locate the option to turn on Auto Return and proceed accordingly.
N.B. Over the past weeks trying to implement PayPal, I have come to understand that Paypal have a very confusing website and documentation and very often you may find contradicting things. So please note that the set of links above may change at a moment's notice. - DottoreM
From #AlexSchimp's comment above:
If the user pays with a credit or debit card, and doesn't log into PayPal it won't work. It only works if the user logs into their PayPal account.
The "Website payment preference" auto return URL functionality will only work for the payments processed via "WPS (Website Payments Standard)" i,e PayPal HTML button integration payments.
<input type="hidden" name="return" value="http://example.com/returnurl" />
OR
Check this URL:
https://www.paypal.com/in/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside.
I hope it will work for you.
Thanks
Poonam (http://www.web-technology-experts-notes.in)

How can I cancel a paypal recurring payment from my website?

I'm currently integrating the paypal recurring payment process in my website (thanks to https://www.paypal.com/uk/cgi-bin/webscr?cmd=_pdn_subscr_techview_outside) and, for the moment, it works.
But I have a simple question, and I don't find the answer on Internet. Let's say a user deletes his account on my website after 2 months. How can I cancel automatically his subscription ?
Thank you!
It takes a bit of effort to find, but Paypal does publish a guide on subscriptions.
To cancel someone's subscription, you need to create a link to Paypal -- see page 171 of that reference. There doesn't appear to be an API which allows you to cancel their subscription for them: they need to click a link to Paypal and cancel the subscription themselves.
The guide actually says
Paste the code onto you webpage [sic] near text that explains how subscription cancellations work.
Apparently it's possible to cancel recurring payments with the API. See:
Can you cancel a PayPal automatic payment via API? (Subscription created via Hosted button)
This is certainly more complex than the "unsubscribe" button that paypal gives you, but... it could actually work. The "unsubscribe" button requires that people's payments are coming from their PayPal account, which is not the case if they set up recurring payments on a credit card (without logging into PayPal.)

integrating paypal check without leaving your site

I want to integrate paypal in my website. But my requirement is, I dont want my customers to go into paypal site for payment. (I know it is not a secure way, but it is my requirements) Is there a way such that I can do credit card checks in backend using paypal APIs ? If so, which method to be used? I want it for "singapore" country and SGD as currency.
Waiting for your suggestions!!!
Thanks in advance. :)
Are you trying to avoid your users having to navigate to PayPal or are you trying to 'hide' the use of PayPal?
The prior should be easy enough to resolve. PayPay provide several tools (and instructions) on how to build a "Pay Now" button, which you can manipulate server side to include a dynamic amount and order ID etc. This would forward the user to a PayPal page to login and confirm payment, then return them to your site (any page you specify) on completion. You can also link this to an IPN. The PayPal payment page can be skinned / branded to an extent.
What you are looking is called Direct Payment. Here is more info about it:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPDirectPayment
Maybe you are looking for this Paypal product