Installing SiteVibes Reward Payment Method for Magento 2

Modified on Mon, 12 Jan at 2:40 PM

Version v1.*.*

  1. PHP >=7.4|>=8.0
  2. Magento Community Edition >=2.4.3 <=2.4.7"
  3. PHP Extensions ext-json
  4. SiteVibes MagentoPlugin >=1.1.4 (required dependency)

Features

  • Reward Points Payment Method: Allow customers to pay with SiteVibes loyalty points
  • Partial Payment Support: Use points for partial payment and combine with other payment methods
  • Real-time Balance Verification: Check customer reward points balance during checkout
  • Queue-Based Processing: Asynchronous point deduction and refund via RabbitMQ (Fallback as synchronous in case of failure)
  • Invoice & Credit Memo Support: Proper handling of reward points in invoices and refunds
  • Admin Panel Display: View reward points information in order, invoice, and credit memo details
  • WebAPI Support: RESTful API endpoints for reward balance retrieval

Installation

Prerequisites

Important: You must install and configure the SiteVibes_MagentoPlugin module first before installing this payment module.


Manual Installation

Extract the downloaded files to your Magento app/code/SiteVibes/MagentoPayment directory.


Run the Magento 2 deploy commands as shown above.

Configuration

Step 1: Enable the Payment Method

  1. Navigate to your Magento Admin Panel
  2. Go to Stores > Configuration > Sales > Payment Methods
  3. Find the SiteVibes Rewards Payment section
  4. Set Enabled to "Yes"

Step 2: Configure Payment Settings

Configure the following settings in the SiteVibes Rewards Payment section:
  • Title: The payment method title displayed to customers during checkout (default: "Pay with Rewards Points")
  • Points to Currency Conversion Rate: How many points equal 1 unit of currency (e.g., 1 means 1 point = $1)
  • Allowed Payment Methods for Remaining Balance: Select which payment methods customers can use when points don't cover the full order total (for partial payments)
  • Sort Order: Display order of this payment method in the checkout
  • Payment from Applicable Countries: Choose "All Allowed Countries" or "Specific Countries"
  • Payment from Specific Countries: Select specific countries if applicable

Step 3: Configure Message Queue (RabbitMQ)

This module uses RabbitMQ for processing reward points transactions asynchronously. Ensure RabbitMQ is properly configured in your Magento installation. If there is no AMQP service installed, then requests are synchronous.


Start the Message Queue Consumers

Run the following consumers to process reward points transactions:
php bin/magento queue:consumers:start sitevibes.reward.points.subtract
php bin/magento queue:consumers:start sitevibes.reward.points.refund

For production environments, it's recommended to run these consumers as system services or use supervisor/systemd to ensure they run continuously.

Step 4: Database Schema

The module automatically creates the following database columns:


quote table:

  • sitevibes_is_reward_payment
  • sitevibes_reward_points_used
  • sitevibes_reward_points_remain
  • sitevibes_reward_points_amount

sales_order table:

  • sitevibes_is_reward_payment
  • sitevibes_reward_points_used
  • sitevibes_reward_points_remain
  • sitevibes_reward_points_amount

sales_invoice table:

  • sitevibes_reward_points_used
  • sitevibes_reward_points_amount

sales_creditmemo table:

  • sitevibes_reward_points_refunded
  • sitevibes_reward_points_refund_value

These are created automatically when you run php bin/magento setup:upgrade.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article