WP Manifestindependent plugin directory
manifest / ecommerce / donations_for_paynow_plugin

Donations For Paynow

wordpress plugin allowing for donations with paynow payments, includes settings, transaction history and error handling

by Krzysztof Szklarski · github.com/krzysiek214181/donations_for_paynow_plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/krzysiek214181/donations_for_paynow_plugin/archive/refs/heads/main.zip

Kszkl\Donations for Paynow Plugin

The following repository is a wordpress plugin that makes receiving donation with paynow easy.

It implemets two shortcodes ( donation form, return screen ), transaction history ( with sorting and fitering capabilites ) and a settings page for setting your apiKeys.

Installation

The plugin is not currently avaible on the Wordpress Plugins Directory, to install it:

  1. download the newest donations_for_paynow.zip file from this repository
  2. go to the Plugins menu on your Wordpress
  3. click the Add Plugin button
  4. click the Upload Plugin button
  5. upload the downloaded file
  6. the plugin is now officially installed

Setup

To set up the plugin you have to be the owner of an active paynow account

Simply copy the ApiKey and SignatureKey from your paynow panel into the corresponding field in the Kszkl\Donations -> Settings menu and save them.

Set the Environment setting to PRODUCTION

In your paynow panel set up the correct Shop Domain

Set the Notifications URL to https://yourdomain.example/wp-json/donationsforpaynow/notify

Set the Return address to a site where you'll use the [donations_for_paynow_return] shortcode

Testing

To set up a testing environment you basically have to follow the Setup above, the only difference is instead of creating a real paynow account, you sign up for a testing one

Make sure to also change the Environment setting to SANDBOX

[!WARNING] in order to ( properly ) use the sandbox testing your site must be avaible under a public domain ( for notifications purposes )

Shortcodes

As mentioned before, the plugin implements two shortcodes

[donations_for_paynow_form]

This shorcodes generates a custom form that enables your site's visitors to make easy donations.

attributes

attribute name default value explanation
user_legend Donate Information the text displayed as a legend to the users info part of the form
payment_legend Payment Information the text displayed as a legend to the users info part of the form
name_label Name The text display next to the name field
name_placeholder Full Name The placeholder inside the name field
surname_label Surname The text displayed next to the surname field
surname_placeholder Surname The placeholder inside the surname field
email_label Email The text displayed next to the email field
email_placeholder Email Address The placeholder inside the email field
description_label Description The text displayed next to the description field
description_placeholder Payment Description The placeholder inside the description field
amount_label Amount The text displayed next to the amount field
amount_placeholder Amount The placeholder inside the description field
button_text Donate The main text display on the button
sug_amount_1 10 The value of the first suggested amount button
sug_amount_2 25 The value of the second suggested amount button
sug_amount_3 50 The value of the third suggested amount button
sug_amount_4 100 The value of the fourth suggested amount button

full shortcode

[ donations_for_paynow_form user_legend="Donor Information" payment_legend="Payment Information" name_label="Name" name_placeholder="Full Name" surname_label="Surname" surname_placeholder="Surname" email_label="Email" email_placeholder="Email Address" description_label="Description" description_placeholder="Payment Description" amount_label="Amount" amount_placeholder="Amount" button_text="Donate" sug_amount_1="10" sug_amount_2="25" sug_amount_3="50" sug_amount_4="100"]

[donations_for_paynow_return]

This shortcode generates a dynamic message for the user returning after completing a payment.

attributes

attribute name default value explanation
button_text Main Page Text displayed on the button
button_url home_url() The url the button points to
success_msg Thank you for your contribution The main message displayed after succesfull payment
fail_msg Something went wrong with your payment The main message displayed after an unsuccesfull payment
sub_msg A message with details has been sent to your email This message is displayed under fail / success msg

full shortcode

[ donations_for_paynow_return button_text="Main Page" success_msg="Thank you for your contribution" fail_msg="Something went wrong with your payment" sub_msg="A message with details has been sent to your email" ]

Admin Pages

This plugin creates 3 wordpress menu subpages

History

This menu is avaible for users with the Editor Role ( or higher ). It allows you to track the payments from the perspective of your server.

This site features sorting by all columns and filtering by the following params:

  • Statuses ( NEW, PENDING, CONFIRMED, REJECTED, ERROR, EXPIRED, ABANDONED )
  • Amount of results ( 25, 50, 75, 100, 1000 )
  • Minimum and maximum amount
  • Description
  • Email
  • Name
  • Surname
  • Transaction ID

Settings

This menu is avaible only to the Admin role. Here you can configure the plugin with the following settings:

  • API Key - The API Key copied from the paynow panel
  • Signature Key - The Signature Key copied from the paynow panel
  • Environment - SANDBOX / PRODUCTION
  • Debug - ON / OFF

Debug

This menu is avaible only to the Admin role, but it is hidden by default. To show it, change the Debug setting to ON.

In this menu you can track all of the notifications your server receives from paynow.

This site also features sorting by all columns and filtering by the following params:

  • Statuses ( NEW, PENDING, CONFIRMED, REJECTED, ERROR, EXPIRED, ABANDONED )
  • Amount of results ( 25, 50, 75, 100, 1000 )
  • Transaction ID
  • Internal Ref

Where Internal Ref is the ID assigned to the transaction by the plugin.

[!WARNING] When a user retries the payment, Transaction ID changes, but the Internal Ref stays the same