Make PayPal Payment Using Contact Form in WordPress Based on Calculation

Spread the love

Accepting payments from your website is becoming a trend and is quite cool also when you are running a good business. PayPal is used in many countries and also a very popular way to collect money online.

In WordPress we often use WooCommerce plugin for selling products but this method is quite messy sometimes when your purpose is to collect money for one or two orders, reservations, etc. So here i am going to tell you a very simple method of doing this without using a heavy WooCommerce plugin.

WordPress Plugins We Will Be Using

For allowing payment on Contact Forms in WordPress i am going to use three plugins. Please don’t get disturbed with the numbers but its really really simple using them together.

Setup : Payment Using Contact Form 7

There can be number of purposes for making such type of forms. But here i will create one using an example.

Suppose i am selling notebooks each of Rs. 50. So i want my client to make PayPal payment based on the number of notebooks they want. This all will work in Contact Form 7. Let’s go through the steps to create such form with payment.

Step I : Installing Plugins

Go to Plugins > Add New. Search for Contact Form 7 and Install it. Similarly, install Contact Form 7 – PayPal Extension & Calculate Contact Form 7. Activate all three plugins.

plugins for payment using contact form 7

Step II : Creating Form in Contact Form 7

Add field according to details you want from your client. These can be Name, Phone Number, Email-id, Address. Then you need to ask your client the quantity of notebooks they want to purchase. Without waiting more, let us start creating a form for such purpose.

Go to Contact >> Add New. You will see a page where you can add fields and there will be already some fields.

Add some title to the form, say, Notebook Payments. Add the following code in the fields section. You can add as many as fields you want. Feel free to delete unwanted fields too.

[text* client-name placeholder "Enter Your Name"]
[email* client-email placeholder "Enter Your Email"]
[tel* client-phone placeholder "Enter Your Phone"]
[textarea client-address placeholder "Enter Address"]
[number number-of-notebooks min:1 max:1000 id:notebooks placeholder "Number Of Notebooks"]
[calculator rate-notebooks Precision:2 id:cost-notebook "number-of-notebooks * 50"]
[submit id:make-payment "Make Payment"]

Here the [calculator] field value will change according to the number of notebooks you enter in [number] field with name number-of-notebooks as we are multiplying number-of-notebooks * 50.

Follow video for better clarification.

After this, Go to Mail Tab and enter email id from where this email needs to be sent and also the email id where it should go. Make other settings too like subject etc.

Now go to PayPal Tab and make settings as shown in video. Copy and paste the Shortcode on the page where you want to display the form.

Now you will see that the amount is changing with the number you enter in quantity tab. If you have made setting is the PayPal Tab, then hurray! you are ready to accept payments online.

Similarly, other forms can be created and you can payment using contact form 7 in WordPress by calculating quantity.

I am Divyanshi, WordPress lover and PHP Developer. I tried my best to post this blog on how to accept Paypal Payment using Contact Form 7.
You can contact me in case you need any help or have any confusion by clicking here.

Divyanshi Juneja

Please, comment below if you have any better idea of doing this or want any other suggestion on this.

1 Comment

Leave a Reply

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