Article Index

These are a documentation and answers of frequently asked questions about Virtual Currency. You will find information about configuration and the ways of using the platform.

Download and Install

I guess, you have already installed Joomla! and now you have to download Virtual Currency package.

Go to "Extension Manager" and install the package.

Joomla! extension manager

If you are installing the extension for the first time, you will see a list of installed libraries, plugins and modules. You will also see a list of minimum requirements. If the system displays red indicators for unfulfilled requirement, it will be good to find a way to fix it.

Requirements

You must download and install ITPrism Library, because the extension needs it to work properly.

Technical Requirements

The minimum requirements to run the extension properly are:

  • Joomla! v3.4.x
  • PHP 5.5.x
  • MySQL 5.5.x or MariaDB 10.x
  • jQuery 1.9.x
  • cURL, fopen
  • Magic Quotes disabled
  • mod_rewrite loaded on the server
  • Fileinfo loaded on the server
  • PHP Intl loaded on the server
  • Bootstrap 3 based template

Options

Use the extension options to configure Virtual Currency. Go to "Dashboard" and click on the button "Options." Review the settings and save them.

Virtual Currency Options

Payments

Options used for managing payment process, amount format, shopping cart,...

  • Real Currency - currency in which will be sold the virtual currency.
  • Fraction Digits - the number of digits after the decimal point in amount.
  • Display Terms - display or not terms and conditions on the payment process.
  • Terms Page - the page that describes terms and conditions.
  • Show Icons - display or not the icons of the virtual currency on the payment wizard.

Debug

Those options enabled debug mode that provides functionality to test system.

  • Payment disabled - disable or enable the payment process if you would like to switch your platform in development mode.
  • Message - a message that will be displayed when payment process be disabled.

Advanced

Additional options for specific configuration.

  • Media folder - this is the folder where the pictures will be stored.
  • Administrator - this is a user that will be the person from whom will be sent the confirmation mail.

There are several views that you should use to create pages. You will be able to create a view for all user accounts that contain virtual currency and goods, a list with transactions and page of the shopping cart.

You should create a menu item that will display to these things.

  1. Select a menu and click on the button "New"
  2. Select a "Menu Item Type"
  3. Enter "Menu Title," alias and some of the advanced options if you want.

Select menu

Currencies

Currency manager where you will create virtual currencies. You should use those currencies as money on your website. You will be able to sell items for those money or to give them as reward to your users.

Virtual Goods

That is a manager of virtual goods where you will create and manage virtual items. You will be able to sell those items or give them as reward to your users.

Accounts

Accounts where the users will collect the amount of your virtual items (goods or money).

Virtual Currency Library

The library included in the extension is a collection of classes that developers will use to integrate Virtual Currency with third-party extensions.

Here you are examples and detailed information about the Virtual Currency API.

Modules

The modules are Joomla! extensions that display blocks with content. They can be placed on predefined position included in the template. They are assigned per menu items.

There are some modules, which are parts of the Virtual Currency. They display information about the virtual accounts, etc...

Joomla! Module Manager

Virtual Currency Accounts

This module displays a list with accounts that contains virtual items (goods and money).

Plug-ins

Plug-ins add additional features on the website. Virtual Currency provides several plugins and you can find them on the "Plug-in Manager". Enable those that you would like to use.

Joomla! Plug-ins Manager

User - Virtual Currency Account

This plug-in creates virtual accounts for a user when he logs in the website. The system will collect the virtual items in those accounts.

VirtualCurrency Payment - Payment Gateway

This is a payment plugin that enables a functionality user to buy virtual goods with their virtual money.

VirtualCurrency Payment - PayPal

This is a payment plugin that enables a functionality user to buy virtual goods with real money via PayPal.

How to translate Virtual Currency?

You can translate this extension in your language using Transifex. Go to the system and sign in. Find Virtual Currency translation project and start translating. If you need more information, read the article "How to translate ITPrism extensions in your language?"

You can also use ITP Transifex to create language packages.

How to get FREE support?

You can report issues on Virtual Currency GitHub repository.

If you have any questions, you can send them to me, using the contact form. Please, send me a message with only one question. When I answer you, you will be able to send me your next one.

How to upgrade the extension?

The better way to upgrade the extensions is:

  1. Make a backup of your site ( database and files ) ( optional but highly recommended );
  2. Install the new version over the old one ( all previous data will be saved );
  3. Check the extension settings and menu items for changes;
  4. Check for a new version of ITPrism Library. If there is a new version, install it.
  5. You should also upgrade all other modules and plugins, which work with Virtual Currency.

How to get support?

