Script Trigger Reference of GS2-Showcase

Reference of event triggers that call extended scripts

Trigger

buy

Buy

Synchronous Execution Script

The script is executed synchronously before the buy process.

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 executes asynchronously after the Buy.

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

result = {
}