PayPal "Buy Now" Link? - paypal

I see in PayPal how to make a Buy Now button. However, the code behind that is a form that POST to PayPal. Is there a way to create a link to a PayPal payment page with all of the relevant information (e.g. item name, price, custom customer fields to request, discount coupon field, etc.)? I want to be able to include this link in emails/SMS. I only have one item to sell and it's for a certain price, unless a valid discount coupon is applied, then it's for a set lower price.
I will want to put a Buy Now button on my site to do the same thing, but I do need a link I can email/SMS as well. Is there a way to do this?

Yes, PayPal website payments standard URLs work via either GET or POST, so you can take the same variables and put them in the URL string. So for example:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=foo#yourcompanyhere.com
However, I'm not sure if this is an "offical" feature; while it has worked for at least the last dozen years so I would be comfortable using it in an email, I would recommend keeping your primary website integration using form posts.

Related

Using Paypal (or alternative) so my customers can sell items directly

I've been searching Paypal's products and docs and I can't seen to confirm or deny if Paypal is a solution for what I need, so wanted to ask the community.
I run a web platform for creators to spin up websites. One common request is to create a page for them to sell their merch. I don't want to re-create Shopify/etc.. so have been telling them to go use that and link to their store from their website. But I'm wondering if there's an easy way to give them a very basic store experience using standard Paypal Buy Buttons.
My ideal approach:
Create a ShopItems model and users add items with price, description, shipping cost.
User adds their Paypal merchant ID
I generate a Buy with Paypal button that simply sends info to Paypal about the product being sold, how much to charge, etc..
I dont need any shopping cart functionality, and I dont want to have anything to do with the payment. I just want the end customer to feel like they're purchasing something (not sending someone $ via venmo), and have a place to add their shipping info, etc..
Currently, I see how a user can create accounts in their paypal account and then they're given a specific button for that item, but I'm trying to make this a little simpler where the user creates the product in my system and I just use Paypal for invoice/payment.
Would love any thoughts / ideas.
Integrate a version of PayPal Checkout: https://developer.paypal.com/docs/checkout/
Some sample demo code here: https://developer.paypal.com/demo/checkout/#/pattern/client (use the server version if you need robust payment completion notification -- this requires implementing two routes on your server, one for 'Set Up Transaction' and one for 'Capture Transaction', documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/ )
If you know the merchant ID you're processing transactions for, this can be specified when loading the SDK: https://developer.paypal.com/docs/checkout/reference/customize-sdk/#merchant-id
Whether or not you specify a merchant ID on the SDK line, that same or some other identifier needs to be specified in the purchase_units payee object when setting up the transaction: https://developer.paypal.com/docs/checkout/integration-features/custom-payee/

PayPal Pay Now Button - Email Link

