Version: 2020.3
언어: 한국어
Amazon Appstore와 Amazon Underground Store
스토어 구현

Samsung Galaxy 앱

확장 기능

개발자 모드 테스트

참고: 이제 Samsung Galaxy 스토어는 더 이상 사용되지 않고 Unity 인앱 구매 패키지 4.0.0 이상에서 지원되지 않습니다. Samsung Galaxy 스토어 설정에 대한 이 가이드는 IAP 패키지 3.1.0 이하 버전에만 적용됩니다. Unity IAP 패키지 4.0.0 이상을 사용 중이고 Samsung Galaxy 스토어를 구현하고 싶은 경우 대신에 Unity 배포 플랫폼을 사용하십시오.

개발자 모드를 사용하여 실제 제품 구매 비용을 발생시키지 않고도 IAP 테스트를 진행할 수 있습니다. 이 모드를 시작하려면 ISamsungAppsConfiguration 인스턴스를 사용하는 설정을 생성한 후, SamsungAppsMode.AlwaysSucceed 모드로 설정해야 합니다.

var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());

// Enable "developer mode" for purchases, not requiring real-world money

// SamsungAppsMode has: Production (developer mode "off"), AlwaysSucceed, AlwaysFail

builder.Configure<ISamsungAppsConfiguration>().SetMode(SamsungAppsMode.AlwaysSucceed);

거래 복구

사용자는 이미 구매한 콘텐츠에 대한 액세스를 유지하기 위해 거래를 복원합니다. 예를 들어, 기기 변경을 하더라도 사용하던 기기에서 구매한 아이템이 손실되지 않습니다. Samsung Galaxy 앱 스토어에서는 이전 거래를 복원할 필요가 없습니다. 하지만 구매를 복원할 수 있는 버튼을 제공하면 앱을 다른 장치에 설치하게 되는 경우, 다시 복원하면서 사용자에게 편리한 사용을 제공합니다.

이 동안 IStoreListenerProcessPurchase 함수가 사용자가 이미 소유하고 있는 각 아이템에 대해 호출됩니다. 아래는 그러한 호출의 예시이며, Restore Purchases 버튼을 누르면 호출되는 방식입니다.

/// <summary>

/// Your IStoreListener implementation of OnInitialized.

/// </summary>

public void OnInitialized(IStoreController controller, IExtensionProvider extensions)

{

    // The ProcessPurchase function is invoked for any items the user already owns

    extensions.GetExtension<ISamsungAppsExtensions>().RestoreTransactions(result => {

        if (result) {

            // This does not mean anything has been restored,

            // just that the restoration process succeeded.

        } else {

            // Restoration failed.

        }

    });

}

Samsung Galaxy 플랫폼에서는 이전 거래를 검색해서 가져오려면 사용자가 Samsung Galaxy 스토어 비밀번호를 입력해야 할 수도 있습니다.

Amazon Appstore와 Amazon Underground Store
스토어 구현