You can post issues on Virtual Currency GitHub repository. If you have any questions, you can send me a mail from the contact form. If you need premium support you are able to subscribe for my premium services on ITPrism members site.


Developer guide

The developer's guide provides technical information, suggestions and answers of frequently asked questions about the Virtual Currency. If you would like to use this extension as payment gateway on your website, you should use Virtual Currency API, Joomla plugin events and its events to integrate it with your extensions.

How to extend Virtual Currency?

Joomla provides an excellent opportunity for developers and other third parties to extend the capabilities of the CMS through a variety of extensions.

You can extend the system developing Components, Modules or Plug-ins.

If you are new in Joomla, you can start from Developer Documentation to learn more about options to extend its capabilities.

What is Virtual Currency API?

This is a library that is part of the platform and you should use it to interact with the platform.

You will find a documentation about Virtual Currency API on the ITPrism APIs site.

Plugin Events

Information about all plug-in events provided by the extension. You will be able to use them to extend your application, developing own plug-ins.

 

onPreparePayment

Description

This is a request for information that should be placed on the payment wizard, step "Cart". This generates an HTML code providing functionality for processing payments.

Parameters

context - The context of the content being passed to the plugin - this is the component name and wizard step name (e.g. com_virtualcurrency.payment.prepare). Use this to check whether you are in the desired context for the plugin.

&item - A reference to the project object.

&params - A reference to an object that provides parameters of the component.

Return Value

String. Returned value from this event will be displayed on step "Cart" of the payment wizard.

Example

VirtualcurrencyPayment - Payment Gateway

Used in files

components/com_virtualcurrency/views/cart/view.html.php

 

onPaymentNotify

Description

This event will be invoked when the system receives notification data from a payment gateway. That event should process the transaction.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "notify" and the name of the payment service (e.g. com_virtualcurrency.notify.paypal). Use this to check whether you are in the desired context for the plugin.

&params - A reference to an object that provides parameters of the component.

Return Value

This event returns an array that contains the name of the payment gateway and objects of a project, reward, transaction and payment session.

$result = array(
   "item"             => {object},
   "transaction"      => {object},
   "payment_session"  => {object},
   "service_provider" => {object},
   "service_alias"    => "PayPal"
);
Example

VirtualcurrencyPayment - PayPal

Used in files

components/com_virtualcurrency/controllers/notifier.raw.php

 

onAfterPayment

Description

This event will be triggered when the system completes with the processing of transaction. This will be invoked after the event onPaymentNotify.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "notify" and the name of the payment service (e.g. com_virtualcurrency.notify.paypal). Use this to check whether you are in the desired context for the plugin.

&item - A reference to bought item object.

&transaction - A reference to transaction object.

&paymentSession - A reference to payment session object.

&params - A reference to an object that provides parameters of the component.

Return Value

None. It does not return value.

Example

Virtualcurrency\Payment\Plugin

Used in files

components/com_virtualcurrency/controllers/notifier.raw.php

 

onPaymentsCheckout

Description

This event is invoked when a user makes a payment. It is used from payment services which provide preapproved payments. This event will create a preapproved transaction record.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "payments.checkout" and the name of the payment service (e.g. com_virtualcurrency.payments.checkout.paypal). Use this to check whether you are in the desired context for the plugin.

&item - A reference to the project object.

&params - A reference to an object that provides parameters of the component.

Return Value

Returns an associative array.

array(
"redirect_url" => "..." // A URL where the system should redirect the user when payment processing completes.
);
Example

VirtualcurrencyPayment - Payment Gateway

Used in files

components/com_virtualcurrency/controllers/payments.php

 

onPaymentsDoCheckout

Description

This event will be executed when the system has to process preapproved payment. It is used from payment services which provide preapproved payments. This event will register a preapproved transaction in the payment service.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "payments.docheckout" and the name of the payment service (e.g. com_virtualcurrency.payments.docheckout.paypal). Use this to check whether you are in the desired context for the plugin.

&item - A reference to the project object.

&params - A reference to an object that provides parameters of the component.

Return Value

Returns an associative array.

array(
"redirect_url" => "..." // A URL where the system should redirect the user when payment processing completes.
);
Used in files

components/com_virtualcurrency/controllers/payments.php

 

onPaymentsCapture

Description

This event is triggered when the administrator decides to process a preapproved transaction. This event should make a request to payment services to capture preapproved amount. It is invoked only from back-end by the administrator.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "payments.capture" and the name of the payment service (e.g. com_virtualcurrency.payments.capture.paypal). Use this to check whether you are in the desired context for the plugin.

&item - A reference to the project object.

&params - A reference to an object that provides parameters of the component.

