Request a list of purchased subscription status.
This API will work with Google store. (Android Only)
public void RequestSubscriptionsStatusSample(bool includeExpiredSubscriptions)
{
var configuration = new GamebaseRequest.Purchase.PurchasableConfiguration
{
includeExpiredSubscriptions = includeExpiredSubscriptions
};
{
{
Debug.Log("RequestSubscriptionsStatus succeeded");
foreach (GamebaseResponse.Purchase.PurchasableSubscriptionStatus subscriptionStatus in subscriptionStatusList)
{
var message = new StringBuilder();
message.AppendLine(string.Format("storeCode:{0}", subscriptionStatus.storeCode));
message.AppendLine(string.Format("paymentId:{0}", subscriptionStatus.paymentId));
message.AppendLine(string.Format("originalPaymentId:{0}", subscriptionStatus.originalPaymentId));
message.AppendLine(string.Format("paymentSeq:{0}", subscriptionStatus.paymentSeq));
message.AppendLine(string.Format("marketItemId:{0}", subscriptionStatus.marketItemId));
message.AppendLine(string.Format("itemSeq:{0}", subscriptionStatus.itemSeq));
message.AppendLine(string.Format("price:{0}", subscriptionStatus.price));
message.AppendLine(string.Format("currency:{0}", subscriptionStatus.currency));
message.AppendLine(string.Format("purchaseTime:{0}", subscriptionStatus.purchaseTime));
message.AppendLine(string.Format("expiryTime:{0}", subscriptionStatus.expiryTime));
message.AppendLine(string.Format("statusCode:{0}", subscriptionStatus.statusCode));
message.AppendLine(string.Format("statusDescription:{0}", subscriptionStatus.statusDescription));
message.AppendLine(string.Format("gamebaseProductId:{0}", subscriptionStatus.gamebaseProductId));
Debug.Log(message);
}
}
else
{
Debug.Log(string.Format("RequestSubscriptionsStatus failed. error is {0}", error));
}
});
}
static void RequestSubscriptionsStatus(GamebaseRequest.Purchase.PurchasableConfiguration configuration, GamebaseCallback.GamebaseDelegate< List< GamebaseResponse.Purchase.PurchasableSubscriptionStatus > > callback)
Request a list of purchased subscription status.
Definition Gamebase.cs:2521
The Purchase class provides several APIs related to purchasing processes.
Definition Gamebase.cs:2040
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11