Skip to content

Commit

Permalink
Fix purchase cart logic in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisRakhimovXsolla committed Mar 27, 2023
1 parent c21368c commit 4b64941
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Xsolla.Demo/Store/Scripts/Sdk/SdkPurchaseLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ public void PurchaseCart(List<UserCartItem> items, RestrictedPaymentAllower rest
OrderTracking.Instance.AddOrderForTracking(XsollaSettings.StoreProjectId, data.order_id,
onSuccess: () =>
{
if (BrowserHelper.Instance.InAppBrowser?.IsOpened ?? false)
BrowserHelper.Instance.Close();

onSuccess?.Invoke(items);
PurchaseCartEvent?.Invoke(items);

if (BrowserHelper.Instance.InAppBrowser?.IsOpened ?? false)
BrowserHelper.Instance.Close();
},
onError);

Expand Down

0 comments on commit 4b64941

Please sign in to comment.