I have browsed this forum and been through the PayPal documentation but I am confused. I know what I need but cannot work-out how to specify it for my coder.
We have a .Net application that runs on our internal network. We use this application to create customer quotations. These quotations are emailed to our customers. I simply want the application to be create a link that I can send to the customer such then when it is opened it takes them straight into Paypal and allows then to make a payment for the quotation. Or maybe the link is embedded into the body of the quotation that I send. Either would be fine.
I know of programs that do this (Sage Line50 does it with Sagepay rather than PayPal) but I cannot get my head around the process. Most of my research is talking about taking payments from an external website but trawling through the PayPal documentation it looks like it should be possible. But I cannot figure out whether I need Smart Buttons or PayPal Me. The key thing is that I don't want to force customers to have a PayPal account so guest access must be an option.
Smart Payment Buttons would be ideal, and offer the best payment experience to your customers. However, they require your own server on which to host some HTML/JS for them. They do not offer a link that can take the customer directly from an email to a PayPal checkout.
I recommend using Smart Payment Buttons, if you are able to host one. The flow is:
Email -> page on your server with Smart Button -> PayPal payment.
The key thing is that I dont want to force customers to have a PayPal account so guest access must be an option.
PayPal.me does not meet that requirement
If your requirement is truly a link that proceeds directly:
Email -> PayPal.com checkout for payment (no webserver of yours) ... well, there two solutions for this.
One is to use PayPal invoicing, which can be emailed directly by PayPal, or can be a link which you share yourself (via your own email). A PayPal invoice can be created manually via: https://www.paypal.com/invoice/create . Or programmatically via the invoicing API (see developer.paypal.com)
The second way, which may work fine but is a very old web 1.0 way of doing things, is to start by going to http://www.paypal.com/buttons and create a Buy Now button for an item named "Placeholder", amount "777.88". Expand the section "Step 2", and uncheck the option to Save the button at PayPal. Do not change any of the customization options, particularly ones that add menus or input fields.
Once you have generated the code, click the option above it to remove code protection, and then switch to the E-mail tab.
This will give you a plain HTML link with a description and amount that can be set dynamically by your developer when sending your own email. Additional useful variables, such as invoice (for an invoice number that is unique for what is being paid for, and can't be accidentally paid twice) are documented here.
Again, Smart Payment Buttons should be preferred if you have a web server to act as an intermediary. Here is a skeleton demo of the experience.

Is it possible to generate PayPal payment links that are valid for a certain amount of time?

Let's say we have a hotel booking system and we want to receive payments via PayPal.
When user goes through the booking process he / she ends up on the page that says "complete your payment here" which is a link to PayPal.
Because this link is in a different system (PayPal) it would be nice if it would be valid for a certain amount of time. Otherwise I can open this link after one day and pay while my real booking was already cancelled.
===
The only way to implement something similar I have found so far is to use option "Can customers buy an item when it is sold out?".
The idea is to have a link like this:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&charset=utf-8&business=email-is-here&item_name=Prepayment+of+booking&amount=1&currency_code=USD&notify_url=https://my-booking-mega-system.com/pingback&first_name=fn&last_name=ln&expires=1433234400000
PayPal does not provide this functionality.
However, you could build it yourself:
You can add arbitrary functionality (such as checking an expiration date, or inventory, or offer conditions...) by having the "payment" link go to your website rather than PayPal's, do the checks, then redirect to PayPal.
Just respect PayPal's branding rules (I have not checked them recently but they may not let you use their regular button to silently go to your site, but might require that you use a "buy now with PayPal" button or something).
Using PayPal REST SDK you can generate new links to be used by users for checkouts. So every time a user makes a request e.g clicks a button "complete your payment here" a new link is generated for the particular service. So no need for embedding an old link to the button.
Their SDK supports most of the programming languages
and also check out their GitHub for examples and usage.

Paypal checkout. Customize "Cancel and return to" text.

I'm developing a marketplace which allows users to list items for sell. When an user buys something my application calls the PayPal API and sends the buyer to the Express Checkout page. I've been able to change the logo on the header and some other fields, however I'm not able to change the text "Cancel and return to -selleremail-". I would like that instead of the -selleremail- it showed my website name. According to what I been reading so far, you need a PayPal business account to change this text, however, I've seen that for instance on Etsy, in the same checkout page, they have managed to change this text, even if they, like me, aren't the receivers of the money.
Any idea?

How can I(or Paypal) validate post data that is sent to Paypal from a button on my site?

I'm using paypal website standard and passing my order id that is generated on my site via item_number field. I was wondering, how does paypal know that the content in the form has not been altered by user? For example, someone could just change the amount of $10 to $5 and paypal would not not have any way of knowing. I've doe this before with other payment processor, and they make me send them md5 hash of amount and some other data + secret key, but I am not sure if paypal has this?
Based on this article, I believe it depends on whether or not you are using "Payment Data Transfer". If you're just using a button, then you'll need to manually verify the payment amount before shipping. If you're using PDT, you should be able to verify the payment_gross amount sent back in the response from PayPal.
Your right -- in general you can't keep someone from altering your data. If you must use PayPal (yeah, I know, no monthly fee) so far as I know you have three options:
Let PayPal host your button data. But this gives you little control over the process.
Manually verify each transaction, checking price etc before shipping item.
Using their API to receive completed transaction to automatically check data.
Another thing to watch out for is calculation of sales tax. PayPal's approach was too simplistic for our needs, which forced me to take control of the checkout process.
See this link.
you should try to implement it using ipn, pdt is prone to not passing the variables from paypal to your website if the user does not press the "go to store" button. as what others had answered hosting your button would make it secure at the cost of flexibility. Here is a link on the variables that could be altered on hosted buttons https://www.x.com/people/PP_MTS_Haack/blog/2009/11/11/override-variables-for-hosted-and-encrypted-buttons , as you would look into the variables, you cant really change the important ones.