Trigger Reference of GS2-Showcase Script
Reference of event triggers that call extended scripts
buy
Event trigger to call GS2-Script before Buy.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| showcase | Showcase | Showcase model |
| displayItem | DisplayItem | DisplayItem model |
| userId | string | User ID performing the showcase |
| quantity | int | Purchase Quantity |
| config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Allow buy |
Implementation Example
namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config
result = {
permit=permit
}
buyDone
GS2-Script called after Buy.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| showcase | Showcase | Showcase model |
| displayItem | DisplayItem | DisplayItem model |
| userId | string | User ID performing the showcase |
| quantity | int | Purchase Quantity |
| config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description |
|---|
Implementation Example
namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config
result = {
}