IPromoCodeListener Interface
Receives the result of validating a promotional code. More...
Public Member Functions | |
void | OnValidateSuccess (string jsonSuccessResult) |
This is invoked asynchronously when the promo code has been validated and a JSON payload is available. More... | |
void | OnValidateFailure (string jsonErrorResult) |
This is invoked asynchronously if the promo code is invalid or a network error occurred. More... | |
Detailed Description
Receives the result of validating a promotional code. Is passed into the PromoCode.Validate method to receive either the payload associated with the promotional code, or a payload describing how the validation failed. The payload includes the errorType which can be one of the following:
- invalidPromo (The promotional code was null or empty)
- notInit (The SDK wasn't finished initializing)
- noConnection (There wasn't a connection before starting validation)
- timeout (The validation timed out)
- GP7011 (Access Denied)
- GP7008 (Invalid Redmeption)
- GP7004 (Non-Existent Promo Code)
- GP3002 (Gametoken doesn't match any)
- invHeaders (One or more validation headers is incorrect)
- invSig (The validation response was edited)
- misc (An unspecified problem occurred)
- connectionError (An unchecked URL error occurred)
- connectionLost (Connection was lost during validation)
Member Function Documentation
◆ OnValidateFailure()
void BFGSDK.IPromoCodeListener.OnValidateFailure | ( | string | jsonErrorResult | ) |
This is invoked asynchronously if the promo code is invalid or a network error occurred.
- Parameters
jsonErrorResult JSON representing what kind of error occurred. It will be in the format {"errorCode": "abbreviated", "errorMessage": "Description here"}
◆ OnValidateSuccess()
void BFGSDK.IPromoCodeListener.OnValidateSuccess | ( | string | jsonSuccessResult | ) |
This is invoked asynchronously when the promo code has been validated and a JSON payload is available.
- Parameters
jsonSuccessResult The JSON payload from the service that the game should know how to parse since it was made by one of the game's producers.
Receives the result of validating a promotional code. More...
Public Member Functions | |
void | OnValidateSuccess (string jsonSuccessResult) |
This is invoked asynchronously when the promo code has been validated and a JSON payload is available. More... | |
void | OnValidateFailure (string jsonErrorResult) |
This is invoked asynchronously if the promo code is invalid or a network error occurred. More... | |
Detailed Description
Receives the result of validating a promotional code. Is passed into the PromoCode.Validate method to receive either the payload associated with the promotional code, or a payload describing how the validation failed. The payload includes the errorType which can be one of the following:
- invalidPromo (The promotional code was null or empty)
- notInit (The SDK wasn't finished initializing)
- noConnection (There wasn't a connection before starting validation)
- timeout (The validation timed out)
- GP7011 (Access Denied)
- GP7008 (Invalid Redmeption)
- GP7004 (Non-Existent Promo Code)
- GP3002 (Gametoken doesn't match any)
- invHeaders (One or more validation headers is incorrect)
- invSig (The validation response was edited)
- misc (An unspecified problem occurred)
- connectionError (An unchecked URL error occurred)
- connectionLost (Connection was lost during validation)
Member Function Documentation
◆ OnValidateFailure()
void BFGSDK.IPromoCodeListener.OnValidateFailure | ( | string | jsonErrorResult | ) |
This is invoked asynchronously if the promo code is invalid or a network error occurred.
- Parameters
jsonErrorResult JSON representing what kind of error occurred. It will be in the format {"errorCode": "abbreviated", "errorMessage": "Description here"}
◆ OnValidateSuccess()
void BFGSDK.IPromoCodeListener.OnValidateSuccess | ( | string | jsonSuccessResult | ) |
This is invoked asynchronously when the promo code has been validated and a JSON payload is available.
- Parameters
jsonSuccessResult The JSON payload from the service that the game should know how to parse since it was made by one of the game's producers.