0

I have rolled out my own shopping cart website in PHP, and I want to add a "Pay Now" button which:

  • Sends the user to Paypal with a total amount payable
  • Allows the user to pay with or without a paypal account of their own
  • Prevent user from hacking around with the final amount (e.g. plain text attributes in HTML)

and I want a solution where I do not pay any monthly Paypal fees. But I'm finding the Paypal documentation seriously confusing, as well as other SO questions:

The Paypal documentation suggests that if I want a "Pay Now" button, the only option I have is to use "Hosted Sole Solution only". What exactly does this mean?

It also says "You cannot use hosted buttons with Hosted Sole Solution; you should use token buttons instead." Please forgive the stupid question, but this means if I want a Paypal "Pay Now" button, I have to use the "Hosted Sole Solution", which always uses "Tokens"? How exactly does the "Token" scheme work? Other questions suggest data is sent in plain text so can be hacked around with, yet the concept of tokens seems to suggest otherwise?

And last but not least, are there any examples of PHP code for the "Pay Now" button? I'm mystified why it all has to be so confusing!! (I'm comfortable with PHP, but to really understand how the Paypal "Pay Now" system works, examples would be ideal)

In case it matters, I will also want to use Paypal IPN, but I have done this before, so will regard it as a separate task, unless it has to be considered for the "Pay Now" button.

Community
  • 1
  • 1
Jodes
  • 14,118
  • 26
  • 97
  • 156

2 Answers2

1

The big factor here is going to be the fact that you do not want to pay a monthly fee. This will limit you to using PayPal Payments Standard / Express Checkout, both of which have no monthly cost.

PayPal Standard are your "Pay now" buttons. They are nothing more than an HTML post form and can be created within your PayPal account's button factory, or you can create your own forms.

PayPal Express Checkout is an API based solution which in the absence of a shopping cart platform will perform nearly identically to PayPal Standard. Express Checkout does not allow the customer to checkout as a guest by default, additional variables (solutiontype=sole) need to be passed with the initial API call.

It sounds to me like PayPal Standard is going to be the product you are after. Here is a link to the base "developer" guide for PayPal Standard:

https://developer.paypal.com/webapps/developer/docs/integration/web/

If you prefer to create the buttons through the PayPal system, login to your PayPal account, click 'Profile' in the top right, then select "My Selling Tools". Select "Update" next to "PayPal Buttons" and then click on Create New Button on the right side. The button builder is really a simple tool and will provide you with a complete HTML form to paste into your site's source.

  • Thanks - but the link you provided does not have an option for "Pay now" (i.e. for whole orders), it only has "Buy it now" (for single item purchases), "Add to cart", "Donate" and "Subscribe"? – Jodes Apr 19 '14 at 07:51
  • If you want to use a feature that allows one click to pay for multiple items you would need to either use Add to Cart buttons, or set your website up to build an HTML post off of the customer's cart contents, and pass that to us as a "Buy Now" button request. You can build a template form for a Buy Now button and leave the price field blank, and have a script fill that in based on the order amount of the customer, then pass that to us. – PayPal_Will Apr 21 '14 at 15:10
0

It turns out that what I wanted is the Express Checkout:

Jodes
  • 14,118
  • 26
  • 97
  • 156