Trigger Reference of GS2-Money2 Script
Reference for event triggers that call extended scripts, as defined in GS2-Money2
deposit
Event trigger to call GS2-Script before Deposit wallet balance.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
oldWallet | Wallet | Wallet before deposit |
newWallet | Wallet | Wallet after deposit |
transactions | DepositTransaction[] | List of occurred transactions |
count | int | Amount of balance to be added |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow wallet balance addition |
Implementation Example
namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
transactions = args.transactions
count = args.count
result = {
permit=permit
}
depositDone
GS2-Script called after Deposit wallet balance.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
oldWallet | Wallet | Wallet before deposit |
newWallet | Wallet | Wallet after deposit |
transactions | DepositTransaction[] | List of occurred transactions |
count | int | Amount of balance to be added |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
transactions = args.transactions
count = args.count
result = {
}
withdraw
Event trigger to call GS2-Script before Withdraw wallet balance.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
oldWallet | Wallet | Wallet before withdraw |
newWallet | Wallet | Wallet after withdraw |
transactions | DepositTransaction[] | List of occurred transactions |
count | int | Amount of balance to be consumed |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow wallet balance addition |
Implementation Example
namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
transactions = args.transactions
count = args.count
result = {
permit=permit
}
withdrawDone
GS2-Script called after Withdraw wallet balance.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
oldWallet | Wallet | Wallet before withdraw |
newWallet | Wallet | Wallet after withdraw |
transactions | DepositTransaction[] | List of occurred transactions |
count | int | Amount of balance to be consumed |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
oldWallet = args.oldWallet
newWallet = args.newWallet
transactions = args.transactions
count = args.count
result = {
}