Jo Erlang
Jo Erlang

Reputation: 327

Creating paypal buttons on the fly

I have a webapp, where users sell printing services, I want to allow my users to add a pay now buttons to their pages so customers can pay for their services.

My users specify their paypal email address etc in the settings and set up their services with a price etc.

What API should I use to create the pay now buttons on the fly ?

Thanks

Upvotes: 7

Views: 6793

Answers (4)

Sneha
Sneha

Reputation: 1

PayPal offers different buttons based on your requirement. Follow these steps to generate PayPal button:

  1. Login to your PayPal Account
  2. Click on Tools --> All Tools
  3. Click on PayPal buttons

Now you are given few button options --> Buy Now is one if them.

Follow those three steps and then copy the code at the end of 3 steps and paste it in the page where you want this button to appear.

You are good to take Payments!

Upvotes: -1

PHearst
PHearst

Reputation: 771

You could use PayPal's JavaScriptButtons API and create your buttons dynamically with:

paypal.button.create(business, data, config, parentNode)

Upvotes: 3

Praveen
Praveen

Reputation: 2029

There is an button manager API that let's you create secure buttons - here is more info: https://www.x.com/developers/paypal/products/button-manager

Upvotes: 0

pm_labs
pm_labs

Reputation: 1145

You don't need an API for creating "pay now" buttons. You can either create the button from within your customer's Paypal accounts or dynamically generate with HTML (see HTML Variables for Paypal Payments standard).

One advantage of creating the buttons from your/their Paypal account is that you can get an additional layer of security (support for encrypting the form or using a hosted button id so user cannot change the amount submitted to Paypal).

However, if you deal with hundreds of different buttons then it makes more sense to dynamically generate the buttons and just perform additional validation when Paypal sends back the confirmation (either through PDT or IPN) before shipping your items.

Upvotes: 5

Related Questions