I'm introducing PayPal Digital Goods for Express Checkout on a web site. For an user who is logged in, a valid checkout results in an update in the user's profile on the website, which in order allows to access more content.
The owner wants to add support for clients which aren't yet logged in to the web site. We handled this by introducing a landing page with an unique URL, which the user is redirected to after payment and which can be used to create a new account or mark an existing account as paid. If the user doesn't want to do this immediately, the URL of the landing page is persistent and bookmarkable.
However, in case the client doesn't want to log-in immediately and fails to bookmark their unique link, we'd want to additionally send a confirmation e-mail which would contain the link.
Paypal sends a receipt e-mail to the buyer right after purchase. Can I somehow insert additional message for the client in that e-mail?
If not, is there any other PayPal API feature which would let me send a message to the client's e-mail registered with PayPal?
Unfortunately you won't be able add or modify the content in the email message sent by Paypal. They lock down those type of things for security purposes.
However, you can send your own confirmation email once you receive notification that the payment has been completed. Whether you are using PHP or another server side language, you should be able to collect the email address from the variables returned by PayPal and send a custom email using the mail function. Since you create a custom landing page for the user, you can simply send it from here.
Related
It is required to write a script in Python, with the help of which it will be possible to transfer funds from one PayPal account to another PayPal account.
input parameters:
Sender's e-mail
E-mail of the recipient
transfer amount.
For PayPal Checkout payments, the sender's email is determined by what they sign into or pay as a guest with. That payer email is not an input parameter prior to their reaching the PayPal Checkout, although one can be pre-filled by your system if already known--but cookies from previous logins might take precedence. (If you need to send money from a specific account without a payer signing into their sender account, that account's owner could request access to PayPal Payouts, which may or may not be granted depending on the business need and use case.)
For such PayPal Checkout payments to be sent to a specified recipient email, set a payee object in the purchase_units when creating the order (which happens on button click).
A server integration to create and capture the order via API with a backend is not required, but certainly recommended for a robust integration that acts on the API capture response. The Checkout-Python-SDK can be used to implement two routes on your server (one for create order, and one for capturing a given order ID. The client-side approval flow to pair with those two server routes is https://developer.paypal.com/demo/checkout/#/pattern/server.
I am selling my software on line, and using PayPal for payment processing. Every time someone buys my software, I get notified by PayPal, at which point I take the purchaser's name and encrypt it onto a unique password with which they can unlock the software. I e-mail this password to the user.
I'd like to automate this step, so that every time PayPal processes the payment, the user name is used to create an unique password, and the email is sent directly to the user. Is that possible from PayPal's side?
You have many options. For example:
PayPal - Instant Payment Notification. Basically, everytime one of
your clients buys your software PayPal will notify you using the url
you set in your button for IPN. Please check the documentation
HERE
Express Checkout. DOCUMENTATION
I need some clarification about the best way to combine paypal subscription in my website registration flow.
The steps for registration:
user chose a price plan by clicking on paypal subscribe button
the use complete payment on paypal form
the user return back to my site to fill registration form.
How can I be sure that the user that fill the site registration form payed for the subscription on paypal and didn't got directly to the registration page?
How can I know on which subscription button the user clicked and how much he paid?
Is there any tutorial that describes such a scenario and which api call I should do?
The smart subscription button has an on approval type of action with the subscriptionId. Use this to send to the backend (or your cloud hosted function) and it will do the follow:
check that its valid
use that paypal email and check that no user with that email exists
use that email to create a new account (add to auth and database with the subscriptionId, planId, paypalId, paypalEmail (incase they change away from this), name, etc.)
send that user a password change email / welcome email
respond with success and kick them to the success page which tells them to check their email and spam
Note: for paid-only accounts make sure you don't have an auth sign up page, only a paypal button subscribe page as the sign up page.
Since Paypal officially sends people here for support, I hope StackOverflow members will not burn me at the stake.
After the product is sold, I need in the paypal confirmation email
Temporary password sent so user can login to site with their Email and that password.
We will obviously need that email/password via api to authenticate user.
You cannot modify Paypal's confirmation email, given Paypal's API restrictions. However, you can send emails via your application, to your users upon successful payment.
PayPal will send you application a response code for each transaction (payment successful/unsuccessful), which you can use to handle your behavior.
I've got a web application with a form where users can sign up for a seminar. The process is currently as follows:
Register for seminar
Registration success page with Paypal Buy-Now button to make payment
Paypal payment
Registration completion page
At present, emails are sent to the admin and the user at step 2 after registering confirming their registration. This needs to be changed so that the emails are actually sent in step 4, after payment has been made.
The application is built in ASP.NET, and all of the code to send emails, etc is all done. I'm curious as to what is the best way to trigger a process on the main website using the users details after they have completed the Paypal payment process.
From what I can see, there are the following options:
Store the data in the session. When the user returns to the registration completion page, retrieve the information and send the emails. My concern with this is that I've worked on a project in the past implementing this and it never worked very well, with the session getting lost.
Store the data in the database. Have the Paypal redirect include the transaction details in the querystring to the return page, which can retrieve the registration details using the email address and send the emails. However, this may not work if the email address used on Paypal is different from the one used to register (which is quite likely in this scenario).
Post all the details to Paypal, so that they are included in the transaction. Downsides: Won't send confirmation email to the user, only the admin (and assuming that the Paypal email address is the same as the email to which payment notifications should be sent). Also not sure if this can be used with hosted buttons.
I'm sure this is a common problem, and any advice would be appreciated. Thanks.
Use paypal instant payment notification
When the order is placed on your site, put it into a db table, with whatever you need to record. I then have an OrderId (from the db table) that I pass to paypal as an 'invoice' field, this gets passed back via ipn with a payment status etc.