Skip to main content

CustomerResultObserver

If you were looking for the method for use with Unity, see CustomerResultObserver for Unity SDK.

Registers the Player Network SDK customer service module callback to receive customer service operation notifications. Currently, the callback is only triggered when the customer service UI is closed and the account is deleted. For more information on the callback data structure, see CustomerResult. For more information on WebView callbacks, see WebViewResultObserver.

note

It is strongly recommended to perform registration in the startup function of the game application.

Function definition

C++ event handling (above V1.15)

//configure callback
void SetCustomerResultObserver(FINTLCustomerEvent& callback);
//get callback
FINTLCustomerEvent& GetCustomerResultObserver();

Unreal Engine event handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnCustomerResult(FINTLCustomerResult ret);
virtual void OnCustomerResult_Implementation(FINTLCustomerResult ret) {};

Code sample

C++ event handling (above V1.15)

//configure customer callback
FINTLCustomerEvent customerEvent;
customerEvent.AddUObject(this, &OnCustomerResult_Implementation);
UINTLSDKAPI::SetCustomerResultObserver(customerEvent);

//configure webview callback
FINTLWebViewEvent webViewEvents;
webViewEvents.AddUObject(this, &OnWebViewResult_Implementation);
UINTLSDKAPI::SetWebViewResultObserver(webViewEvents);

// Remove callbacks
UINTLSDKAPI::GetCustomerResultObserver().Clear();
UINTLSDKAPI::GetWebViewResultObserver().Clear();
// INTLCustomerResult callback
void OnCustomerResult_Implementation(FINTLCustomerResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
// INTLWebViewResult callback for account deletion
void OnWebViewResult_Implementation(FINTLWebViewResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine event handling

// INTLCustomerResult callback
void OnCustomerResult_Implementation(FINTLCustomerResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
// INTLWebViewResult callback for account deletion
void OnWebViewResult_Implementation(FINTLWebViewResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}