tac.extensions.shopk_access.shop

Handles ShopK shop instance and transaction processing. Manages the ShopK integration, processes purchases, and handles payment events.

Author: Twijn
View on GitHub →

Functions

shop_handler.resumePendingWrites(tac)

View source

Resume any pending NFC writes from before restart

Parameters:

shop_handler.startShop(tac, d)

View source

Start the ShopK shop

Parameters:

shop_handler.handleTransaction(tac, transaction)

View source

Handle incoming transactions

Parameters:

shop_handler.handleRenewal(tac, transaction, username)

View source

Handle renewal transactions

Parameters:

shop_handler.handleNewSubscription(tac, transaction, sku, username)

View source

Handle new subscription transactions

Parameters:

shop_handler.stopShop(d)

View source

Stop the shop

Parameters:

shop_handler.isRunning()

View source

Check if shop is running

Returns: boolean - true if shop is running

shop_handler.getStatus(tac)

View source

Get shop status

Parameters:
Returns: table - status information

shop_handler.writeNFCCard(tac, options)

View source

Write NFC card with subscription data

Parameters:
Returns: boolean - success status

shop_handler.writeRenewalNFCCard(tac, options)

View source

Write NFC card for renewal with extended expiration

Parameters:
Returns: boolean - success status

shop_handler.sendRefund(toAddress, amount, reason, callback)

View source

Send a refund to a Krist address

Parameters:

shop_handler.canSendRefunds()

View source

Check if shop is running and can send refunds

Returns: boolean - true if shop can send refunds