Trigger Reference of GS2-Money2 Script

change

Event trigger to call GS2-Script before wallet balance is added.

Request

TypeDescription
namespaceNamespaceNamespace
oldWalletWalletWallet before deposit
newWalletWalletWallet after deposit
actionTypeenum [
“Deposit”,
“Withdraw”
]
Action Type
transactionsDepositTransaction[]List of occurred transactions
countintChange in balance

Result

TypeRequireDefaultLimitationDescription
permitboolAllow wallet balance addition

Implementation Example

namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
actionType = args.actionType
transactions = args.transactions
count = args.count

result = {
  permit=permit
}

changeDone

GS2-Script called after wallet balance is added.

Request

TypeDescription
namespaceNamespaceNamespace
oldWalletWalletWallet before deposit
newWalletWalletWallet after deposit
actionTypeenum [
“Deposit”,
“Withdraw”
]
Action Type
transactionsDepositTransaction[]List of occurred transactions
countintChange in balance

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
actionType = args.actionType
transactions = args.transactions
count = args.count

result = {
}