質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

0回答

2487閲覧

Unity テスト課金 購入処理で失敗する

unity_syoshinsy

総合スコア6

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

0クリップ

投稿2018/11/07 17:49

編集2018/11/07 17:54

Unityの公式サイトを参考に課金処理を実装し、テスト課金を実施したところ以下のデバッグログが表示され、テスト課金に失敗します。
何が原因で起きているのか全く分かりません。何か問題の解決になるようなお知恵を拝借できたら幸いです

Unity:2018.2.5.f1
UnityIAP:1.20.1

UnityIAP: Promo interface is available for 1 items
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(Object)
UnityEngine.Purchasing.Promo:ProvideProductsToAds(HashSet`1)
UnityEngine.Purchasing.Promo:ProvideProductsToAds(JSONStore, IStoreCallback)
UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)
UnityEngine.Purchasing.AppleStoreImpl:ProcessMessage(String, String, String, String)
UnityEngine.Purchasing.<>c__DisplayClass35_0:<MessageCallback>b__0()
System.Action:Invoke()
UnityEngine.Purchasing.Extension.UnityUtil:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

2018-11-07 20:32:03.217784+0900 townquest[9966:3846622] UnityIAP: Add transaction observer
2018-11-07 20:32:03.217945+0900 townquest[9966:3846622] UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments
BuyProductID: FAIL. Not purchasing product, either is not found or is not available for purchase
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
PurchaseShop:BuyProductID(String)
PurchaseShop:BuySubscription()
UnityEngine.Events.UnityAction:Invoke()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.EventFunction1:Invoke(T1, BaseEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

IAPButton.PurchaseProduct() with product ID: Music_Tickets
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Purchasing.IAPButton:PurchaseProduct()
UnityEngine.Events.UnityAction:Invoke()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.EventFunction1:Invoke(T1, BaseEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Purchase failed because Purchasing was not initialized correctly
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
UnityEngine.Purchasing.CodelessIAPStoreListener:InitiatePurchase(String)
UnityEngine.Purchasing.IAPButton:PurchaseProduct()
UnityEngine.Events.UnityAction:Invoke()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.EventFunction1:Invoke(T1, BaseEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

IAPButton.OnPurchaseFailed(Product , PurchaseFailureReason PurchasingUnavailable)
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UnityEngine.Purchasing.IAPButton:OnPurchaseFailed(Product, PurchaseFailureReason)
UnityEngine.Purchasing.CodelessIAPStoreListener:InitiatePurchase(String)
UnityEngine.Purchasing.IAPButton:PurchaseProduct()
UnityEngine.Events.UnityAction:Invoke()
UnityEngine.Events.InvokableCall:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.UI.Button:Press()
UnityEngine.UI.Button:OnPointerClick(PointerEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(IPointerClickHandler, BaseEventData)
UnityEngine.EventSystems.EventFunction1:Invoke(T1, BaseEventData) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

NullReferenceException: A null value was found where an object instance was required.
at PurchaseShop.OnPurchaseFailed (UnityEngine.Purchasing.Product product, PurchaseFailureReason failureReason) [0x00000] in <filename unknown>:0
at UnityEngine.Events.UnityAction2[T0,T1].Invoke (.T0 arg0, .T1 arg1) [0x00000] in <filename unknown>:0 at UnityEngine.Events.InvokableCall2[T1,T2].Invoke (.T1 args0, .T2 args1) [0x00000] in <filename unknown>:0
at UnityEngine.Events.UnityEvent2[T0,T1].Invoke (.T0 arg0, .T1 arg1) [0x00000] in <filename unknown>:0 at UnityEngine.Purchasing.IAPButton.OnPurchaseFailed (UnityEngine.Purchasing.Product product, PurchaseFailureReason reason) [0x00000] in <filename unknown>:0 at UnityEngine.Purchasing.CodelessIAPStoreListener.InitiatePurchase (System.String productID) [0x00000] in <filename unknown>:0 at UnityEngine.Purchasing.IAPButton.PurchaseProduct () [0x00000] in <filename unknown>:0 at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <filename unknown>:0 at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <filename unknown>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <filename unknown>:0 at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.ExecuteEvents+EventFunction1[T1].Invoke (.T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction1 functor) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, Boolean pressed, Boolean released) [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <filename unknown>:0 at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <filename unknown>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

(Filename: currently not available on il2cpp Line: -1)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

y_waiwai

2018/11/07 22:42 編集

あなたが書いたというコードがないと回答しようがないですが。 質門を編集して、<code>ボタン、’’’の枠の中にコードを貼り付けてください
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問