Embed a Razorpay Payment Button on your WordPress website and accept payments from customers.
WordPress is one of the most popular Content Management Systems out there. You can quickly build a website using WordPress and embed the Razorpay Payment Button to accept payments from customers.
If you have built your website using www.wordpress.com, and are on a paid plan, you can directly install the Razorpay Payment Button Plugin from the WordPress Plugins store. Follow these steps to:
If you are using WordPress with the free plan, you need to use MAMP to set up a local WordPress site and continue with the Payment Button implementation. Follow these steps to:
Install the downloaded file using the wizard and save MAMP in your Applications folder.
Navigate to the MAMP folder.
In the folder, click the MAMP icon:
Click Start Server to run the server on your system.
The server status appears green once they are ready.
Click Open WebStart Page. The server starts running on your browser as shown:
We must set up a MySQL database for the WordPress website. This is done using phpMyAdmin.
a. Select the required database and click Privileges.
b. Click Add user account.
c. Enter the username and password, same as the WordPress account login credentials.
d. Click Go.
Navigate to the WordPress application you had downloaded.
Rename the WordPress folder. Provide a name relevant to the site you will be building/testing locally. For example, teafactory. Add the teafactory folder in htdocs of your MAMP directory.
Open the browser and type in the URL pointing to your site folder. For example, localhost:8888/teafactory. Select the language of your choice and click Continue → Let's Go.
Enter your database details. Provide a name for the database, and enter root for both the database username and password. Click Submit.
Provide the required general site information (which you can change later), as well as your login information in WordPress.
Click the Install WordPress button. With this, your website is ready.
You cannot directly use the Payment Button code generated from the Razorpay Dashboard if you are using www.wordpress.com. You must upgrade to the WordPress paid plan and use the Razorpay Payment Button plugin.