Trigger Reference of GS2-Showcase Script

Reference for event triggers that call extended scripts, as defined in GS2-Showcase

buy

Event trigger to call GS2-Script before Buy.

Request

TypeDescription
namespaceNamespaceNamespace
showcaseShowcaseShowcase model
displayItemDisplayItemDisplayItem model
userIdstringUser ID performing the showcase
quantityintPurchase Quantity
configConfig[]Set values to be applied to transaction variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow 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

TypeDescription
namespaceNamespaceNamespace
showcaseShowcaseShowcase model
displayItemDisplayItemDisplayItem model
userIdstringUser ID performing the showcase
quantityintPurchase Quantity
configConfig[]Set values to be applied to transaction variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
showcase = args.showcase
displayItem = args.displayItem
userId = args.userId
quantity = args.quantity
config = args.config

result = {
}