Handles ShopK shop instance and transaction processing. Manages the ShopK integration, processes purchases, and handles payment events.
View on GitHub →shop_handler.resumePendingWrites(tac)Resume any pending NFC writes from before restart
tac (table): - TAC instanceshop_handler.startShop(tac, d)Start the ShopK shop
tac (table): - TAC instanced (table): - display interfaceshop_handler.handleTransaction(tac, transaction)Handle incoming transactions
tac (table): - TAC instancetransaction (table): - transaction datashop_handler.handleRenewal(tac, transaction, username)Handle renewal transactions
tac (table): - TAC instancetransaction (table): - transaction datausername (string): - player usernameshop_handler.handleNewSubscription(tac, transaction, sku, username)Handle new subscription transactions
tac (table): - TAC instancetransaction (table): - transaction datasku (string): - SKU patternusername (string): - player usernameshop_handler.isRunning()Check if shop is running
shop_handler.getStatus(tac)Get shop status
tac (table): - TAC instanceshop_handler.writeNFCCard(tac, options)Write NFC card with subscription data
tac (table): - TAC instanceoptions (table): - card creation optionsshop_handler.writeRenewalNFCCard(tac, options)Write NFC card for renewal with extended expiration
tac (table): - TAC instanceoptions (table): - renewal optionsshop_handler.sendRefund(toAddress, amount, reason, callback)Send a refund to a Krist address
toAddress (string): - address to send refund toamount (number): - amount to refund in KROreason (string): - reason for refund (used in transaction metadata)callback (function): - callback function to handle resultshop_handler.canSendRefunds()Check if shop is running and can send refunds