Trigger Reference of GS2-Showcase Script

Reference of event triggers that call extended scripts

Trigger

buy

Buy

Synchronous Execution Script

Script and Buy are executed synchronously in that order.

Request
TypeDescription
namespaceNamespaceNamespace
showcaseShowcaseShowcase model
displayItemDisplayItemDisplayItem model
userIdstringUser ID performing the showcase
quantityintPurchase Quantity
configConfig[]Set values to be applied to transaction variables
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to 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
}

Asynchronous Execution Script

The script will run after the Buy is executed.

Request
TypeDescription
namespaceNamespaceNamespace
showcaseShowcaseShowcase model
displayItemDisplayItemDisplayItem model
userIdstringUser ID performing the showcase
quantityintPurchase Quantity
configConfig[]Set values to be applied to transaction variables
Result
TypeRequiredDefaultValue LimitsDescription
Implementation Example
namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config

result = {
}