# Wordpress\_v4.x\_Donation

This Wordpress 4.x Paykun Donation version enable merchants to get donations from the different donors. No need to install Woocommerce.

### Prerequisite

Following things will be required before you can begin integration:

* Merchant ID
* Access Token & API Secret ([See how to generate](/technical-guide/api-encryption-key-guide.md))

### **Installation**

1. Download the zip from [here](https://github.com/paykun-code/Wordpress_v4.x_Donation) and extract it to some temporary location
2. Copy the folder named 'paykun-donate' from the extracted zip into the directory location /wp-content/plugins/
3. Activate the plugin from the left side 'Plugins' menu in WordPress.
4. Now you will see new menu in your Wordpress admin called 'Paykun Donation'
5. Click on Paykun Donation > Settings
6. Enter all the required details provided by paykun. Follow step 9 to check which detail is required.
7. Add short code \[paykuncheckout] either in page or post to display payment form
8. Save the below configuration.
   * Merchant Id - Staging/Production Merchant Id provided by Paykun
   * Access Token - Staging/Production Access Token provided by Paykun
   * Encryption Key - Staging/Production Encryption Key provided by Paykun
   * Default Amount - Enable check box
   * Amount editable by user? - Paykun
   * Default Payment Button caption - Default
   * Log (yes/no) - For troubleshooting
9. Your Wordpress Donation plug-in is now installed. You can accept payment through Paykun.

### **Test your Integration (sandbox)**

{% hint style="info" %}
**I**f you need it for testing purposes you can use our sandbox mode by sending “isLive” parameter to false.
{% endhint %}

If you need it for testing purposes you should login in Paykun dashboard using sandbox mode and get your testing [merchant Id](/technical-guide/api-encryption-key-guide.md) and [Device API key(access token).](/technical-guide/api-encryption-key-guide.md)&#x20;

To test your integration in sandbox environment before going like, you can use our test environment (See how to create one) and use your test credentials, You just have to use **isLive**=**false** in your integration, You can use test card details provided [here ](/technical-guide/test-card-information.md)for testing purpose.

* [Log In](https://app.paykun.com/login) to your PayKun Dashboard
* ‘Go to’ the Merchant Account under the ‘Payment Gateway’ section (If you are first-time-login then you will see the ‘Become a Merchant’ option.)
* After the merchant account login, click on your profile picture.
* Select ‘Test mode’.
* Select "Generate Sandbox Account" to activate your sandbox account
* After activating sandbox account,you can click on "Sandbox Login" button to go to sandbox dashboard and use generated username and password login.
* Now you have to generate your Device API key from sandbox account from Setting-Security tab.
* You can get you Merchant Id clicking on profile icon from top right corner.
* Now you have to use this API key and Merchant ID in your Demo project for testing purposes. Note: Remember that you can login in Sandbox account from your Live account.

### **For Live environment**

If you want to do real transaction than set "**isLive**" parameter to **true** and use your Live MerchantId and AccessToken from Paykun dashboard.

### License

The Wordpress 4.x Paykun Donation  is released under the MIT License.

### **For any Assistance**

In case of any query, please contact to <tech@paykun.com>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paykun.com/technical-guide/ecommerce-integration/wordpress_v4.x_donation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
