MicroPayments Plugin (CMMP) - Use Case - How to Control User Wallets From the Front-end


Use Case - How to Control User Wallets From the Front-end

Back to User Guides

Note: This use case requires this to be installed and activated:

Video Use-Case


Introduction

The MicroPayments Plugin is a payment system for WordPress that allows you to create digital wallets for your users, reward them with points, and let them pay for them using real money.

Use Case Front-End

Changing Wallet Nickname:

Changing the nickname of the wallet on the front-end - MicroPayments Plugin
Changing the nickname of the wallet on the front-end

Getting Wallet Data:

Getting information about the wallet on the front-end - WordPress MicroPayments
Getting information about the wallet on the front-end

Managing Wallet:

Managing the wallet on the front-end - MicroPayments Platform Plugin
Managing the wallet on the front-end

Wallets: What is a Wallet?

The Wallets are the "accounts" to which the points have to be connected to. They work very similar to bank accounts, or real life wallets.

Use Case Assumptions

In this example use case guide, we'll cover how to control user wallets from the front-end. We will consider how Administrators and Editors can get wallet data of any user and add or subtract points, and how users can change their wallet nicknames.

We consider that you have already bought the plugin, but not installed it. 

It follows:

Installing the Plugin

The process is the same for all CM plugins.

CreativeMinds Customer Account Dashboard - Downloads tab
CreativeMinds Customer Account Dashboard
  • Download the add-on from your customer dashboard.
  • Log in to WordPress and navigate to the WordPress Admin → Plugins settings.
  • Click on Add New.
  • Activate it and add the license.

Learn more: Getting Started - Installation And First Steps


Setting Up MicroPayments Platform Plugin - Recap

If you still have question with these steps:

  • Setting up MicroPayments Plugin
  • How users can obtain points
  • Grant points for purchase
  • Use points for discounts
  • Translating the interface
  • Shortcodes
  • Reports
  • Exporting wallets to CSV
  • Adding or subtracting points periodically
  • Troubleshooting

Then check the guide MicroPayments Plugin (CMMP) - Use Case - How to Allow Users to Buy Points Using Real Money

Changing Wallet Nicknames

It is possible to assign a nickname to each wallet. This way, users don't have to use Wallet IDs that are long and difficult for remembering, they can use a Wallet Nickname instead of it.

Users can change the nicknames of their wallets on the front-end at any moment. It is done by the shortcode which allows users to create a wallet on the front-end - [create_wallet_button] . Just create a page or edit the existing one, put a shortcode and click Publish or Update.

Placing a shortcode for creating wallets on the front-end - WordPress Points Management Plugin
Placing a shortcode for creating wallets on the front-end

On the front-end, when the wallet is already created, the user can see the field with his Wallet ID. He needs just to write there a new nickname and click Update.

Process of changing the wallet nickname on the front-end - WordPress MicroPayments Plugin
Process of changing the wallet nickname on the front-end

TIP: Changing Wallet Nickname by Admin

The admin can change the wallet nickname of any user on the back-end. To do this, navigate to Admin Dashboard → CM Micropayment Platform → Manage Wallets.

Navigation to WordPress MicroPayments wallets management dashboard
Navigation to MicroPayments plugin wallets management dashboard

Find needed wallet, hover on it and click Change Nickname. Enter new nickname, then click the button Save.

Changing wallet nickname on the back-end - Points and Rewards Plugin
Changing wallet nickname on the back-end

Getting Data About Wallets

Users with the roles Administrator and Editor are able to get data about user wallets using the shortcode [get_wallet_data] . It allows getting information about users' wallets balance, transactions history and add or subtract points from users' wallets on the front-end.

Adding points can be done using positive number, subtracting - using negative number. The wallet information can be reached by its Wallet ID or Wallet Nickname. The shortcode has a few parameters for configuring the feature.

Parameters

  • balance - Shows the balance of the chosen wallet (default value is "1").
  • transactions - Shows the transactions history of the chosen wallet (default value is "0").
  • managepoints - Shows the form for adding/subtracting points from the chosen wallet. The form opens on the click (default value is "0").
  • capability - Here we can set a capability of the user. Default value is "publish_posts". This parameter can be used to set which users are allowed to get wallet data. For example, if we pass the value capability "edit_users" to the parameter, it means that only the users with that capability will be able to get wallet data. This way you can allow using this feature not only to users with the roles Administrator and Editor. Learn more about Roles and Capabilities.

So, let's create a page and put there a shortcode that allows to see the wallet balance, wallet transaction history and manage points. The shortcode will look like this:

[get_wallet_data balance="1" transactions="1" managepoints="1"]

When you added the shortcode to the page, click the button Publish or Update:

Placing the shortcode for getting the wallet data on the front-end - MicroPayments Plugin
Placing the shortcode for getting the wallet data on the front-end

Now let's see the result on the front-end as Administrator or Editor. First, you need to enter Wallet ID or Wallet Nickname that you want to check to the field Wallet Name and click the button Check Wallet.

Process of getting the wallet data on the front-end - WordPress MicroPayments
Process of getting the wallet data on the front-end

Here is what you can see:

  1. Wallet transaction history.
  2. Wallet balance.
  3. Button that opens the form for adding or subtracting points.
Details about what wallet data can be displayed on the front-end - MicroPayments Platform Plugin
Details about what wallet data can be displayed on the front-end

Now click the button Add / Remove Points. In the field Points set the amount of points that you want to add or subtract, using positive or negative number respectively, then add a comment (optionally). After that, click the button Adjustment. The wallet balance will be changed and this transaction will appear in the wallet history. 

Adding points to the wallet on the front-end - WordPress Points Management Plugin
Adding points to the wallet on the front-end

Managing Wallets

The plugin also has one more shortcode for managing wallets on the front-end - [manage_wallet_points] . This shortcode is similar to the previous one, but a bit simpler - it allows users with the roles Administrator and Editor just to add and subtract points from users' wallets. Adding points can be done using positive number, subtracting - using negative number. The form also has a field Comment for adding a note to this transaction.

Add the shortcode to the page, then click the button Publish or Update:

Placing the shortcode for managing the wallet on the front-end - WordPress MicroPayments Plugin
Placing the shortcode for managing the wallet on the front-end

Let's see how it works on the front-end. Enter the Wallet ID or Wallet Nickname to the field Wallet Name. Then set amount of points that you want to add or subtract in the field Points. Optionally, you can add a comment in the corresponding field. After that, click the button Adjustment.

Adding points to the wallet on the front-end - Points and Rewards Plugin
Adding points to the wallet on the front-end

Labels - Translating the Interface

The MicroPayments Plugin allows you to change or translate the labels that are displayed on the front-end. To find them, navigate to Admin Dashboard → CM Micropayment Platform → Settings Labels tab.

WordPress Points Management Plugin Labels tab
MicroPayments plugin Labels tab

The following labels are related to the shortcodes [get_wallet_data] and [manage_wallet_points] :

Points and Rewards Plugin Labels settings
MicroPayments plugin Labels settings

Don't forget to click the button Save after editing labels.

End Result

Following instructions found in the plugin and guides, you should be able to control user wallets from the front-end.

Use Case Front-End

Changing Wallet Nickname:

Changing the nickname of the wallet on the front-end - MicroPayments Plugin
Changing the nickname of the wallet on the front-end

Getting Wallet Data:

Getting information about the wallet on the front-end - WordPress MicroPayments
Getting information about the wallet on the front-end

Managing Wallet:

Managing the wallet on the front-end - MicroPayments Platform Plugin
Managing the wallet on the front-end

More information about the WordPress MicroPayments Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.