Return Value

Returns an associative array.

array(
"message" => "The transaction was...", // A message to the user
"type" => "message" // The type of the message - error or message.
);
Used in files

administrator/components/com_virtualcurrency/controllers/payments.php

 

onPaymentsVoid

Description

This event is triggered when the administrator decides to cancel a preapproved transaction. It is invoked only from back-end by the administrator.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "payments.capture" and the name of the payment service (e.g. com_virtualcurrency.payments.capture.paypal). Use this to check whether you are in the desired context for the plugin.

&item - A reference to the project object.

&params - A reference to an object that provides parameters of the component.

Return Value

Returns an associative array.

array(
"message" => "The transaction was...", // A message to the user
"type" => "message" // The type of the message - error or message.
);
Used in files

administrator/components/com_virtualcurrency/controllers/payments.php

 

onPaymentsPreparePayment

Description

This event is invoked to provide additional data to a plug-in. That will be received by AJAX request and will be used from users to continue with their payment.

Parameters

context - The context of the content being passed to the plugin - this is the component name, the string "preparepayment" and the name of the payment service (e.g. com_virtualcurrency.preparepayment.mollieideal). Use this to check whether you are in the desired context for the plugin.

&params - A reference to an object that provides parameters of the component.

Return Value

Returns an associative array.

array(
"success" true, // TRUE or FALSE
"title" => "The data was...", // A message to the user
"data" => array(
"url" => "..." // A URL where the system should redirect the user when payment processing completes.
)
);
Used in files

components/com_virtualcurrency/controllers/payments.raw.php

 

How to debug the system and payment plug-ins?

If there is a problem with your system and you would like to find more information about the error, you have to debug your system. That will give you more information about the problem.

  1. Go to "System" -> "Global Configuration" -> "System" -> "Debug Settings".
  2. Set to "Yes" the option "Debug System".
  3. Now go to tab "Server" and set option "Error Reporting" to maximum.

Now, the system should display information about the error.

You can also check log files in folder "/logs" or the log file "error_log" in your main folder.

How to change PHP version on your hosting?

You will find a tool in your hosting control panel, that will give you an option to switch your PHP version to higher.

Here you are more information.

How to change PHP version on shared servers?

PHP version change

How to change your PHP version in CPanel?

How to edit views of the extension?

If you would like to add elements or to edit the HTML code of some pages, you have to override the component views. The system provides an easy way to do that. You have to make a copy of a view in your template folder and you have to edit it.
Here you are more information about how to do it.

How to customize styles for a component page and modules?

If you would like to write styles for some elements or modules to fine-tune the appearance of your site, you should use class suffix options.

You will find more information about that feature on the following pages.

How to override the styles of the component?

Virtual Currency includes CSS file with some styles. If you would like to edit these styles, you should override the file.

The file is "media/com_virtualcurency/css/frontend.style.css".

To override it, you have to make a new one in a folder "css/com_virtualcurency" in your template.

For example, you have to paste the file in that folder.

templates/my_template/css/com_virtualcurency/frontend.style.css

So, the system will load the new styles instead old ones.

The styles of the components are included in "components/com_virtualcurency/virtualcurency.php"

You will find more information about that Joomla! feature on the following pages.

How to include missed Twitter Bootstrap styles and components?

Some templates do not provide a full set of Twitter Bootstrap styles and JavaScript components. That makes your pages to look badly.

There are several solutions:

  • You can include missed styles and components in your template code manually.
  • You can find a template that provides many of the standard Bootstrap elements. If you would like, you can try the templates developed by YouJoomla.
  • You can hire a designer to fix your template or to do a template for your needs. You can do it on sites for freelancers like Freelancer.com.

How to disable strict errors?

If you get error message like this "Strict Standards: Declaration of ..... should be compatible with ...." you should change the error reporting option.

There are two solutions:

  • To change Joomla! option

Go to System -> Global Configuration -> Server (Tab). Select other option for "Error Reporting".

  • To change server options

Check this out - PHP 5 disable strict standards error

How to contribute code to the platform?

If you would like to contribute a code (fix an issue or add new feature), you should send pull request to the distribution of Virtual Currency.

  1. You should fork the repository and clone "develop" branch on your PC.
  2. Install distribution just like do with Joomla.
  3. Create a branch, write your code and send pull request to the branch "develop".

Here you are additional information about how to contribute and create pull request on GitHub.

 

Share this post

Submit to DeliciousSubmit to DiggSubmit to FacebookSubmit to Google PlusSubmit to StumbleuponSubmit to TechnoratiSubmit to TwitterSubmit to LinkedIn