사용자가 상품을 구매하고자 할 때는 IStoreController의 InitiatePurchase 메서드를 호출하여 구매하고자 하는 상품을 식별합니다.
// Example method called when the user presses a 'buy' button
// to start the purchase process.
public void OnPurchaseClicked(string productId) {
controller.InitiatePurchase(productId);
}
애플리케이션이 구매 성공 시 ProcessPurchase를 호출하거나 실패 시 OnPurchaseFailed를 호출하여 결과를 비동기식으로 알립니다.