🎁
Loyalty - QBCore
  • What's new?
  • Royalty Program - QBCore
  • App Configuration
  • Tiers
  • Exports
  • Custom Money Handling
  • Loyalty Program Language Configuration Guide
Powered by GitBook
On this page
  • Apple Pay Configuration Settings
  • Settings Explained

App Configuration

PreviousRoyalty Program - QBCoreNextTiers

Last updated 7 months ago

Config = {}
    
-- Points Configuration
Config.PointsEach1Dollar = 3
Config.MinimumPointsForConversion = 1000
Config.ConversionRate = 0.02

Explanation:

I you want to Generate config with dynamic calculations

Visit :

  1. Config.PointsEach1Dollar = 3:

    • For every dollar spent, the user earns 3 royalty points. This incentivizes spending, with each dollar contributing towards point accumulation.

  2. Config.MinimumPointsForConversion = 1000:

    • A user must accumulate at least 1000 points to be eligible for converting points into money. This threshold ensures that users engage consistently before redeeming rewards.

  3. Config.ConversionRate = 0.02:

    • For every royalty point, the user gets $0.02. Once a user reaches the minimum points (1000), they can convert it into $20 (1000 * 0.02).

Process:

  • A user earns royalty points based on their spending.

  • Upon reaching the minimum points (1000), they can redeem the points into bank money (e.g., $20 from 1000 points).


Config = {}
    
-- Specify the framework to use: 'qb-core', 'esx', or 'standalone'
Config.Framework = 'qb-core'

-- Database name
Config.DatabaseTable = "loyalty_cards"
Config.LogsTable = "loyalty_card_logs"


-- Points Configuration
Config.PointsEach1Dollar = 0.5
Config.MinimumPointsForConversion = 1000
Config.ConversionRate = 0.01

-- App Configuration
Config.AppName = "Loyalty"
Config.AppDescription = "Loyalty card system"
Config.AppDefaultApp = true
Config.AppSize = 29812

Apple Pay Configuration Settings

-- Apple Pay Configuration
Config.ApplePay = true      -- Enable or disable the Apple Pay system
Config.GenerateFee = 79.99  -- Card generation fee

Settings Explained

Config.ApplePay

  • When set to true:

    • Enables Apple Pay payment method

    • Users will see the Apple Pay interface with fingerprint scanner

    • Card generation will cost money (specified by GenerateFee)

  • When set to false:

    • Disables Apple Pay payment method

    • Users will see standard generation button

    • Card generation will be free

Config.GenerateFee

  • Sets the cost to generate a new loyalty card

  • Only applies when Config.ApplePay is enabled

  • If Apple Pay is disabled, cards are generated for free regardless of this value

  • Default value: 79.99

Points Configuration