Esempio n. 1
0
        /// <summary>
        /// This method is called by Steamworks when the transaction finishes
        /// (player either authorized or aborted the transaction)
        /// </summary>
        public async void SteamworksCallbackHandler(
            MicroTxnAuthorizationResponse_t response
            )
        {
            // finish the transaction
            SteamTransactionEntity transaction;

            try
            {
                transaction = await OnFacet <SteamPurchasingServerFacet>
                              .CallAsync <SteamTransactionEntity>(
                    nameof(SteamPurchasingServerFacet.FinalizeTransaction),
                    response.m_ulOrderID,
                    response.m_bAuthorized == 1
                    );
            }
            catch (Exception e)
            {
                ReportErrorToThePlayer(e.Message);
                return;
            }

            // transaction has been aborted by the player
            if (response.m_bAuthorized != 1)
            {
                ReportErrorToThePlayer("You've aborted the transaction.");
                return;
            }

            // everything went according to plans
            TransactionHasBeenSuccessful(transaction);
        }
 // Token: 0x0600128E RID: 4750 RVA: 0x0006E744 File Offset: 0x0006C944
 private void OnMicroTxnCallback(MicroTxnAuthorizationResponse_t param)
 {
     Debug.Log("Steam MicroTxnParams: " + param);
     if (param.m_bAuthorized > 0)
     {
         ShopWebServiceClient.FinishBuyBundleSteam(param.m_ulOrderID.ToString(), delegate(bool success)
         {
             if (success)
             {
                 PopupSystem.ClearAll();
                 PopupSystem.ShowMessage("Purchase Successful", "Thank you, your purchase was successful.", PopupSystem.AlertType.OK, delegate()
                 {
                     ApplicationDataManager.RefreshWallet();
                 });
             }
             else
             {
                 Debug.Log("Managed error from WebServices");
                 PopupSystem.ClearAll();
                 PopupSystem.ShowMessage("Purchase Failed", "Sorry, there was a problem processing your payment. Please visit support.uberstrike.com for help.", PopupSystem.AlertType.OK);
             }
         }, delegate(Exception ex)
         {
             Debug.Log(ex.Message);
             PopupSystem.ClearAll();
             PopupSystem.ShowMessage("Purchase Failed", "Sorry, there was a problem processing your payment. Please visit support.uberstrike.com for help.", PopupSystem.AlertType.OK);
         });
     }
     else
     {
         Debug.Log("Purchase canceled");
         PopupSystem.ClearAll();
     }
 }
Esempio n. 3
0
 private void onMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t arg1, bool arg2)
 {
     if (OnAuthorizationResponse != null)
     {
         OnAuthorizationResponse(arg1.Authorized == 1, (int)arg1.AppID, arg1.OrderID);
     }
 }
 // This callback is called when the user confirms the purchase
 // See https://partner.steamgames.com/doc/api/ISteamUser#MicroTxnAuthorizationResponse_t
 private void OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t pCallback)
 {
     if (pCallback.m_bAuthorized == 1)
     {
         this.FinishPurchase(pCallback.m_ulOrderID.ToString());
     }
     Debug.Log("[" + MicroTxnAuthorizationResponse_t.k_iCallback + " - MicroTxnAuthorizationResponse] - " + pCallback.m_unAppID + " -- " + pCallback.m_ulOrderID + " -- " + pCallback.m_bAuthorized);
 }
Esempio n. 5
0
        /// <summary>
        /// Manually triggering purchase confirmation after a Steam payment has been made in the overlay.
        /// This is so that the transaction gets finished and Steam actually substracts funds.
        /// </summary>
        private void OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t pCallback)
        {
            //Debug.LogError("Steam MicroTxn Response: " + pCallback.m_unAppID + ", " + pCallback.m_ulOrderID + ", " + pCallback.m_bAuthorized);

            ConfirmPurchaseRequest request = new ConfirmPurchaseRequest()
            {
                OrderId = orderId
            };

            PlayFabClientAPI.ConfirmPurchase(request, OnPurchaseSucceeded, OnPurchaseFailed);
        }
 void OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t pCallback)
 {
     Debug.Log("[" + MicroTxnAuthorizationResponse_t.k_iCallback + " - MicroTxnAuthorizationResponse] - " + pCallback.m_unAppID + " -- " + pCallback.m_ulOrderID + " -- " + pCallback.m_bAuthorized);
 }
Esempio n. 7
0
 public MicroTxnAuthorizationResponseEvent(MicroTxnAuthorizationResponse_t response)
 {
     this.OrderId   = response.m_ulOrderID.ToString();
     this.AppId     = response.m_unAppID;
     this.Autorized = response.m_bAuthorized != 0;
 }
 void OnMicroTxnAuthorizationResponse(MicroTxnAuthorizationResponse_t pCallback)
 {
     Console.WriteLine("[" + MicroTxnAuthorizationResponse_t.k_iCallback + " - MicroTxnAuthorizationResponse] - " + pCallback.m_unAppID + " -- " + pCallback.m_ulOrderID + " -- " + pCallback.m_bAuthorized);
 }
Esempio n. 9
0
 private void OnTransactionResponse(MicroTxnAuthorizationResponse_t pCallback)
 {
     GIAPManager.Instance.FinalizeSteamPurchase();
 }
Esempio n. 10
0
 private void OnPurchaseResult(MicroTxnAuthorizationResponse_t pCallback)
 {
     this.CheckForResult = true;
 }