PayPal Donate Button in PHP, FormGet, donate button.#Donate #button


PayPal Donate Button in PHP

Using PayPal Donate button, we can collect contribution payments. It lets you to Donate fixed amounts or amounts entered by donors.

When you click on Donate button, it goes to a special link that is maintained by PayPal for that particular button.

In our previous blogs post, we have discussed how we can use PayPal payments in different modes like Shopping cart, Mass payment and Digital Goods etc.

You can create Donate buttons that you add to your website by using a tool on the PayPal website or you can write the HTML code for it manually.

Here we are going to explain how we can use or customize PayPal donate button with PHP and HTML for contributing money, where donor can donate fixed amounts or can enter the amount by themselves.

Watch the live demo or download code from the link given below

Donate button

Note : PayPal offers sandbox account for development and testing purpose. Here we are using Sandbox for the demo, so if you would like to test our demo you can use your PayPal sandbox credentials.

Concept Behind the Script

In our last post, we covered PayPal Buy Now Button and Pay Add to Cart Button where we have customized the button for showing meaningful example and demo.

In this post, we used PayPal donate button in PHP showing example for donation based website, where you can donate fixed amounts or self entered amounts to different charities.

Here, when donor will click on Donate button he can pay fixed amount which is $25 and if the donor wants to pay any amount then they need to enter the donation amount on the popup window and click on the donate button. It will redirects to PayPal donation panel for payment process.

Tutorial Scripts in detail

Below are the details of the code used in this tutorial with proper explanation.

Index.php

Index.php contain code for showing different charity with donation details and Donate button.

Process.php

This file contains code to process Donation amount to PayPal.

Success.php

PayPal call this file when Donation gets successfully completed and provide $_REQUEST array which contains all transaction details and displayed in front end.

Style.css

Includes basic styling of HTML elements.

Conclusion :

After reading the above post, I am sure you will give a try to the script provided and implement it in your own projects as well. Feel free to visit our website again in the future to get in touch with new coding tricks. You can let us know about your feedback in the space provided below Donate button

Your email address will not be published. Required fields are marked *

I have used this code. Using this code donation done perfectly in paypal site. But i am not getting any response. I get blank array of post. So please help me where may be problem in my code. I have used the downloaded package.

By using Pay sandbox account, the payment should be submitted success fully. Unfortunately i didn t get any response.


Tags : ,

0 thoughts on “PayPal Donate Button in PHP, FormGet, donate button.#Donate #button”

Leave a Reply

Your email address will not be published. Required fields are marked *