Virutemart

Joomla Version Joomla Version Joomla Version

Installation

Virtuemart extension has to be installed and enabled. To install Virtuemart to your Joomla! site, follow this link.

  1. Download latest release from github.
  2. In Joomla! dashboard navigate to System tab -> Extensions.
  3. Upload Package File -> Upload extension zip file.
  4. In Joomla! dashboard go to Components -> VirtueMart -> Payment Methods.
  5. If SpectroCoin payment method is not visible click New -> Enter "Payment Name", in "Payment Method" select VM Payment - Spectrocoin.
  6. Move to Setting up section.

Setting up

  1. Sign up for a SpectroCoin Account.
  2. Log in to your SpectroCoin account.
  3. On the dashboard, locate the Business tab and click on it.
  4. Click on New project.
  5. Fill in the project details and select desired settings (settings can be changed).
  6. Click "Submit".
  7. Copy and paste the "Project id".
  8. Click on the user icon in the top right and navigate to Settings. Then click on API and choose Create New API.
  9. Add "API name", in scope groups select "View merchant preorders", "Create merchant preorders", "View merchant orders", "Create merchant orders", "Cancel merchant orders" and click "Create API".
  10. Copy and store "Client id" and "Client secret". Save the settings.

Note: Keep in mind that if you want to use the business services of SpectroCoin, your account has to be verified.

Test order creation on localhost

We gently suggest trying out the plugin in a server environment, as it will not be capable of receiving callbacks from SpectroCoin if it will be hosted on localhost. To successfully create an order on localhost for testing purposes, change these 3 lines in_CreateOrderRequest.php_:

$this->callbackUrl = isset($data['callbackUrl']) ? Utils::sanitizeUrl($data['callbackUrl']) : null;,
$this->successUrl = isset($data['successUrl']) ? Utils::sanitizeUrl($data['successUrl']) : null;,
$this->failureUrl = isset($data['failureUrl']) ? Utils::sanitizeUrl($data['failureUrl']) : null;

To

$this->callbackUrl = "https://localhost.com/";,
$this->successUrl = "https://localhost.com/";,
$this->failureUrl = "https://localhost.com/";

Don't forget to change it back when migrating website to public.

Testing Callbacks

Order callbacks in the SpectroCoin plugin allow your WordPress site to automatically process order status changes sent from SpectroCoin. These callbacks notify your server when an order’s status transitions to PAID, EXPIRED, or FAILED. Understanding and testing this functionality ensures your store handles payments accurately and updates order statuses accordingly.

  1. Go to your SpectroCoin project settings and enable Test Mode.
  2. Simulate a payment status:
    • PAID: Sends a callback to mark the order as Completed in WordPress.
    • EXPIRED: Sends a callback to mark the order as Failed in WordPress.
  3. Ensure your callbackUrl is publicly accessible (local servers like localhost will not work).
  4. Check the Order History in SpectroCoin for callback details. If a callback fails, use the Retry button to resend it.
  5. Verify that:
    • The order status in WordPress has been updated accordingly.
    • The callback status in the SpectroCoin dashboard is 200 OK.