بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.
العنصر المدفوع بمال حقيقي هو عنصر متجر يدفع اللاعب ثمنه في App Store أو Google Play. يتقاضى المتجر
المبلغ من اللاعب، ثم يسأل Flock المتجرَ هل عملية الشراء حقيقية، ثم يسلّم العنصر. وتستدعي لعبتك الدالة
نفسها التي تستدعيها لأي عنصر: Shop.PurchaseAsync(item.Id) في Unity، والدالة Purchase لمزوّد المتجر
(العقدة Flock Purchase) في Unreal.
Player taps Buy ──▶ store charges ──▶ Flock checks with the store ──▶ item delivered ──▶ store purchase finished
لا تُنهى عملية الشراء في المتجر إلا بعد أن يسلّم Flock العنصر، لذا لا يُضيع تعطّلُ اللعبة أو انقطاعُ
الاتصال بينهما ما دفعه اللاعب: يعيد المتجر عملية الشراء عند التشغيل التالي فيسلّمها Flock حينها.
وتُسلَّم عملية الشراء الواحدة في المتجر مرة واحدة، مهما أُرسلت من مرات.
تحتاج المشتريات بالمال الحقيقي إلى حزمة تطوير Flock لـ Unity بالإصدار 1.98.0 أو أحدث، أو إلى حزمة تطوير
Flock لـ Unreal بالإصدار 1.45.0 أو أحدث (وعقد Blueprint الخاصة بها من 1.47.0). ولا تحتاج مشتريات المحفظة
إلى أيٍّ منهما: راجع المتاجر والمخزون.
تحتاج Unity إلى Unity IAP 5 (com.unity.purchasing 5.x) في المشروع. وعلى Android، اجعل Minimum
API Level 23 أو أعلى (Player Settings → Other Settings): فمكتبة Google Play Billing في Unity IAP 5
تحتاجه، ومشروع Unity 2021.3 يبدأ بـ 22، فيتوقف بناؤه بخطأ في دمج ملف البيان.
لا تحتاج Unreal إلى تثبيت أي شيء: يصل Flock إلى المتجر عبر النظام الفرعي للخدمات عبر الإنترنت في
المحرّك (online subsystem)، ويفعّله بنفسه. ويحتاج Google Play إلى UE 5.8 أو أحدث، فهو أول محرّك بمكتبة
Billing لا يزال Google Play يقبلها؛ وعلى UE 5.4 حتى 5.7 يُرفض ربط المتجر.
اربط كل متجر بـ Flock من لوحة التحكم، بمفاتيح لعبتك الخاصة.
سعّر العناصر بمال حقيقي وأعطِ كلًّا منها معرّف منتجه في المتجر.
أنشئ المنتجات في المتجر بتلك المعرّفات.
اربط المتجر داخل لعبتك مرة واحدة عند البدء.
تحقّق من الإعداد من داخل اللعبة.
1
اربط المتاجر بـ Flock
افتح Monetization → Payments في لوحة تحكم Flock واربط كل متجر تبيع فيه. يستخدم Flock هذه المفاتيح
ليسأل المتجر عن عملية الشراء، ولا تصل أبدًا إلى جهاز اللاعب.
من القائمة أعلى الصفحة اختر اللعبة: فكل لعبة تربط متاجرها الخاصة.
في تبويب Providers، تحت Mobile stores، اضغط Connect بجانب Google Play أو App Store.
املأ كل الحقول كما يقول الجدولان أدناه، واترك Active مفعّلًا.
اضغط Save. علامة النجاح: يظهر المتجر بحالة Connected ويسمّي المفاتيح التي يحملها.
تُشفَّر المفاتيح قبل حفظها ولا تُعرض ثانيةً: فلتستبدل أحدها اضغط Update keys وأدخل كل الحقول من
جديد. ولا يربط المتاجرَ إلا مسؤولو الاستوديو ومديروه. ويسرد تبويب Sales كل عملية بيع، ويستردّ
إحداها حين تضغط Refund.
Google Play
App Store
الحقل
ما تُدخله
Package name
اسم حزمة تطبيقك كما في Google Play Console (مثلًا com.studio.game)
Service account JSON
النص الكامل لمفتاح JSON لحساب خدمة في Google Cloud
لإنشاء حساب الخدمة:
في Google Cloud console، وفي أي مشروع، فعّل Google Play Android Developer API.
أنشئ هناك حساب خدمة (service account)، وأضف إليه مفتاح JSON. يُنزَّل المفتاح ملفًّا.
في Google Play Console، تحت Users and permissions، ادعُ عنوان البريد الإلكتروني لحساب الخدمة،
وامنحه تطبيقك، واسمح له بـ View financial data وManage orders and subscriptions.
الصق النص الكامل لملف JSON في Service account JSON.
قد تستغرق Google وقتًا لتقبل حساب خدمة جديدًا. وإلى أن تقبله، يخبرك التحقّق من الإعداد أدناه بأن
المتجر رفض مفاتيحك. وفي اختبارنا، سرى مفعوله بعد دقيقة من إعادة حفظ أحد منتجات التطبيق في Play
Console.
الحقل
ما تُدخله
Issuer ID
من App Store Connect، Users and Access → Integrations → In-App Purchase
Key ID
المفتاح الذي تُنشئه في تلك الصفحة
Private key
النص الكامل لملف .p8 الذي يُنزَّل به ذلك المفتاح
Bundle ID
معرّف حزمة تطبيقك (bundle identifier)
ويعرض نموذج كل متجر أيضًا Notification URL. أعطِه للمتجر (App Store Server Notifications في App
Store Connect، وreal-time developer notifications في Google Play) ليعلم Flock بعمليات الاسترداد.
2
سعّر العناصر بمال حقيقي
يكون العنصر مدفوعًا بمال حقيقي حين تكون عملته إحدى Real Currencies في إعدادات العملات لإصدار لعبته.
(Monetization → Currencies، تبويب Real Currencies؛ راجع العملات والمحافظ).
وفي نموذج العنصر (Monetization → Shops، تبويب Items للمتجر؛ راجع
المتاجر والمخزون)، اكتب Price كما يراه اللاعب، مثل 3.99؛ فالخادم
يحفظه بأصغر وحدة للعملة، فتقرأ حزمة التطوير 399 بعملة SAR لسعر SAR 3.99. علامة النجاح: يظهر على
بطاقة العنصر Real money.وعلى كل عنصر من هذه العناصر، تحت Store product IDs، أدخل معرّف منتجه لكل متجر، تمامًا كما يكتبه
المتجر. ويحدّد نوع العنصر نوع المنتج في المتجر:
نوع العنصر
منتج المتجر
ما يحصل عليه اللاعب
حزمة عملة
قابل للاستهلاك
مكافآتها، مباشرةً في المحفظة
قابل للاستهلاك
قابل للاستهلاك
مدخل في المخزون، يُستخدم لاحقًا بـ ConsumeOneAsync (في Unreal: ConsumeOne)
قياسي
لمرة واحدة (غير قابل للاستهلاك)
مدخل في المخزون. ويبيعه المتجر مرة واحدة لكل حساب متجر
3
أنشئ المنتجات في المتجر
أنشئ كل منتج بالمعرّف نفسه: في Google Play Console تحت Monetize → Products → One-time products،
وفي App Store Connect تحت In-App Purchases لتطبيقك. ثم فعّله. والسعر الذي يراه اللاعب هو ما
يحدّده المتجر لبلده.
4
اربط المتجر داخل لعبتك
اربطه مرة واحدة بعد بدء حزمة التطوير، واحتفظ بالاتصال طوال الجلسة. وعلى الهاتف يُعثر على المتجر
تلقائيًا، وعلى Windows وmacOS وLinux وWebGL يربط الاستدعاء نفسه الدفع عبر صفحة ويب بدلًا منه
(الدفع عبر الويب).
Unity
Unreal
لا يستطيع محرّر Unity أن يُريك شراءً من المتجر ينجح. فهو يربط الدفع عبر صفحة ويب ما لم يكن هدف
البناء Android أو iOS، وحينها يجيب المتجر الوهمي في Unity IAP، وترفض Flock مشترياته. ولترى شراءً
من المتجر يتمّ، ابنِ اللعبة على جهاز فيه المتجر (راجع اختبر قبل الإطلاق).ثبّت Unity IAP 5 أولًا: افتح Window → Package Manager، وانقر +، واختر Add package by
name… (Install package by name… في Unity 6)، وأدخل com.unity.purchasing وإصدارًا من 5.x.
ولـ Android، اضبط أيضًا Minimum API Level على 23 أو أعلى في Edit → Project Settings → Player →
Android → Other Settings.ثم أضف هذا المكوّن إلى كائن في أول مشهد للعبتك. وRefreshTheShop مكان شيفرتك أنت التي تقرأ المحفظة
والمخزون من جديد وتعيد رسم المتجر.
using Flock.Exceptions;using Flock.Providers;using UnityEngine;public class GameStore : MonoBehaviour{ FlockStore store; async void Start() { try { store = await FlockStore.ConnectAsync(); } catch (FlockException e) { Debug.LogWarning(e.Message); // what is wrong, then a Fix: line return; } // Every real-money purchase Flock delivers, the ones PurchaseAsync answers included: // refresh what the screen shows here. store.PurchaseCompleted += (item, result) => RefreshTheShop(); // A purchase the player paid for that Flock could not deliver. It comes back at the next launch. store.PurchaseNotDelivered += purchase => Debug.LogWarning(purchase.Error.Message); } void OnDestroy() => store?.Dispose(); void RefreshTheShop() { // Read the wallet and inventory again, then redraw the shop. }}
ومن الآن تشتري Shop.PurchaseAsync العناصر المدفوعة بمال حقيقي عبر هذا الاتصال. ومن دونه، ترفض العنصر
المدفوع بمال حقيقي قبل إرسال أي شيء، وتطلب منك ربط المتجر. ويُرفض ربط متجر حين لا تكون Unity IAP 5
مثبّتة. وتستخدم الأمثلة أدناه store هذا.
أعِدّ المتجر في المشروع أولًا:
Android (UE 5.8 أو أحدث): في Project Settings → Platforms → Android، فعّل Enable Google Play
Support، وأدخل مفتاح ترخيص Google Play للعبة، وأضف الإذن com.android.vending.BILLING. وأبقِ
bSupportsInAppPurchasing=true تحت [OnlineSubsystemGooglePlay.Store] (القيمة الافتراضية في المحرّك).
ولا يقبل Google Play الإصدارات الجديدة إلا بمكتبة Billing حديثة، ولا يأتي بها إلا UE 5.8؛ وعلى UE 5.4
إلى 5.7 تسلّم اللعبة التي لها شيفرة فوترة خاصة كل عملية شراء إلى Flock بنفسها
(شيفرة المتجر الخاصة بك في Unreal).
iOS: في Project Settings → Platforms → iOS، فعّل Enable StoreKit Support، وأضف إمكانية
In-App Purchase إلى التطبيق. ودعم Flock لمتجر App Store مكتوب على شيفرة StoreKit في المحرّك نفسه ولم
يُشغَّل بعد على iPhone: اشترِ في بيئة sandbox الخاصة بمتجر App Store قبل أن تنشر لعبتك.
Windows وMac وLinux لا متجر هاتف فيها: فالعناصر المدفوعة بمال حقيقي تُشترى عبر
الدفع عبر الويب. ولا يجوز لإصدار Steam أن يستعمله، إذ لا يسمح Steam
بالدفع إلا عبر محفظته؛ وليس في Flock مزوّد متجر لـ Steam ولا لـ Epic Games Store ولا لأجهزة الألعاب.
ثم اربطه بعد أن يكتمل تهيؤ Flock. ويحتفظ النظام الفرعي لـ Flock بالاتصال (Sdk->GetStore()) حتى
يُفصل أو يُغلق Flock.
#include "FlockSubsystem.h"#include "Store/FlockStore.h"UFlockSubsystem* Sdk = UFlockSubsystem::Get(this); // this: any object in the game's worldUFlockStore::Connect(Sdk, FFlockStoreOptions(), [](TFlockResult<UFlockStore*> Connected){ if (!Connected.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Connected.Error.ToDisplayText()); // what is wrong, then a Fix: line return; } // Every real-money purchase Flock delivers, the ones Purchase answers included: // refresh what the screen shows here. Connected.Value->OnPurchaseCompleted.AddLambda([](const FFlockShopItem& Item, const FFlockPurchaseResult& Result) { }); // A purchase the player paid for that Flock refused to deliver, or whose delivery is unknown // (Purchase.Error.bOutcomeUnknown: Flock may have delivered it). It stays unfinished in the store // and is sent again at the next launch, or by Restore: tell the player it will arrive. Connected.Value->OnPurchaseNotDelivered.AddLambda([](const FFlockUndeliveredPurchase& Purchase) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Purchase.Error.ToDisplayText()); });});
ومن الآن تشتري Purchase لمزوّد المتجر العناصر المدفوعة بمال حقيقي عبر هذا الاتصال. ومن دونه، ترفض
العنصر المدفوع بمال حقيقي قبل إرسال أي شيء، وتطلب منك ربط المتجر. اترك
FFlockStoreOptions::PaymentProvider فارغًا لطريقة الدفع الخاصة بهذه المنصة. ويُرفض Connect:
حين لا تكون وحدة المتجر في Flock محمَّلة، مثلًا حين تُعطَّل إضافة Online Subsystem في المحرّك: فقواعد
متاجر الهواتف تمنع الدفع مقابل السلع الرقمية في مكان آخر، لذا لا يفتح Flock صفحة ويب بدلًا منه أبدًا؛
على Android بمحرّك أقدم من UE 5.8، أو مع bDisableLocalAcknowledgeAndConsume=true تحت
[OnlineSubsystemGooglePlay.Store] (إذ لن يُنهي المحرّك حينها شيئًا مما يسلّمه Flock)؛
لبوابة دفع (Stripe أو Tap أو Moyasar) تُسمّى على Android أو iOS: فقواعد متاجر الهواتف تمنع الدفع
مقابل السلع الرقمية في صفحة ويب؛
لقيمة PaymentProvider لا يعرفها Flock: سمِّ واحدة من FlockPaymentProviders، أو اتركها فارغة؛
على منصة ليست هاتفًا ولا Windows أو Mac أو Linux (جهاز ألعاب): فلا متجر فيها يدفع Flock عبره، ولا
يُفتح الدفع عبر الويب إلا على حاسوب؛
ما دام اتصال آخر قائمًا: استخدم ذلك الاتصال، أو افصله أولًا.
الإيصالات غير مربوطة بحساب اللاعب في المتجر، على Android وiOS معًا. فالمحرّك يُجزّئ معرّف الحساب قبل أن يراه Google ولا
يمرّر أيًّا منه إلى Apple، لذا لا يرسل Flock شيئًا، ويَسِم الخادم كل عملية شراء كهذه بأنها غير مربوطة:
فالإيصال المأخوذ من جهاز يمكن أن يُستردّ مرة واحدة بحساب Flock آخر.في Blueprint، استدعِ Flock Connect Store (تحت Flock | Store) من Call or Register on
Initialized في أحداث Flock (Get Events)، الذي يعمل فورًا إن كان Flock قد تهيأ. واترك منفذ Options
دون توصيل لتأخذ كل القيم الافتراضية. واربط On Store Purchase Completed وOn Store Purchase Not
Delivered في أحداث Flock مرة واحدة: فهما يسمعان كل عملية تسليم يبلغ عنها المتجر المتصل، أيًّا كان
الاتصال الذي أجراها.
اربط المتجر حين يصبح Flock جاهزًا، ثم اشترِ: تميّز Is Purchase Paid عملية الشراء المسلَّمة من تلك التي لا يزال المتجر ينتظر دفعها.
لا تشتري الصورة فور الاتصال إلا لتبقى قصيرة. أما في لعبتك، فاربط المتجر مرة واحدة عند البدء كما سبق،
وشغّل Flock Purchase من زر الشراء لدى اللاعب بمعرّف Id لعنصر قُرئ من متجره (Flock Get Shop By
Name، ثم Shop Items فيه، ثم Id كل عنصر): فـ gem_pack_small معرّف عنصر على سبيل المثال، وليس اسمًا.
5
تحقّق من الإعداد
يسأل التحقّق من الإعداد المتجرَ وخادمَ Flock هل كل شيء في مكانه، دون شراء أي شيء. ويحتاج إلى لاعب مسجَّل
دخوله، لذا شغّله من زر للمطوّر بعد تسجيل الدخول أثناء الإعداد.
Unity
Unreal
ترمي CheckSetupAsync الاستثناء FlockAuthException من دون لاعب مسجَّل دخوله، فسجّل دخول اللاعب
أولًا (صادِق لاعبًا). ويعمل الرمز داخل دالة async.
using Flock.Models;using Flock.Providers;using UnityEngine;FlockStoreSetupCheck check = await store.CheckSetupAsync();if (check.IsReady) Debug.Log("The store has every item, and Flock can check purchases with your keys.");foreach (ShopItem item in check.NotFoundInTheStore) Debug.Log($"{item.Name}: the store has no product with this item's id.");foreach (ShopItem item in check.MissingProductId) Debug.Log($"{item.Name}: no product id for this store on the item.");if (check.ServerProblem != null) Debug.Log(check.ServerProblem.Message); // the keys in Monetization > Payments, and how to fix themif (check.NotChecked != null) Debug.Log(check.NotChecked); // on a web checkout: the gateway, and how to check it instead
تفشل CheckSetup (Auth) من دون لاعب مسجَّل دخوله.
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}Store->CheckSetup([](TFlockResult<FFlockStoreSetupCheck> Checked){ if (!Checked.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Checked.Error.ToDisplayText()); // no player signed in, for one return; } const FFlockStoreSetupCheck& Check = Checked.Value; if (Check.IsReady()) { UE_LOG(LogTemp, Display, TEXT("The store has every item, and Flock can check purchases with your keys.")); } for (const FFlockShopItem& Item : Check.NotFoundInTheStore) { UE_LOG(LogTemp, Display, TEXT("%s: the store has no product with this item's id."), *Item.Name); } for (const FFlockShopItem& Item : Check.MissingProductId) { UE_LOG(LogTemp, Display, TEXT("%s: no product id for this store on the item."), *Item.Name); } if (Check.bHasServerProblem) { // The keys in Monetization → Payments, and how to fix them. UE_LOG(LogTemp, Display, TEXT("%s"), *Check.ServerProblem.ToDisplayText()); }});
وفي Blueprint هذه هي Flock Check Store Setup؛ وتقول Is Store Ready هل يحتاج شيء إلى إصلاح.
اعرض السعر الذي يعطيه المتجر، وهو بعملة اللاعب ومع ضرائبه، بدل سعر العنصر في Flock.
Unity
Unreal
وitem عنصر ShopItem مدفوع بمال حقيقي مقروء من متجره.
using Flock.Providers;FlockStorePrice price = store.GetPrice(item.Id);string label = price != null ? price.Text : "Not available"; // e.g. "SAR 4.59", "$1.09"
وتكون قيمة GetPrice هي null حين لا يجد المتجر المنتج. والأسعار في التعليق أمثلة فقط: فالنص هو نص
المتجر نفسه. وفي الدفع عبر صفحة ويب يعطي GetPrice سعر العنصر نفسه، ولا تكون قيمته null أبدًا.
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}// Item: an FFlockShopItem read from its shop.const TFlockResult<FFlockStorePrice> Price = Store->GetPrice(Item.Id);const FString Label = Price.bSuccess && Price.Value.bFoundInTheStore ? Price.Value.Text // e.g. "SAR 4.59", "$1.09" : FString(TEXT("Not available"));
تكون bFoundInTheStore خاطئة حين لا يجد المتجر المنتج. وتفشل GetPrice (Validation) لعنصر لم يكن في
متاجر اللعبة حين اتصل المتجر، أو لا معرّف منتج له لهذا المتجر. والأسعار في التعليق أمثلة فقط: فالنص هو نص
المتجر نفسه. وفي الدفع عبر صفحة ويب تعطي سعر العنصر نفسه. وفي Blueprint هذه هي Flock Get Store Price:
تُرجع false مع Error يقول السبب حين لا يكون أي متجر متصلًا أو لا سعر للعنصر هنا.
يعمل الرمز داخل دالة async؛ وitem عنصر ShopItem بمال حقيقي مقروء من متجره (راجع
المتاجر والمخزون)، وShowReward وShowWaitingForPayment مكان
شاشاتك أنت.
using Flock;using Flock.Exceptions;using Flock.Models;using Flock.Providers;using UnityEngine;try{ PurchaseResult bought = await FlockClient.Instance.Shop.PurchaseAsync(item.Id); if (bought.IsPaid) ShowReward(bought.Granted); // delivered else ShowWaitingForPayment(); // pending: PurchaseCompleted reports it once paid}catch (FlockStoreException e) when (e.Reason == FlockStoreFailureReasons.Cancelled){ // The player closed the store's dialog. Nothing was charged.}catch (FlockStoreException e) when (e.Reason == FlockStoreFailureReasons.AlreadyOwned){ // This store account already owns the one-time item: offer Restore purchases.}catch (FlockStoreException e){ // No payment went through (declined, not available, store down, a web checkout refunded...). Nothing was bought. Debug.Log(e.Reason + ": " + e.Message);}catch (FlockException e) when (e.OutcomeUnknown){ // No answer said whether Flock delivered. Read the wallet and inventory again.}catch (FlockException e){ // The player paid, and Flock refused the purchase (e.ErrorCode says why). The store keeps it, // and it is sent again at the next launch. PurchaseNotDelivered reports it too. Debug.LogWarning(e.Message);}
كل الحالات باختصار:
ما الذي يحدث
ما تفعله PurchaseAsync
ما يراه اللاعب
دُفع وسُلّم
تعود، وIsPaid صحيحة
المكافأة
ينتظر المتجر الدفع (طريقة دفع بطيئة، أو «Ask to Buy»)
تعود، وStatus قيمتها pending
«بانتظار الدفع»؛ ثم يتبعها PurchaseCompleted بعد الدفع
ألغى اللاعب
ترمي FlockStoreException بالسبب Cancelled
لا شيء؛ ولم يُخصم شيء
رُفض الدفع (App Store)
FlockStoreException بالسبب PaymentDeclined
جرّب طريقة دفع أخرى؛ ولم يُخصم شيء
عنصر لمرة واحدة مملوك سلفًا
FlockStoreException بالسبب AlreadyOwned
اعرض استعادة المشتريات
عملية شراء سابقة له لا تزال تنتظر
FlockStoreException بالسبب AlreadyPending
يصل عبر PurchaseCompleted
المنتج غير موجود في المتجر
FlockStoreException بالسبب ProductUnavailable
تحقّق من معرّف المنتج (يسرده التحقّق من الإعداد)
المتجر غير متصل أو معطَّل، أو رفض Google Play الدفع (يُبلغ Google عن الحالتين بالطريقة نفسها)
FlockStoreException بالسبب StoreUnavailable
تحقّق من الاتصال ومن طريقة الدفع، ثم حاول مجددًا؛ ولم يُخصم شيء
لا أحد مسجَّل دخوله في المتجر
FlockStoreException بالسبب NotSignedInToTheStore
سجّل الدخول إلى المتجر، ثم حاول مجددًا
دُفع، ورفضه Flock
ترمي FlockException برمزه
يُسلَّم في تشغيل لاحق بعد الإصلاح
لا ردّ من Flock
FlockException، وOutcomeUnknown صحيحة
اقرأ المحفظة والمخزون من جديد
وإن ألغيتَ CancellationToken الخاص بالاستدعاء، تستمر عملية الشراء في المتجر، ويُبلغ عنها
PurchaseCompleted بعد الدفع. وإن سجّل اللاعب خروجه ومربع حوار المتجر مفتوح، ينتهي الاستدعاء كذلك
بالإلغاء، وتُسلَّم عملية الشراء في المتجر بعد الدفع إلى اللاعب الذي اشتراها عند تسجيل دخول لاحق، أو عبر استعادة المشتريات.
UFlockSubsystem* Sdk = UFlockSubsystem::Get(this);const TWeakObjectPtr<UFlockSubsystem> WeakSdk(Sdk);// Item: an FFlockShopItem read from its shop.Sdk->GetShopProvider()->Purchase(Item.Id, [WeakSdk](TFlockResult<FFlockPurchaseResult> Bought){ if (Bought.bSuccess && Bought.Value.IsPaid()) { return; // delivered: Bought.Value.Granted lists what the player got } if (Bought.bSuccess) { return; // pending: show "Waiting for payment"; OnPurchaseCompleted reports it once paid } const FFlockError& Error = Bought.Error; if (Error.Type == EFlockErrorType::Store) { // The store did not take the payment. Nothing was charged. if (Error.StoreFailureReason.Equals(FlockStoreFailureReasons::Cancelled, ESearchCase::CaseSensitive)) { return; // the player closed the store's dialog } if (Error.StoreFailureReason.Equals(FlockStoreFailureReasons::AlreadyOwned, ESearchCase::CaseSensitive)) { return; // this store account already owns the one-time item: offer Restore purchases } UE_LOG(LogTemp, Warning, TEXT("%s"), *Error.ToDisplayText()); // declined, not available, store down... return; } if (Error.bOutcomeUnknown) { UFlockSubsystem* Flock = WeakSdk.Get(); UFlockStore* Store = Flock ? Flock->GetStore() : nullptr; if (Store && Store->IsWebCheckout()) { // The payment page may still be paid: read the open checkouts before offering the item // again. One paid meanwhile is reported through OnPurchaseCompleted. Store->Restore([](TFlockResult<FFlockStoreRestore> Read) {}); return; } // A phone's store took the payment; only Flock's delivery is unknown. Tell the player it will // arrive, and never offer the item again on this answer: OnPurchaseCompleted reports it once // delivered, at the next launch or after Restore purchases. return; } if (Error.Type == EFlockErrorType::Cancelled) { return; // the player signed out or changed: a payment already made is still delivered (see below) } if (Error.Type == EFlockErrorType::Auth && Error.StatusCode != 403) { // The sign-in was refused or has ended. Sign the player in again: a payment already made stays // unfinished in the store, raises no OnPurchaseNotDelivered, and is delivered after that sign-in. return; } // Otherwise Flock refused it. Most refusals come before the store's dialog opens, and nothing was // charged: another store purchase under way, the item no longer for sale, nobody signed in. If the // player paid and Flock refused the delivery, OnPurchaseNotDelivered reported it just before this // answer: the store keeps the purchase and sends it again at the next launch, so do not sell it again. // Error.ToDisplayText() says which, and how to fix it. UE_LOG(LogTemp, Warning, TEXT("%s"), *Error.ToDisplayText());});
كل الحالات باختصار:
ما الذي يحدث
ما تكتمل به Purchase
ما يراه اللاعب
دُفع وسُلّم
نجاح، وIsPaid() صحيحة
المكافأة
ينتظر المتجر الدفع (طريقة دفع بطيئة، أو «Ask to Buy»)
«بانتظار الدفع»؛ ثم يتبعها OnPurchaseCompleted بعد الدفع
ألغى اللاعب
فشل من النوع Store، وStoreFailureReason قيمته Cancelled
لا شيء؛ ولم يُخصم شيء
رُفض الدفع (App Store)
Store بالسبب PaymentDeclined
جرّب طريقة دفع أخرى؛ ولم يُخصم شيء
عنصر لمرة واحدة مملوك سلفًا
Store بالسبب AlreadyOwned
اعرض استعادة المشتريات
عملية شراء سابقة له لا تزال تنتظر
Store بالسبب AlreadyPending
يصل عبر OnPurchaseCompleted
المنتج غير موجود في المتجر
Store بالسبب ProductUnavailable
تحقّق من معرّف المنتج (يسرده التحقّق من الإعداد)
المتجر غير متصل أو معطَّل، أو رفض Google Play الدفع
Store بالسبب StoreUnavailable
تحقّق من الاتصال ومن طريقة الدفع، ثم حاول مجددًا؛ ولم يُخصم شيء
لا أحد مسجَّل دخوله في المتجر
Store بالسبب NotSignedInToTheStore
سجّل الدخول إلى المتجر، ثم حاول مجددًا
عملية شراء ثانية من المتجر وأخرى جارية
Validation
انتظر حتى تنتهي الأولى؛ ولم يُخصم شيء
رُفضت قبل مربع حوار المتجر: لم يعد العنصر معروضًا للبيع، أو لا أحد مسجَّل دخوله في Flock
Validation (ShopItemNotForSale) أو Auth
لم يُخصم شيء: اقرأ المتجر من جديد، أو سجّل الدخول أولًا
سجّل اللاعب خروجه أو تغيّر أثناء العملية
Cancelled
الدفعة التي تمّت تُسلَّم مع ذلك (انظر أدناه)
دُفع، ورفضه Flock
فشل برمزه في ErrorCode؛ ويُبلغ عنه OnPurchaseNotDelivered قبله مباشرة
يُسلَّم في تشغيل لاحق بعد الإصلاح؛ فلا تبِعه مجددًا
لا ردّ من Flock، في متجر الهاتف
فشل وbOutcomeUnknown صحيحة؛ وقد يُبلغ عنه OnPurchaseNotDelivered أيضًا
دُفع: أخبر اللاعب أنه سيصل. ويُبلغ عنه OnPurchaseCompleted في التشغيل التالي، أو بعد استعادة المشتريات. ولا تعرض العنصر مجددًا بناءً على هذا الرد
لا ردّ من Flock، في الدفع عبر صفحة ويب
فشل وbOutcomeUnknown صحيحة
قد تظل صفحة الدفع قابلة للدفع: اقرأ عمليات الدفع المفتوحة بـ Restore قبل أن تعرضه مجددًا
يُبقي المتجر مربع حوار شراء واحدًا مفتوحًا في كل مرة، لذا تُرفض عملية شراء ثانية، لأي عنصر، حتى تنتهي
الأولى. وإن سجّل اللاعب خروجه، أو سجّل لاعب آخر دخوله، ومربع حوار المتجر مفتوح، ينتهي الاستدعاء بـ
Cancelled؛ والدفعة التي تأتي بعد ذلك تُسلَّم حين يسجّل اللاعب الذي فتح مربع الحوار دخوله من جديد في تشغيل
اللعبة نفسه. وبعد إعادة التشغيل يعيدها المتجر إلى من يكون مسجَّل الدخول حينها، أو إلى استعادة المشتريات.يُبلغ OnPurchaseNotDelivered عن تسليم رفضه Flock، وكذلك عن تسليم لم يصل ردّه قط (Error.bOutcomeUnknown)،
وربما أجراه Flock. وفي الحالتين يحتفظ المتجر بعملية الشراء ويرسلها من جديد، فعاملها على أنها في طريقها، لا
على أنها ضاعت ولا على أنها شيء تبيعه مجددًا.في Blueprint، اشترِ بـ Flock Purchase (تحت Flock | Shop). قد يحمل منفذ النجاح فيها عملية شراء لا
يزال المتجر ينتظر دفعها: تحقّق من Is Purchase Paid قبل تسليم أي شيء؛ ويتبعها On Store Purchase
Completed بعد الدفع. وفي منفذ الفشل، قارن Store Failure Reason في Error بعُقد Flock Store Failure
Reason (Cancelled وPayment Declined وAlready Owned وAlready Pending وProduct Unavailable
وStore Unavailable وNot Signed In To The Store وExpired وUnknown)، وتحقّق من Outcome Unknown.
فقيمتها الصحيحة تعني أنه لم يصل رد:
في متجر الهاتف دفع اللاعب، ولا يُعرف إلا مصير تسليم Flock. أخبره أنه سيصل، ولا تعرض العنصر مجددًا
بناءً على هذا الرد؛ ويُبلغ عنه On Store Purchase Completed في التشغيل التالي، أو بعد Flock Restore
Purchases.
في الدفع عبر صفحة ويب (Is Web Checkout على Flock Get Store) قد تظل صفحة الدفع قابلة للدفع.
شغّل Flock Restore Purchases، التي تقرأ عمليات الدفع المفتوحة للاعب، قبل أن تعرض العنصر مجددًا.
يستعيد اللاعب على هاتف جديد، أو بعد إعادة التثبيت، عناصره ذات المرة الواحدة بزر استعادة المشتريات.
ابدأها من زر بعد أن يسجّل اللاعب الدخول إلى Flock: فمن دون لاعب مسجَّل دخوله تفشل. وفي App Store تطلب
أيضًا من اللاعب تسجيل الدخول إلى المتجر.
Unity
Unreal
ترمي RestoreAsync الاستثناء FlockAuthException من دون لاعب مسجَّل دخوله. ويعمل الرمز داخل
دالة async.
using Flock.Models;using Flock.Providers;using UnityEngine;FlockStoreRestore restore = await store.RestoreAsync();foreach (ShopItem item in restore.Restored) Debug.Log("Restored " + item.Name);foreach (FlockUndeliveredPurchase purchase in restore.NotDelivered) Debug.Log(purchase.ProductId + ": " + purchase.Error.Message); // e.g. bought by another Flock player
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}Store->Restore([](TFlockResult<FFlockStoreRestore> Restored){ if (!Restored.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Restored.Error.ToDisplayText()); // no player signed in, for one return; } for (const FFlockShopItem& Item : Restored.Value.Restored) { UE_LOG(LogTemp, Display, TEXT("Restored %s"), *Item.Name); } for (const FFlockUndeliveredPurchase& Purchase : Restored.Value.NotDelivered) { // e.g. bought by another Flock player UE_LOG(LogTemp, Display, TEXT("%s: %s"), *Purchase.ProductId, *Purchase.Error.ToDisplayText()); }});
تجري استعادة واحدة في كل مرة على متجر الهاتف: وتُرفض الثانية حتى تكتمل الأولى. وفي Blueprint هذه هي
Flock Restore Purchases (Restored وNot Delivered).
وعملية الشراء التي سُلّمت من قبل لا تمنح شيئًا مرة أخرى. وتعود العناصر ذات المرة الواحدة إلى لاعب
Flock الذي اشتراها، لذا يجب أن يسجّل اللاعب الدخول إلى حساب Flock نفسه (فتسجيل الدخول بالجهاز مرتبط
بالجهاز؛ اربط الحساب ليحتفظ بمشترياته عبر الأجهزة). راجع ربط الحسابات.
تنتهي بعض المشتريات بعد الاستدعاء: دفعة تُسوّى لاحقًا، أو عملية شراء قاطعها تعطّل أو انقطاع اتصال.
يعيد المتجر كلًّا منها حين تتصل به اللعبة؛ وما إن يُسجّل اللاعب دخوله حتى يسلّمها Flock ويُبلغ عنها
PurchaseCompleted (في Unreal: OnPurchaseCompleted، أو On Store Purchase Completed في Blueprint).
وما تعذّر فيه الوصول إلى Flock يُرسَل من جديد في التشغيل التالي، أو فورًا حين يضغط اللاعب استعادة
المشتريات. اشترك فيه قبل أن يحتاجه أي شيء آخر، واستخدمه لتحديث المتجر والمحفظة.
اجعل العنصر، أو متجره، غير نشط في لوحة التحكم. فلا تعرضه قراءات المتجر للاعبين من فورها، ويتحقّق
استدعاء الشراء مع Flock قبيل نافذة المتجر مباشرة، فإن كانت اللعبة لا تزال تعرض العنصر رُفض الشراء بـ
ShopItemNotForSale ولا يقتطع المتجر شيئًا. أما عملية الشراء التي دفعها اللاعب فتُسلَّم مع ذلك: إذ تحتفظ
اللعبة بالمنتجات التي باعتها، فتُسلَّم عملية الشراء غير المكتملة لعنصر غير نشط عند التشغيل التالي، وتعيد
الاستعادة العناصر التي تُشترى مرة واحدة.
في محرّر Unity، تحدّد منصة البناء ذلك: فإن اخترت Android أو iOS أجاب المتجر الوهمي لـ Unity IAP. وعلى منصة
بناء أخرى، سمِّ المتجر الذي تختبر به:
FlockStore.ConnectAsync(new FlockStoreOptions { PaymentProvider = PaymentProviders.GooglePlay }). ويعمل التحقّق من الإعداد هناك ويختبر مفاتيحك،
لكن Flock يرفض مشتريات المتجر الوهمي، فتنتهي عملية الشراء في المحرّر دون تسليم.
في Unreal، لا يُوصل إلى المتجر إلا على جهاز Android أو iOS: ففي المحرّر وعلى Windows وmacOS وLinux
يُنشئ Connect دفعًا عبر صفحة ويب. اختبر مشتريات المتجر على جهاز، بعد تثبيت اللعبة كما يلي.
Google Play: ارفع بناءً إلى مسار internal testing، وأضف المختبرين تحت License testing في
Play Console، وثبّت اللعبة من رابط الاختبار في Play Store. ولا تُحتسب مشتريات المختبر.
App Store: استخدم مختبر Sandbox من App Store Connect على جهاز.
يسجّل Flock الإيرادات على الخادم، مرة واحدة لكل عملية شراء في المتجر، بسعر العنصر في Flock وعملته.
ولا ترسل حزمة التطوير أي إيرادات من عندها لعملية شراء في المتجر، ولا تُحتسب عملية شراء المحفظة إيرادًا
أبدًا.
يقول كل فشل ما الخطأ وكيف تصلحه: في Unity في Message، والإصلاح في سطر Fix:؛ وفي Unreal في
Error.ToDisplayText()، والإصلاح في Error.Hint. وفي Unreal يكون كل رمز أدناه EFlockErrorCode:: متبوعًا
باسمه. وهذه رموز عملية الشراء في المتجر:
الرمز
ما الذي حدث
ما العمل
PaymentProviderStoreCredentialsRejected
رفض المتجر مفاتيح لعبتك
تحقّق من المفاتيح في Monetization → Payments، ومن صلاحية حساب الخدمة في Play Console. وتمرّ عملية الشراء نفسها بعد الإصلاح
PaymentProviderCredentialsUnreadable
لا يستطيع الخادم قراءة المفاتيح المخزّنة
أدخل المفاتيح من جديد
PaymentProviderProviderNotFound
المتجر غير مربوط، أو موقوف مؤقتًا
اربطه، أو أعد تفعيل Active
PaymentProviderReceiptProductMismatch
عملية الشراء لمنتج غير منتج العنصر
تحقّق من Store product IDs للعنصر
PaymentProviderReceiptBelongsToAnotherPlayer
اشتراها لاعب Flock آخر، أو استردّها
سجّل الدخول باللاعب الذي اشتراها
PaymentProviderReceiptPending
لا يزال المتجر ينتظر الدفع
لا شيء: تُرسَل من جديد في التشغيل التالي
PaymentProviderStoreUnavailable
لم يستطع Flock الوصول إلى المتجر
لا شيء: تُرسَل من جديد في التشغيل التالي
PaymentProviderReceiptInvalid
لم يؤكّد المتجر عملية الشراء
اقرأ السبب: عملية شراء مزيّفة، أو مستردّة، أو لحظة سيئة لدى المتجر
تحتفظ اللعبة التي تعمل بـ Unity IAP 4.x بشيفرة الشراء الخاصة بها، وتسلّم كل عملية شراء إلى Flock عبر
Shop.RedeemStoreReceiptAsync، ولا تُنهيها في المتجر إلا بعد أن تعود. والملف
FlockUnityIap4Store.cs
في مستودع حزمة التطوير على GitHub نسخة جاهزة تنسخها إلى مشروعك (فحزمة .unitypackage لا تتضمّنه).
اللعبة التي لها شيفرة فوترة خاصة بها (على Android مع UE 5.4 حتى 5.7، مثلًا) تسلّم كل عملية شراء إلى Flock عبر
RedeemStoreReceipt لمزوّد المتجر (Flock Redeem Store Receipt، مع Make Google Play Receipt أو
Make App Store Receipt)، ولا تُنهيها في المتجر إلا بعد أن تنجح. ويمكن إرسال الاسترداد مرة أخرى بأمان:
فعملية الشراء الواحدة في المتجر تُنشئ عملية شراء واحدة في Flock.استخدم طريقة شراء واحدة. فعقد Blueprint الخاصة بالشراء داخل التطبيق في المحرّك تُنهي عملية الشراء لحظة
إجرائها، قبل أن يسلّمها Flock، فتضيع عملية الشراء التي يرفضها Flock بعد ذلك. وتحذّر لوحة إعداد Flock في
المحرّر حين يستخدمها Blueprint في لعبة تبيع متاجرها عناصر بمال حقيقي؛ فلا تُبقِها إلا لمنتجات لا يبيعها أي
عنصر في متاجر Flock.
هل كانت هذه الصفحة مفيدة؟
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qwacks","description":"Developer documentation for the Qwacks platform — Flock, Protokite, and Data Duck.","colors":{"primary":"#0099FF","light":"#33ADFF","dark":"#0077CC"},"logo":{"light":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","dark":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9"},"favicon":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","appearance":{"default":"dark","strict":true},"background":{"image":{"light":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47","dark":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47"},"color":{"light":"#FFFFFF","dark":"#181E2E"}},"navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"Pricing"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"Unity SDK"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"Unreal SDK"}],"primary":{"type":"button","label":"Dashboard","href":"https://flock-saas.qwacks.com"}},"fonts":{"heading":{"family":"Readex Pro"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"welcome"},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"href":"ar/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qwacks","hasAudioNarration":false,"actualSubdomain":"qwacks","customDomains":["docs.qwacks.com"],"gitSource":{"type":"github","owner":"qwackstack","repo":"qwacksdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af4bb9aa7570e2358297eb2","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"ar","tag":"Flock","count":31},{"language":"en","tag":"Flock","count":31},{"language":"ar","tag":"الميزات","count":22},{"language":"en","tag":"Features","count":22},{"language":"ar","tag":"Qwacks","count":12},{"language":"en","tag":"Qwacks","count":12},{"language":"ar","tag":"بدء الاستخدام","count":11},{"language":"en","tag":"Getting Started","count":11},{"language":"ar","tag":"اللعب الجماعي","count":5},{"language":"ar","tag":"Protokite","count":5},{"language":"ar","tag":"المدفوعات والفوترة","count":5},{"language":"en","tag":"Multiplayer","count":5},{"language":"en","tag":"Protokite","count":5},{"language":"en","tag":"Payments \u0026 Billing","count":5},{"language":"ar","tag":"اللاعبون","count":4},{"language":"ar","tag":"الاقتصاد والمدفوعات","count":4},{"language":"en","tag":"Players","count":4},{"language":"en","tag":"Economy and Payments","count":4},{"language":"ar","tag":"المفاهيم","count":3},{"language":"en","tag":"Concepts","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".nav-logo{height:2.5rem!important;max-width:none!important}#topbar-cta-button .bg-primary-dark{background-color:#feca13!important}#topbar-cta-button:hover .bg-primary-dark{background-color:#f89c1c!important}#topbar-cta-button a,#topbar-cta-button a *{color:#1a1206!important}.qwacks-lang-toggle{display:inline-flex;align-items:center;align-self:center;gap:0.5rem;padding:0.25rem 1rem;border:1px solid rgba(255, 255, 255, 0.1);border-radius:56px;background:transparent;color:#fafafa;font-family:\"Readex Pro\", sans-serif;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;margin-inline-start:auto;margin-inline-end:1rem}.qwacks-lang-toggle__option{color:inherit;text-decoration:none;font-weight:400;opacity:0.3}.qwacks-lang-toggle__option:hover{opacity:0.7}.qwacks-lang-toggle__option.is-active{font-weight:700;opacity:1}@media (min-width: 1024px){#localization-select-trigger{display:none!important}}:is(h1,h2,h3,h4){position:relative}:is(h1,h2,h3,h4)>div.absolute{left:auto;right:auto;inset-inline-end:0}:is(h1,h2,h3,h4)>div.absolute>a{margin-inline:0!important}"},{"filePath":"rtl.css","content":"html[data-current-path^=\"/ar\"]{direction:rtl}[dir=\"rtl\"]{direction:rtl}html[lang=\"ar\"]{direction:rtl}@media (min-width: 1024px){html[lang=\"ar\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}html[lang=\"ar\"] .lg\\:pl-\\[5\\.7rem\\]{padding-left:0.25rem;padding-right:5.7rem}html[lang=\"ar\"] .lg\\:pl-\\[23\\.7rem\\]{padding-left:0.25rem;padding-right:23.7rem}}[dir=\"rtl\"] :is(pre,code,kbd,samp){direction:ltr;text-align:left}[dir=\"rtl\"] :not(pre)>code{unicode-bidi:isolate}[dir=\"rtl\"] pre>*{direction:ltr}[dir=\"rtl\"] .pl-3\\.5{padding-left:0;padding-right:0.875rem}[dir=\"rtl\"] .pl-3{padding-left:0;padding-right:0.75rem}[dir=\"rtl\"] .pl-4{padding-left:0;padding-right:1rem}[dir=\"rtl\"] .pr-3{padding-right:0;padding-left:0.75rem}[dir=\"rtl\"] .pr-4{padding-right:0;padding-left:1rem}[dir=\"rtl\"] .pr-8{padding-right:0;padding-left:2rem}[dir=\"rtl\"] .ml-2{margin-left:0;margin-right:0.5rem}[dir=\"rtl\"] .ml-4{margin-left:0;margin-right:1rem}[dir=\"rtl\"] .-ml-4{margin-left:0;margin-right:-1rem}[dir=\"rtl\"] .-ml-10{margin-left:0;margin-right:-2.5rem}[dir=\"rtl\"] .mr-2{margin-right:0;margin-left:0.5rem}[dir=\"rtl\"] .mr-4{margin-right:0;margin-left:1rem}[dir=\"rtl\"] .text-left{text-align:right}[dir=\"rtl\"] .text-right{text-align:left}[dir=\"rtl\"] .left-0{left:auto;right:0}[dir=\"rtl\"] .right-0{right:auto;left:0}[dir=\"rtl\"] .space-x-2>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-3>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}[dir=\"rtl\"] .border-l{border-left-width:0;border-right-width:1px}[dir=\"rtl\"] .border-r{border-right-width:0;border-left-width:1px}@media (min-width: 1024px){[dir=\"rtl\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}}[dir=\"rtl\"] :is(ul,ol){padding-left:0;padding-right:1.5rem}[dir=\"rtl\"] blockquote{border-left:0;border-right:4px solid currentColor;padding-left:0;padding-right:1rem}[dir=\"rtl\"] :is(th,td){text-align:right}[dir=\"rtl\"] .steps{margin-left:0;margin-right:0.875rem}[dir=\"rtl\"] .step>.absolute:not(.w-px){margin-left:0;margin-right:-13px}[dir=\"rtl\"] .step>:not(.absolute){padding-left:1px;padding-right:2rem}[dir=\"rtl\"] #table-of-contents{padding-inline-start:0.75rem;scrollbar-gutter:stable}[dir=\"rtl\"] #sidebar-content a[style*=\"padding-left\"]{padding-left:0!important;padding-right:1rem!important}[dir=\"rtl\"] .card .absolute{right:auto;left:1.25rem}[dir=\"rtl\"] .card .absolute svg{transform:scaleX(-1)}[dir=\"rtl\"] :is(.qwacks-flip-icon,[data-flip-rtl]) svg{transform:scaleX(-1)}[dir=\"rtl\"] #topbar-cta-button svg{transform:scaleX(-1)}[dir=\"rtl\"] .qwacks-lang-toggle svg{transform:none}[dir=\"rtl\"],[dir=\"rtl\"] body{font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.85}[dir=\"rtl\"] :is(h1,h2,h3,h4,h5,h6){font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.5}[dir=\"rtl\"] :is(pre,code,kbd,samp){font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;line-height:1.6}[dir=\"rtl\"]{font-variant-numeric:lining-nums}"}],"page":{"pagePath":"ar/guides/real-money-purchases","slug":"/ar/guides/real-money-purchases","pageMetadata":{"title":"الشراء داخل التطبيق","description":"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.","href":"/ar/guides/real-money-purchases"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`العنصر المدفوع بمال حقيقي هو عنصر متجر يدفع اللاعب ثمنه في App Store أو Google Play. يتقاضى المتجر\nالمبلغ من اللاعب، ثم يسأل Flock المتجرَ هل عملية الشراء حقيقية، ثم يسلّم العنصر. وتستدعي لعبتك الدالة\nنفسها التي تستدعيها لأي عنصر: `,_jsx(_components.code,{children:`Shop.PurchaseAsync(item.Id)`}),` في Unity، والدالة `,_jsx(_components.code,{children:`Purchase`}),` لمزوّد المتجر\n(العقدة `,_jsx(_components.strong,{children:`Flock Purchase`}),`) في Unreal.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Player taps Buy ──▶ store charges ──▶ Flock checks with the store ──▶ item delivered ──▶ store purchase finished`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`لا تُنهى عملية الشراء في المتجر إلا بعد أن يسلّم Flock العنصر، لذا لا يُضيع تعطّلُ اللعبة أو انقطاعُ\nالاتصال بينهما ما دفعه اللاعب: يعيد المتجر عملية الشراء عند التشغيل التالي فيسلّمها Flock حينها.\nوتُسلَّم عملية الشراء الواحدة في المتجر مرة واحدة، مهما أُرسلت من مرات.`}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`تحتاج المشتريات بالمال الحقيقي إلى حزمة تطوير Flock لـ Unity بالإصدار 1.98.0 أو أحدث، أو إلى حزمة تطوير\nFlock لـ Unreal بالإصدار 1.45.0 أو أحدث (وعقد Blueprint الخاصة بها من 1.47.0). ولا تحتاج مشتريات المحفظة\nإلى أيٍّ منهما: راجع `,_jsx(_components.a,{href:`/ar/guides/shops-and-inventory`,children:`المتاجر والمخزون`}),`.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`تحتاج `,_jsx(_components.strong,{children:`Unity`}),` إلى Unity IAP 5 (`,_jsx(_components.code,{children:`com.unity.purchasing`}),` 5.x) في المشروع. وعلى Android، اجعل `,_jsx(_components.strong,{children:`Minimum\nAPI Level`}),` 23 أو أعلى (`,_jsx(_components.strong,{children:`Player Settings → Other Settings`}),`): فمكتبة Google Play Billing في Unity IAP 5\nتحتاجه، ومشروع Unity 2021.3 يبدأ بـ 22، فيتوقف بناؤه بخطأ في دمج ملف البيان.`]}),`\n`,_jsxs(_components.li,{children:[`لا تحتاج `,_jsx(_components.strong,{children:`Unreal`}),` إلى تثبيت أي شيء: يصل Flock إلى المتجر عبر النظام الفرعي للخدمات عبر الإنترنت في\nالمحرّك (online subsystem)، ويفعّله بنفسه. ويحتاج Google Play إلى UE 5.8 أو أحدث، فهو أول محرّك بمكتبة\nBilling لا يزال Google Play يقبلها؛ وعلى UE 5.4 حتى 5.7 يُرفض ربط المتجر.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you-set-up`,children:`ما الذي تُعدّه`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`اربط كل متجر بـ Flock`}),` من لوحة التحكم، بمفاتيح لعبتك الخاصة.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`سعّر العناصر بمال حقيقي`}),` وأعطِ كلًّا منها معرّف منتجه في المتجر.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`أنشئ المنتجات في المتجر`}),` بتلك المعرّفات.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`اربط المتجر داخل لعبتك`}),` مرة واحدة عند البدء.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`تحقّق من الإعداد`}),` من داخل اللعبة.`]}),`\n`]}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`اربط المتاجر بـ Flock`,children:[_jsxs(_components.p,{children:[`افتح `,_jsx(_components.strong,{children:`Monetization → Payments`}),` في لوحة تحكم Flock واربط كل متجر تبيع فيه. يستخدم Flock هذه المفاتيح\nليسأل المتجر عن عملية الشراء، ولا تصل أبدًا إلى جهاز اللاعب.`]}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`من القائمة أعلى الصفحة اختر اللعبة: فكل لعبة تربط متاجرها الخاصة.`}),`\n`,_jsxs(_components.li,{children:[`في تبويب `,_jsx(_components.strong,{children:`Providers`}),`، تحت `,_jsx(_components.strong,{children:`Mobile stores`}),`، اضغط `,_jsx(_components.strong,{children:`Connect`}),` بجانب `,_jsx(_components.strong,{children:`Google Play`}),` أو `,_jsx(_components.strong,{children:`App Store`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`املأ كل الحقول كما يقول الجدولان أدناه، واترك `,_jsx(_components.strong,{children:`Active`}),` مفعّلًا.`]}),`\n`,_jsxs(_components.li,{children:[`اضغط `,_jsx(_components.strong,{children:`Save`}),`. `,_jsx(_components.strong,{children:`علامة النجاح:`}),` يظهر المتجر بحالة `,_jsx(_components.strong,{children:`Connected`}),` ويسمّي المفاتيح التي يحملها.`]}),`\n`]}),_jsxs(_components.p,{children:[`تُشفَّر المفاتيح قبل حفظها ولا تُعرض ثانيةً: فلتستبدل أحدها اضغط `,_jsx(_components.strong,{children:`Update keys`}),` وأدخل كل الحقول من\nجديد. ولا يربط المتاجرَ إلا مسؤولو الاستوديو ومديروه. ويسرد تبويب `,_jsx(_components.strong,{children:`Sales`}),` كل عملية بيع، ويستردّ\nإحداها حين تضغط `,_jsx(_components.strong,{children:`Refund`}),`.`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Google Play`,id:`google-play`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الحقل`}),_jsx(_components.th,{children:`ما تُدخله`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Package name`}),_jsxs(_components.td,{children:[`اسم حزمة تطبيقك كما في Google Play Console (مثلًا `,_jsx(_components.code,{children:`com.studio.game`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Service account JSON`}),_jsx(_components.td,{children:`النص الكامل لمفتاح JSON لحساب خدمة في Google Cloud`})]})]})]}),_jsx(_components.p,{children:`لإنشاء حساب الخدمة:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`في Google Cloud console، وفي أي مشروع، فعّل `,_jsx(_components.strong,{children:`Google Play Android Developer API`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`أنشئ هناك `,_jsx(_components.strong,{children:`حساب خدمة`}),` (service account)، وأضف إليه `,_jsx(_components.strong,{children:`مفتاح JSON`}),`. يُنزَّل المفتاح ملفًّا.`]}),`\n`,_jsxs(_components.li,{children:[`في Google Play Console، تحت `,_jsx(_components.strong,{children:`Users and permissions`}),`، ادعُ عنوان البريد الإلكتروني لحساب الخدمة،\nوامنحه تطبيقك، واسمح له بـ `,_jsx(_components.strong,{children:`View financial data`}),` و`,_jsx(_components.strong,{children:`Manage orders and subscriptions`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`الصق النص الكامل لملف JSON في `,_jsx(_components.strong,{children:`Service account JSON`}),`.`]}),`\n`]}),_jsx(_components.p,{children:`قد تستغرق Google وقتًا لتقبل حساب خدمة جديدًا. وإلى أن تقبله، يخبرك التحقّق من الإعداد أدناه بأن\nالمتجر رفض مفاتيحك. وفي اختبارنا، سرى مفعوله بعد دقيقة من إعادة حفظ أحد منتجات التطبيق في Play\nConsole.`})]}),_jsx(Tab,{title:`App Store`,id:`app-store`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الحقل`}),_jsx(_components.th,{children:`ما تُدخله`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Issuer ID`}),_jsxs(_components.td,{children:[`من App Store Connect، `,_jsx(_components.strong,{children:`Users and Access → Integrations → In-App Purchase`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Key ID`}),_jsx(_components.td,{children:`المفتاح الذي تُنشئه في تلك الصفحة`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Private key`}),_jsxs(_components.td,{children:[`النص الكامل لملف `,_jsx(_components.code,{children:`.p8`}),` الذي يُنزَّل به ذلك المفتاح`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Bundle ID`}),_jsx(_components.td,{children:`معرّف حزمة تطبيقك (bundle identifier)`})]})]})]})})]}),_jsxs(_components.p,{children:[`ويعرض نموذج كل متجر أيضًا `,_jsx(_components.strong,{children:`Notification URL`}),`. أعطِه للمتجر (App Store Server Notifications في App\nStore Connect، وreal-time developer notifications في Google Play) ليعلم Flock بعمليات الاسترداد.`]})]}),_jsxs(Step,{title:`سعّر العناصر بمال حقيقي`,children:[_jsxs(_components.p,{children:[`يكون العنصر مدفوعًا بمال حقيقي حين تكون عملته إحدى `,_jsx(_components.strong,{children:`Real Currencies`}),` في إعدادات العملات لإصدار لعبته.\n(`,_jsx(_components.strong,{children:`Monetization → Currencies`}),`، تبويب `,_jsx(_components.strong,{children:`Real Currencies`}),`؛ راجع `,_jsx(_components.a,{href:`/ar/guides/currencies-and-wallets`,children:`العملات والمحافظ`}),`).\nوفي نموذج العنصر (`,_jsx(_components.strong,{children:`Monetization → Shops`}),`، تبويب `,_jsx(_components.strong,{children:`Items`}),` للمتجر؛ راجع\n`,_jsx(_components.a,{href:`/ar/guides/shops-and-inventory`,children:`المتاجر والمخزون`}),`)، اكتب `,_jsx(_components.strong,{children:`Price`}),` كما يراه اللاعب، مثل `,_jsx(_components.code,{children:`3.99`}),`؛ فالخادم\nيحفظه بأصغر وحدة للعملة، فتقرأ حزمة التطوير `,_jsx(_components.code,{children:`399`}),` بعملة `,_jsx(_components.code,{children:`SAR`}),` لسعر SAR 3.99. `,_jsx(_components.strong,{children:`علامة النجاح:`}),` يظهر على\nبطاقة العنصر `,_jsx(_components.strong,{children:`Real money`}),`.`]}),_jsxs(_components.p,{children:[`وعلى كل عنصر من هذه العناصر، تحت `,_jsx(_components.strong,{children:`Store product IDs`}),`، أدخل معرّف منتجه لكل متجر، تمامًا كما يكتبه\nالمتجر. ويحدّد نوع العنصر نوع المنتج في المتجر:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`نوع العنصر`}),_jsx(_components.th,{children:`منتج المتجر`}),_jsx(_components.th,{children:`ما يحصل عليه اللاعب`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`حزمة عملة`}),_jsx(_components.td,{children:`قابل للاستهلاك`}),_jsx(_components.td,{children:`مكافآتها، مباشرةً في المحفظة`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`قابل للاستهلاك`}),_jsx(_components.td,{children:`قابل للاستهلاك`}),_jsxs(_components.td,{children:[`مدخل في المخزون، يُستخدم لاحقًا بـ `,_jsx(_components.code,{children:`ConsumeOneAsync`}),` (في Unreal: `,_jsx(_components.code,{children:`ConsumeOne`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`قياسي`}),_jsx(_components.td,{children:`لمرة واحدة (غير قابل للاستهلاك)`}),_jsx(_components.td,{children:`مدخل في المخزون. ويبيعه المتجر مرة واحدة لكل حساب متجر`})]})]})]})]}),_jsx(Step,{title:`أنشئ المنتجات في المتجر`,children:_jsxs(_components.p,{children:[`أنشئ كل منتج بالمعرّف نفسه: في Google Play Console تحت `,_jsx(_components.strong,{children:`Monetize → Products → One-time products`}),`،\nوفي App Store Connect تحت `,_jsx(_components.strong,{children:`In-App Purchases`}),` لتطبيقك. ثم فعّله. والسعر الذي يراه اللاعب هو ما\nيحدّده المتجر لبلده.`]})}),_jsxs(Step,{title:`اربط المتجر داخل لعبتك`,children:[_jsxs(_components.p,{children:[`اربطه مرة واحدة بعد بدء حزمة التطوير، واحتفظ بالاتصال طوال الجلسة. وعلى الهاتف يُعثر على المتجر\nتلقائيًا، وعلى Windows وmacOS وLinux وWebGL يربط الاستدعاء نفسه الدفع عبر صفحة ويب بدلًا منه\n(`,_jsx(_components.a,{href:`/ar/guides/web-checkout`,children:`الدفع عبر الويب`}),`).`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity`,children:[_jsxs(_components.p,{children:[`لا يستطيع محرّر Unity أن يُريك شراءً من المتجر ينجح. فهو يربط الدفع عبر صفحة ويب ما لم يكن هدف\nالبناء Android أو iOS، وحينها يجيب المتجر الوهمي في Unity IAP، وترفض Flock مشترياته. ولترى شراءً\nمن المتجر يتمّ، ابنِ اللعبة على جهاز فيه المتجر (راجع `,_jsx(_components.a,{href:`#test-before-you-ship`,children:`اختبر قبل الإطلاق`}),`).`]}),_jsxs(_components.p,{children:[`ثبّت Unity IAP 5 أولًا: افتح `,_jsx(_components.strong,{children:`Window → Package Manager`}),`، وانقر `,_jsx(_components.strong,{children:`+`}),`، واختر `,_jsx(_components.strong,{children:`Add package by\nname…`}),` (`,_jsx(_components.strong,{children:`Install package by name…`}),` في Unity 6)، وأدخل `,_jsx(_components.code,{children:`com.unity.purchasing`}),` وإصدارًا من 5.x.`]}),_jsx(Frame,{caption:`نافذة Window → Package Manager وحزمة In-App Purchasing (com.unity.purchasing) محدّدة، الإصدار 5.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=618591881e2ab0dce4615c98dcc8384b`,alt:`نافذة Package Manager في Unity وحزمة In-App Purchasing محدّدة`,\"data-og-width\":`1100`,width:`1100`,\"data-og-height\":`700`,height:`700`,\"data-path\":`images/unity/real-money-purchases-package-manager.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=22f9c68462d749df0696bf82a71b05c8 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=b212399cbc526c9e1ef2c5c840c35fab 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=5c6b1e2a8bc5ecdfc78f5d970d2ddf4f 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=096eb9872e4b260c8be502865764a067 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=58e7c5bc8ca91a1f708af8d9f4bd0091 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=51968b9141daad3a3627d3837c285d40 2500w`})}),_jsxs(_components.p,{children:[`ولـ Android، اضبط أيضًا `,_jsx(_components.strong,{children:`Minimum API Level`}),` على 23 أو أعلى في `,_jsx(_components.strong,{children:`Edit → Project Settings → Player →\nAndroid → Other Settings`}),`.`]}),_jsxs(_components.p,{children:[`ثم أضف هذا المكوّن إلى كائن في أول مشهد للعبتك. و`,_jsx(_components.code,{children:`RefreshTheShop`}),` مكان شيفرتك أنت التي تقرأ المحفظة\nوالمخزون من جديد وتعيد رسم المتجر.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GameStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` : `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`MonoBehaviour`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FlockStore`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ConnectAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// what is wrong, then a Fix: line`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Every real-money purchase Flock delivers, the ones PurchaseAsync answers included:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // refresh what the screen shows here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PurchaseCompleted`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` RefreshTheShop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A purchase the player paid for that Flock could not deliver. It comes back at the next launch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PurchaseNotDelivered`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OnDestroy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Dispose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` RefreshTheShop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read the wallet and inventory again, then redraw the shop.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`ومن الآن تشتري `,_jsx(_components.code,{children:`Shop.PurchaseAsync`}),` العناصر المدفوعة بمال حقيقي عبر هذا الاتصال. ومن دونه، ترفض العنصر\nالمدفوع بمال حقيقي قبل إرسال أي شيء، وتطلب منك ربط المتجر. ويُرفض ربط متجر حين لا تكون Unity IAP 5\nمثبّتة. وتستخدم الأمثلة أدناه `,_jsx(_components.code,{children:`store`}),` هذا.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal`,children:[_jsx(_components.p,{children:`أعِدّ المتجر في المشروع أولًا:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Android`}),` (UE 5.8 أو أحدث): في `,_jsx(_components.strong,{children:`Project Settings → Platforms → Android`}),`، فعّل `,_jsx(_components.strong,{children:`Enable Google Play\nSupport`}),`، وأدخل مفتاح ترخيص Google Play للعبة، وأضف الإذن `,_jsx(_components.code,{children:`com.android.vending.BILLING`}),`. وأبقِ\n`,_jsx(_components.code,{children:`bSupportsInAppPurchasing=true`}),` تحت `,_jsx(_components.code,{children:`[OnlineSubsystemGooglePlay.Store]`}),` (القيمة الافتراضية في المحرّك).\nولا يقبل Google Play الإصدارات الجديدة إلا بمكتبة Billing حديثة، ولا يأتي بها إلا UE 5.8؛ وعلى UE 5.4\nإلى 5.7 تسلّم اللعبة التي لها شيفرة فوترة خاصة كل عملية شراء إلى Flock بنفسها\n(`,_jsx(_components.a,{href:`#your-own-store-code-in-unreal`,children:`شيفرة المتجر الخاصة بك في Unreal`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`iOS`}),`: في `,_jsx(_components.strong,{children:`Project Settings → Platforms → iOS`}),`، فعّل `,_jsx(_components.strong,{children:`Enable StoreKit Support`}),`، وأضف إمكانية\nIn-App Purchase إلى التطبيق. ودعم Flock لمتجر App Store مكتوب على شيفرة StoreKit في المحرّك نفسه ولم\nيُشغَّل بعد على iPhone: اشترِ في بيئة sandbox الخاصة بمتجر App Store قبل أن تنشر لعبتك.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Windows وMac وLinux`}),` لا متجر هاتف فيها: فالعناصر المدفوعة بمال حقيقي تُشترى عبر\n`,_jsx(_components.a,{href:`/ar/guides/web-checkout`,children:`الدفع عبر الويب`}),`. ولا يجوز لإصدار Steam أن يستعمله، إذ لا يسمح Steam\nبالدفع إلا عبر محفظته؛ وليس في Flock مزوّد متجر لـ Steam ولا لـ Epic Games Store ولا لأجهزة الألعاب.`]}),`\n`]}),_jsxs(_components.p,{children:[`ثم اربطه بعد أن يكتمل تهيؤ Flock. ويحتفظ النظام الفرعي لـ Flock بالاتصال (`,_jsx(_components.code,{children:`Sdk->GetStore()`}),`) حتى\nيُفصل أو يُغلق Flock.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"FlockSubsystem.h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Store/FlockStore.h\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this: any object in the game's world`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(Sdk, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FFlockStoreOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // what is wrong, then a Fix: line`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Every real-money purchase Flock delivers, the ones Purchase answers included:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // refresh what the screen shows here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OnPurchaseCompleted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`AddLambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockPurchaseResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A purchase the player paid for that Flock refused to deliver, or whose delivery is unknown`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // (Purchase.Error.bOutcomeUnknown: Flock may have delivered it). It stays unfinished in the store`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // and is sent again at the next launch, or by Restore: tell the player it will arrive.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OnPurchaseNotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`AddLambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`ومن الآن تشتري `,_jsx(_components.code,{children:`Purchase`}),` لمزوّد المتجر العناصر المدفوعة بمال حقيقي عبر هذا الاتصال. ومن دونه، ترفض\nالعنصر المدفوع بمال حقيقي قبل إرسال أي شيء، وتطلب منك ربط المتجر. اترك\n`,_jsx(_components.code,{children:`FFlockStoreOptions::PaymentProvider`}),` فارغًا لطريقة الدفع الخاصة بهذه المنصة. ويُرفض `,_jsx(_components.code,{children:`Connect`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`حين لا تكون وحدة المتجر في Flock محمَّلة، مثلًا حين تُعطَّل إضافة Online Subsystem في المحرّك: فقواعد\nمتاجر الهواتف تمنع الدفع مقابل السلع الرقمية في مكان آخر، لذا لا يفتح Flock صفحة ويب بدلًا منه أبدًا؛`}),`\n`,_jsxs(_components.li,{children:[`على Android بمحرّك أقدم من UE 5.8، أو مع `,_jsx(_components.code,{children:`bDisableLocalAcknowledgeAndConsume=true`}),` تحت\n`,_jsx(_components.code,{children:`[OnlineSubsystemGooglePlay.Store]`}),` (إذ لن يُنهي المحرّك حينها شيئًا مما يسلّمه Flock)؛`]}),`\n`,_jsx(_components.li,{children:`لبوابة دفع (Stripe أو Tap أو Moyasar) تُسمّى على Android أو iOS: فقواعد متاجر الهواتف تمنع الدفع\nمقابل السلع الرقمية في صفحة ويب؛`}),`\n`,_jsxs(_components.li,{children:[`لقيمة `,_jsx(_components.code,{children:`PaymentProvider`}),` لا يعرفها Flock: سمِّ واحدة من `,_jsx(_components.code,{children:`FlockPaymentProviders`}),`، أو اتركها فارغة؛`]}),`\n`,_jsx(_components.li,{children:`على منصة ليست هاتفًا ولا Windows أو Mac أو Linux (جهاز ألعاب): فلا متجر فيها يدفع Flock عبره، ولا\nيُفتح الدفع عبر الويب إلا على حاسوب؛`}),`\n`,_jsx(_components.li,{children:`ما دام اتصال آخر قائمًا: استخدم ذلك الاتصال، أو افصله أولًا.`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`الإيصالات غير مربوطة بحساب اللاعب في المتجر`}),`، على Android وiOS معًا. فالمحرّك يُجزّئ معرّف الحساب قبل أن يراه Google ولا\nيمرّر أيًّا منه إلى Apple، لذا لا يرسل Flock شيئًا، ويَسِم الخادم كل عملية شراء كهذه بأنها غير مربوطة:\nفالإيصال المأخوذ من جهاز يمكن أن يُستردّ مرة واحدة بحساب Flock آخر.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`في Blueprint`}),`، استدعِ `,_jsx(_components.strong,{children:`Flock Connect Store`}),` (تحت `,_jsx(_components.em,{children:`Flock | Store`}),`) من `,_jsx(_components.em,{children:`Call or Register on\nInitialized`}),` في أحداث Flock (`,_jsx(_components.em,{children:`Get Events`}),`)، الذي يعمل فورًا إن كان Flock قد تهيأ. واترك منفذ `,_jsx(_components.em,{children:`Options`}),`\nدون توصيل لتأخذ كل القيم الافتراضية. واربط `,_jsx(_components.strong,{children:`On Store Purchase Completed`}),` و`,_jsx(_components.strong,{children:`On Store Purchase Not\nDelivered`}),` في أحداث Flock مرة واحدة: فهما يسمعان كل عملية تسليم يبلغ عنها المتجر المتصل، أيًّا كان\nالاتصال الذي أجراها.`]}),_jsx(Frame,{caption:`اربط المتجر حين يصبح Flock جاهزًا، ثم اشترِ: تميّز Is Purchase Paid عملية الشراء المسلَّمة من تلك التي لا يزال المتجر ينتظر دفعها.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=e56f8413b9e7eef84e76603f96dc122c`,alt:`يشغّل Event BeginPlay العقدة Call or Register on Initialized، وهدفها Flock Get Events (عقدة بلا منافذ تنفيذ)، مع الحدث المخصّص Flock Ready؛ ويشغّل Flock Ready العقدة Flock Connect Store، ويشغّل منفذ On Success فيها Flock Purchase بمعرّف العنصر المثال gem_pack_small في Shop Item Id؛ ويذهب On Success فيها إلى Branch على Is Purchase Paid`,\"data-og-width\":`1834`,width:`1834`,\"data-og-height\":`837`,height:`837`,\"data-path\":`images/sdk/unreal/store-connect-purchase.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=ef8d00220d72ccd8db57860e7f757b87 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=1dbd9b650365eadbc123560002c4a5ed 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=37b350a537aef11ff6b6ed8f2c11217a 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=e51bb2a2388b233cbc138eca91af26a8 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=ea6a56088fc58704c94299985664ed67 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=375bf0b964d552510adf2d73619342cb 2500w`})}),_jsxs(_components.p,{children:[`لا تشتري الصورة فور الاتصال إلا لتبقى قصيرة. أما في لعبتك، فاربط المتجر مرة واحدة عند البدء كما سبق،\nوشغّل `,_jsx(_components.strong,{children:`Flock Purchase`}),` من زر الشراء لدى اللاعب بمعرّف `,_jsx(_components.strong,{children:`Id`}),` لعنصر قُرئ من متجره (`,_jsx(_components.strong,{children:`Flock Get Shop By\nName`}),`، ثم `,_jsx(_components.em,{children:`Shop Items`}),` فيه، ثم `,_jsx(_components.em,{children:`Id`}),` كل عنصر): فـ `,_jsx(_components.code,{children:`gem_pack_small`}),` معرّف عنصر على سبيل المثال، وليس اسمًا.`]})]})]})]}),_jsxs(Step,{title:`تحقّق من الإعداد`,children:[_jsx(_components.p,{children:`يسأل التحقّق من الإعداد المتجرَ وخادمَ Flock هل كل شيء في مكانه، دون شراء أي شيء. ويحتاج إلى لاعب مسجَّل\nدخوله، لذا شغّله من زر للمطوّر بعد تسجيل الدخول أثناء الإعداد.`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-2`,children:[_jsxs(_components.p,{children:[`ترمي `,_jsx(_components.code,{children:`CheckSetupAsync`}),` الاستثناء `,_jsx(_components.code,{children:`FlockAuthException`}),` من دون لاعب مسجَّل دخوله، فسجّل دخول اللاعب\nأولًا (`,_jsx(_components.a,{href:`/ar/sdk/unity#authenticate-a-player`,children:`صادِق لاعبًا`}),`). ويعمل الرمز داخل دالة `,_jsx(_components.code,{children:`async`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CheckSetupAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The store has every item, and Flock can check purchases with your keys.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotFoundInTheStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: the store has no product with this item's id.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MissingProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: no product id for this store on the item.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the keys in Monetization > Payments, and how to fix them`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotChecked`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotChecked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// on a web checkout: the gateway, and how to check it instead`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-2`,children:[_jsxs(_components.p,{children:[`تفشل `,_jsx(_components.code,{children:`CheckSetup`}),` (`,_jsx(_components.code,{children:`Auth`}),`) من دون لاعب مسجَّل دخوله.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`32`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`32`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CheckSetup`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // no player signed in, for one`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Check `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The store has every item, and Flock can check purchases with your keys.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotFoundInTheStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: the store has no product with this item's id.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MissingProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: no product id for this store on the item.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bHasServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The keys in Monetization → Payments, and how to fix them.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`وفي Blueprint هذه هي `,_jsx(_components.strong,{children:`Flock Check Store Setup`}),`؛ وتقول `,_jsx(_components.strong,{children:`Is Store Ready`}),` هل يحتاج شيء إلى إصلاح.`]})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`show-the-stores-price`,children:`اعرض سعر المتجر`}),`\n`,_jsx(_components.p,{children:`اعرض السعر الذي يعطيه المتجر، وهو بعملة اللاعب ومع ضرائبه، بدل سعر العنصر في Flock.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-3`,children:[_jsxs(_components.p,{children:[`و`,_jsx(_components.code,{children:`item`}),` عنصر `,_jsx(_components.code,{children:`ShopItem`}),` مدفوع بمال حقيقي مقروء من متجره.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStorePrice`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetPrice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Not available\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. \"SAR 4.59\", \"$1.09\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`وتكون قيمة `,_jsx(_components.code,{children:`GetPrice`}),` هي `,_jsx(_components.code,{children:`null`}),` حين لا يجد المتجر المنتج. والأسعار في التعليق أمثلة فقط: فالنص هو نص\nالمتجر نفسه. وفي الدفع عبر صفحة ويب يعطي `,_jsx(_components.code,{children:`GetPrice`}),` سعر العنصر نفسه، ولا تكون قيمته `,_jsx(_components.code,{children:`null`}),` أبدًا.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-3`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Item: an FFlockShopItem read from its shop.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TFlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`FFlockStorePrice`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Price `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetPrice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FString Label `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bFoundInTheStore`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Text`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // e.g. \"SAR 4.59\", \"$1.09\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Not available\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`تكون `,_jsx(_components.code,{children:`bFoundInTheStore`}),` خاطئة حين لا يجد المتجر المنتج. وتفشل `,_jsx(_components.code,{children:`GetPrice`}),` (`,_jsx(_components.code,{children:`Validation`}),`) لعنصر لم يكن في\nمتاجر اللعبة حين اتصل المتجر، أو لا معرّف منتج له لهذا المتجر. والأسعار في التعليق أمثلة فقط: فالنص هو نص\nالمتجر نفسه. وفي الدفع عبر صفحة ويب تعطي سعر العنصر نفسه. وفي Blueprint هذه هي `,_jsx(_components.strong,{children:`Flock Get Store Price`}),`:\nتُرجع false مع `,_jsx(_components.em,{children:`Error`}),` يقول السبب حين لا يكون أي متجر متصلًا أو لا سعر للعنصر هنا.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`buy`,children:`الشراء`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-4`,children:[_jsxs(_components.p,{children:[`يعمل الرمز داخل دالة `,_jsx(_components.code,{children:`async`}),`؛ و`,_jsx(_components.code,{children:`item`}),` عنصر `,_jsx(_components.code,{children:`ShopItem`}),` بمال حقيقي مقروء من متجره (راجع\n`,_jsx(_components.a,{href:`/ar/guides/shops-and-inventory`,children:`المتاجر والمخزون`}),`)، و`,_jsx(_components.code,{children:`ShowReward`}),` و`,_jsx(_components.code,{children:`ShowWaitingForPayment`}),` مكان\nشاشاتك أنت.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PurchaseResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsPaid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ShowReward`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// delivered`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ShowWaitingForPayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// pending: PurchaseCompleted reports it once paid`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Cancelled`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The player closed the store's dialog. Nothing was charged.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AlreadyOwned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // This store account already owns the one-time item: offer Restore purchases.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // No payment went through (declined, not available, store down, a web checkout refunded...). Nothing was bought.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \": \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // No answer said whether Flock delivered. Read the wallet and inventory again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The player paid, and Flock refused the purchase (e.ErrorCode says why). The store keeps it,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // and it is sent again at the next launch. PurchaseNotDelivered reports it too.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`كل الحالات باختصار:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`ما الذي يحدث`}),_jsxs(_components.th,{children:[`ما تفعله `,_jsx(_components.code,{children:`PurchaseAsync`})]}),_jsx(_components.th,{children:`ما يراه اللاعب`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`دُفع وسُلّم`}),_jsxs(_components.td,{children:[`تعود، و`,_jsx(_components.code,{children:`IsPaid`}),` صحيحة`]}),_jsx(_components.td,{children:`المكافأة`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ينتظر المتجر الدفع (طريقة دفع بطيئة، أو «Ask to Buy»)`}),_jsxs(_components.td,{children:[`تعود، و`,_jsx(_components.code,{children:`Status`}),` قيمتها pending`]}),_jsxs(_components.td,{children:[`«بانتظار الدفع»؛ ثم يتبعها `,_jsx(_components.code,{children:`PurchaseCompleted`}),` بعد الدفع`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ألغى اللاعب`}),_jsxs(_components.td,{children:[`ترمي `,_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`Cancelled`})]}),_jsx(_components.td,{children:`لا شيء؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`رُفض الدفع (App Store)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`PaymentDeclined`})]}),_jsx(_components.td,{children:`جرّب طريقة دفع أخرى؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`عنصر لمرة واحدة مملوك سلفًا`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`AlreadyOwned`})]}),_jsxs(_components.td,{children:[`اعرض `,_jsx(_components.strong,{children:`استعادة المشتريات`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`عملية شراء سابقة له لا تزال تنتظر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`AlreadyPending`})]}),_jsxs(_components.td,{children:[`يصل عبر `,_jsx(_components.code,{children:`PurchaseCompleted`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`المنتج غير موجود في المتجر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`ProductUnavailable`})]}),_jsx(_components.td,{children:`تحقّق من معرّف المنتج (يسرده التحقّق من الإعداد)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`المتجر غير متصل أو معطَّل، أو رفض Google Play الدفع (يُبلغ Google عن الحالتين بالطريقة نفسها)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`StoreUnavailable`})]}),_jsx(_components.td,{children:`تحقّق من الاتصال ومن طريقة الدفع، ثم حاول مجددًا؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`لا أحد مسجَّل دخوله في المتجر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),` بالسبب `,_jsx(_components.code,{children:`NotSignedInToTheStore`})]}),_jsx(_components.td,{children:`سجّل الدخول إلى المتجر، ثم حاول مجددًا`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`دُفع، ورفضه Flock`}),_jsxs(_components.td,{children:[`ترمي `,_jsx(_components.code,{children:`FlockException`}),` برمزه`]}),_jsx(_components.td,{children:`يُسلَّم في تشغيل لاحق بعد الإصلاح`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`لا ردّ من Flock`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockException`}),`، و`,_jsx(_components.code,{children:`OutcomeUnknown`}),` صحيحة`]}),_jsx(_components.td,{children:`اقرأ المحفظة والمخزون من جديد`})]})]})]}),_jsxs(_components.p,{children:[`وإن ألغيتَ `,_jsx(_components.code,{children:`CancellationToken`}),` الخاص بالاستدعاء، تستمر عملية الشراء في المتجر، ويُبلغ عنها\n`,_jsx(_components.code,{children:`PurchaseCompleted`}),` بعد الدفع. وإن سجّل اللاعب خروجه ومربع حوار المتجر مفتوح، ينتهي الاستدعاء كذلك\nبالإلغاء، وتُسلَّم عملية الشراء في المتجر بعد الدفع إلى اللاعب الذي اشتراها عند تسجيل دخول لاحق، أو عبر استعادة المشتريات.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-4`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`64`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`64`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TWeakObjectPtr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Item: an FFlockShopItem read from its shop.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockPurchaseResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsPaid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // delivered: Bought.Value.Granted lists what the player got`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // pending: show \"Waiting for payment\"; OnPurchaseCompleted reports it once paid`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Store)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The store did not take the payment. Nothing was charged.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StoreFailureReason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Equals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Cancelled, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ESearchCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::CaseSensitive))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the player closed the store's dialog`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StoreFailureReason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Equals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::AlreadyOwned, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ESearchCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::CaseSensitive))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this store account already owns the one-time item: offer Restore purchases`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // declined, not available, store down...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bOutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flock `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flock `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsWebCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The payment page may still be paid: read the open checkouts before offering the item`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // again. One paid meanwhile is reported through OnPurchaseCompleted.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreRestore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Read`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A phone's store took the payment; only Flock's delivery is unknown. Tell the player it will`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // arrive, and never offer the item again on this answer: OnPurchaseCompleted reports it once`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // delivered, at the next launch or after Restore purchases.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Cancelled)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the player signed out or changed: a payment already made is still delivered (see below)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Auth `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 403`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The sign-in was refused or has ended. Sign the player in again: a payment already made stays`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // unfinished in the store, raises no OnPurchaseNotDelivered, and is delivered after that sign-in.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Otherwise Flock refused it. Most refusals come before the store's dialog opens, and nothing was`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // charged: another store purchase under way, the item no longer for sale, nobody signed in. If the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // player paid and Flock refused the delivery, OnPurchaseNotDelivered reported it just before this`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // answer: the store keeps the purchase and sends it again at the next launch, so do not sell it again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Error.ToDisplayText() says which, and how to fix it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(_components.p,{children:`كل الحالات باختصار:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`ما الذي يحدث`}),_jsxs(_components.th,{children:[`ما تكتمل به `,_jsx(_components.code,{children:`Purchase`})]}),_jsx(_components.th,{children:`ما يراه اللاعب`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`دُفع وسُلّم`}),_jsxs(_components.td,{children:[`نجاح، و`,_jsx(_components.code,{children:`IsPaid()`}),` صحيحة`]}),_jsx(_components.td,{children:`المكافأة`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ينتظر المتجر الدفع (طريقة دفع بطيئة، أو «Ask to Buy»)`}),_jsxs(_components.td,{children:[`نجاح، و`,_jsx(_components.code,{children:`Status`}),` قيمتها `,_jsx(_components.code,{children:`FlockPurchaseStatuses::Pending`})]}),_jsxs(_components.td,{children:[`«بانتظار الدفع»؛ ثم يتبعها `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),` بعد الدفع`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`ألغى اللاعب`}),_jsxs(_components.td,{children:[`فشل من النوع `,_jsx(_components.code,{children:`Store`}),`، و`,_jsx(_components.code,{children:`StoreFailureReason`}),` قيمته `,_jsx(_components.code,{children:`Cancelled`})]}),_jsx(_components.td,{children:`لا شيء؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`رُفض الدفع (App Store)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`PaymentDeclined`})]}),_jsx(_components.td,{children:`جرّب طريقة دفع أخرى؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`عنصر لمرة واحدة مملوك سلفًا`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`AlreadyOwned`})]}),_jsxs(_components.td,{children:[`اعرض `,_jsx(_components.strong,{children:`استعادة المشتريات`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`عملية شراء سابقة له لا تزال تنتظر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`AlreadyPending`})]}),_jsxs(_components.td,{children:[`يصل عبر `,_jsx(_components.code,{children:`OnPurchaseCompleted`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`المنتج غير موجود في المتجر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`ProductUnavailable`})]}),_jsx(_components.td,{children:`تحقّق من معرّف المنتج (يسرده التحقّق من الإعداد)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`المتجر غير متصل أو معطَّل، أو رفض Google Play الدفع`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`StoreUnavailable`})]}),_jsx(_components.td,{children:`تحقّق من الاتصال ومن طريقة الدفع، ثم حاول مجددًا؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`لا أحد مسجَّل دخوله في المتجر`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),` بالسبب `,_jsx(_components.code,{children:`NotSignedInToTheStore`})]}),_jsx(_components.td,{children:`سجّل الدخول إلى المتجر، ثم حاول مجددًا`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`عملية شراء ثانية من المتجر وأخرى جارية`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Validation`})}),_jsx(_components.td,{children:`انتظر حتى تنتهي الأولى؛ ولم يُخصم شيء`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`رُفضت قبل مربع حوار المتجر: لم يعد العنصر معروضًا للبيع، أو لا أحد مسجَّل دخوله في Flock`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Validation`}),` (`,_jsx(_components.code,{children:`ShopItemNotForSale`}),`) أو `,_jsx(_components.code,{children:`Auth`})]}),_jsx(_components.td,{children:`لم يُخصم شيء: اقرأ المتجر من جديد، أو سجّل الدخول أولًا`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`سجّل اللاعب خروجه أو تغيّر أثناء العملية`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cancelled`})}),_jsx(_components.td,{children:`الدفعة التي تمّت تُسلَّم مع ذلك (انظر أدناه)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`دُفع، ورفضه Flock`}),_jsxs(_components.td,{children:[`فشل برمزه في `,_jsx(_components.code,{children:`ErrorCode`}),`؛ ويُبلغ عنه `,_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` قبله مباشرة`]}),_jsx(_components.td,{children:`يُسلَّم في تشغيل لاحق بعد الإصلاح؛ فلا تبِعه مجددًا`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`لا ردّ من Flock، في متجر الهاتف`}),_jsxs(_components.td,{children:[`فشل و`,_jsx(_components.code,{children:`bOutcomeUnknown`}),` صحيحة؛ وقد يُبلغ عنه `,_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` أيضًا`]}),_jsxs(_components.td,{children:[`دُفع: أخبر اللاعب أنه سيصل. ويُبلغ عنه `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),` في التشغيل التالي، أو بعد استعادة المشتريات. ولا تعرض العنصر مجددًا بناءً على هذا الرد`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`لا ردّ من Flock، في الدفع عبر صفحة ويب`}),_jsxs(_components.td,{children:[`فشل و`,_jsx(_components.code,{children:`bOutcomeUnknown`}),` صحيحة`]}),_jsxs(_components.td,{children:[`قد تظل صفحة الدفع قابلة للدفع: اقرأ عمليات الدفع المفتوحة بـ `,_jsx(_components.code,{children:`Restore`}),` قبل أن تعرضه مجددًا`]})]})]})]}),_jsxs(_components.p,{children:[`يُبقي المتجر مربع حوار شراء واحدًا مفتوحًا في كل مرة، لذا تُرفض عملية شراء ثانية، لأي عنصر، حتى تنتهي\nالأولى. وإن سجّل اللاعب خروجه، أو سجّل لاعب آخر دخوله، ومربع حوار المتجر مفتوح، ينتهي الاستدعاء بـ\n`,_jsx(_components.code,{children:`Cancelled`}),`؛ والدفعة التي تأتي بعد ذلك تُسلَّم حين يسجّل اللاعب الذي فتح مربع الحوار دخوله من جديد في تشغيل\nاللعبة نفسه. وبعد إعادة التشغيل يعيدها المتجر إلى من يكون مسجَّل الدخول حينها، أو إلى استعادة المشتريات.`]}),_jsxs(_components.p,{children:[`يُبلغ `,_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` عن تسليم رفضه Flock، وكذلك عن تسليم لم يصل ردّه قط (`,_jsx(_components.code,{children:`Error.bOutcomeUnknown`}),`)،\nوربما أجراه Flock. وفي الحالتين يحتفظ المتجر بعملية الشراء ويرسلها من جديد، فعاملها على أنها في طريقها، لا\nعلى أنها ضاعت ولا على أنها شيء تبيعه مجددًا.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`في Blueprint`}),`، اشترِ بـ `,_jsx(_components.strong,{children:`Flock Purchase`}),` (تحت `,_jsx(_components.em,{children:`Flock | Shop`}),`). قد يحمل منفذ النجاح فيها عملية شراء لا\nيزال المتجر ينتظر دفعها: تحقّق من `,_jsx(_components.strong,{children:`Is Purchase Paid`}),` قبل تسليم أي شيء؛ ويتبعها `,_jsx(_components.strong,{children:`On Store Purchase\nCompleted`}),` بعد الدفع. وفي منفذ الفشل، قارن `,_jsx(_components.em,{children:`Store Failure Reason`}),` في `,_jsx(_components.em,{children:`Error`}),` بعُقد `,_jsx(_components.strong,{children:`Flock Store Failure\nReason`}),` (`,_jsx(_components.em,{children:`Cancelled`}),` و`,_jsx(_components.em,{children:`Payment Declined`}),` و`,_jsx(_components.em,{children:`Already Owned`}),` و`,_jsx(_components.em,{children:`Already Pending`}),` و`,_jsx(_components.em,{children:`Product Unavailable`}),`\nو`,_jsx(_components.em,{children:`Store Unavailable`}),` و`,_jsx(_components.em,{children:`Not Signed In To The Store`}),` و`,_jsx(_components.em,{children:`Expired`}),` و`,_jsx(_components.em,{children:`Unknown`}),`)، وتحقّق من `,_jsx(_components.em,{children:`Outcome Unknown`}),`.\nفقيمتها الصحيحة تعني أنه لم يصل رد:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`في متجر الهاتف`}),` دفع اللاعب، ولا يُعرف إلا مصير تسليم Flock. أخبره أنه سيصل، ولا تعرض العنصر مجددًا\nبناءً على هذا الرد؛ ويُبلغ عنه `,_jsx(_components.strong,{children:`On Store Purchase Completed`}),` في التشغيل التالي، أو بعد `,_jsx(_components.strong,{children:`Flock Restore\nPurchases`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`في الدفع عبر صفحة ويب`}),` (`,_jsx(_components.strong,{children:`Is Web Checkout`}),` على `,_jsx(_components.strong,{children:`Flock Get Store`}),`) قد تظل صفحة الدفع قابلة للدفع.\nشغّل `,_jsx(_components.strong,{children:`Flock Restore Purchases`}),`، التي تقرأ عمليات الدفع المفتوحة للاعب، قبل أن تعرض العنصر مجددًا.`]}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`restore-purchases`,children:`استعادة المشتريات`}),`\n`,_jsxs(_components.p,{children:[`يستعيد اللاعب على هاتف جديد، أو بعد إعادة التثبيت، عناصره ذات المرة الواحدة بزر `,_jsx(_components.strong,{children:`استعادة المشتريات`}),`.\nابدأها من زر بعد أن يسجّل اللاعب الدخول إلى Flock: فمن دون لاعب مسجَّل دخوله تفشل. وفي App Store تطلب\nأيضًا من اللاعب تسجيل الدخول إلى المتجر.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-5`,children:[_jsxs(_components.p,{children:[`ترمي `,_jsx(_components.code,{children:`RestoreAsync`}),` الاستثناء `,_jsx(_components.code,{children:`FlockAuthException`}),` من دون لاعب مسجَّل دخوله. ويعمل الرمز داخل\nدالة `,_jsx(_components.code,{children:`async`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreRestore`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RestoreAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Restored \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ProductId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \": \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. bought by another Flock player`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-5`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreRestore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // no player signed in, for one`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Restored `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Purchase : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // e.g. bought by another Flock player`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`تجري استعادة واحدة في كل مرة على متجر الهاتف: وتُرفض الثانية حتى تكتمل الأولى. وفي Blueprint هذه هي\n`,_jsx(_components.strong,{children:`Flock Restore Purchases`}),` (`,_jsx(_components.em,{children:`Restored`}),` و`,_jsx(_components.em,{children:`Not Delivered`}),`).`]})]})]}),`\n`,_jsxs(_components.p,{children:[`وعملية الشراء التي سُلّمت من قبل لا تمنح شيئًا مرة أخرى. وتعود العناصر ذات المرة الواحدة إلى لاعب\nFlock الذي اشتراها، لذا يجب أن يسجّل اللاعب الدخول إلى حساب Flock نفسه (فتسجيل الدخول بالجهاز مرتبط\nبالجهاز؛ اربط الحساب ليحتفظ بمشترياته عبر الأجهزة). راجع `,_jsx(_components.a,{href:`/ar/guides/account-linking`,children:`ربط الحسابات`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`purchases-finished-later`,children:`مشتريات تنتهي لاحقًا`}),`\n`,_jsxs(_components.p,{children:[`تنتهي بعض المشتريات بعد الاستدعاء: دفعة تُسوّى لاحقًا، أو عملية شراء قاطعها تعطّل أو انقطاع اتصال.\nيعيد المتجر كلًّا منها حين تتصل به اللعبة؛ وما إن يُسجّل اللاعب دخوله حتى يسلّمها Flock ويُبلغ عنها\n`,_jsx(_components.code,{children:`PurchaseCompleted`}),` (في Unreal: `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),`، أو `,_jsx(_components.strong,{children:`On Store Purchase Completed`}),` في Blueprint).\nوما تعذّر فيه الوصول إلى Flock يُرسَل من جديد في التشغيل التالي، أو فورًا حين يضغط اللاعب `,_jsx(_components.strong,{children:`استعادة\nالمشتريات`}),`. اشترك فيه قبل أن يحتاجه أي شيء آخر، واستخدمه لتحديث المتجر والمحفظة.`]}),`\n`,_jsx(Heading,{level:`2`,id:`stop-selling-an-item`,children:`إيقاف بيع عنصر`}),`\n`,_jsxs(_components.p,{children:[`اجعل العنصر، أو متجره، `,_jsx(_components.strong,{children:`غير نشط`}),` في لوحة التحكم. فلا تعرضه قراءات المتجر للاعبين من فورها، ويتحقّق\nاستدعاء الشراء مع Flock قبيل نافذة المتجر مباشرة، فإن كانت اللعبة لا تزال تعرض العنصر رُفض الشراء بـ\n`,_jsx(_components.code,{children:`ShopItemNotForSale`}),` ولا يقتطع المتجر شيئًا. أما عملية الشراء التي دفعها اللاعب فتُسلَّم مع ذلك: إذ تحتفظ\nاللعبة بالمنتجات التي باعتها، فتُسلَّم عملية الشراء غير المكتملة لعنصر غير نشط عند التشغيل التالي، وتعيد\nالاستعادة العناصر التي تُشترى مرة واحدة.`]}),`\n`,_jsx(Heading,{level:`2`,id:`test-before-you-ship`,children:`اختبر قبل الإطلاق`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`في محرّر Unity`}),`، تحدّد منصة البناء ذلك: فإن اخترت Android أو iOS أجاب المتجر الوهمي لـ Unity IAP. وعلى منصة\nبناء أخرى، سمِّ المتجر الذي تختبر به:\n`,_jsx(_components.code,{children:`FlockStore.ConnectAsync(new FlockStoreOptions { PaymentProvider = PaymentProviders.GooglePlay })`}),`. ويعمل التحقّق من الإعداد هناك ويختبر مفاتيحك،\nلكن Flock يرفض مشتريات المتجر الوهمي، فتنتهي عملية الشراء في المحرّر دون تسليم.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`في Unreal`}),`، لا يُوصل إلى المتجر إلا على جهاز Android أو iOS: ففي المحرّر وعلى Windows وmacOS وLinux\nيُنشئ `,_jsx(_components.code,{children:`Connect`}),` دفعًا عبر صفحة ويب. اختبر مشتريات المتجر على جهاز، بعد تثبيت اللعبة كما يلي.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Google Play`}),`: ارفع بناءً إلى مسار `,_jsx(_components.strong,{children:`internal testing`}),`، وأضف المختبرين تحت `,_jsx(_components.strong,{children:`License testing`}),` في\nPlay Console، وثبّت اللعبة من رابط الاختبار في Play Store. ولا تُحتسب مشتريات المختبر.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`App Store`}),`: استخدم مختبر `,_jsx(_components.strong,{children:`Sandbox`}),` من App Store Connect على جهاز.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`revenue`,children:`الإيرادات`}),`\n`,_jsx(_components.p,{children:`يسجّل Flock الإيرادات على الخادم، مرة واحدة لكل عملية شراء في المتجر، بسعر العنصر في Flock وعملته.\nولا ترسل حزمة التطوير أي إيرادات من عندها لعملية شراء في المتجر، ولا تُحتسب عملية شراء المحفظة إيرادًا\nأبدًا.`}),`\n`,_jsx(Heading,{level:`2`,id:`when-something-fails`,children:`حين يفشل شيء`}),`\n`,_jsxs(_components.p,{children:[`يقول كل فشل ما الخطأ وكيف تصلحه: في Unity في `,_jsx(_components.code,{children:`Message`}),`، والإصلاح في سطر `,_jsx(_components.code,{children:`Fix:`}),`؛ وفي Unreal في\n`,_jsx(_components.code,{children:`Error.ToDisplayText()`}),`، والإصلاح في `,_jsx(_components.code,{children:`Error.Hint`}),`. وفي Unreal يكون كل رمز أدناه `,_jsx(_components.code,{children:`EFlockErrorCode::`}),` متبوعًا\nباسمه. وهذه رموز عملية الشراء في المتجر:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`الرمز`}),_jsx(_components.th,{children:`ما الذي حدث`}),_jsx(_components.th,{children:`ما العمل`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderStoreCredentialsRejected`})}),_jsx(_components.td,{children:`رفض المتجر مفاتيح لعبتك`}),_jsxs(_components.td,{children:[`تحقّق من المفاتيح في `,_jsx(_components.strong,{children:`Monetization → Payments`}),`، ومن صلاحية حساب الخدمة في Play Console. وتمرّ عملية الشراء نفسها بعد الإصلاح`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderCredentialsUnreadable`})}),_jsx(_components.td,{children:`لا يستطيع الخادم قراءة المفاتيح المخزّنة`}),_jsx(_components.td,{children:`أدخل المفاتيح من جديد`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderProviderNotFound`})}),_jsx(_components.td,{children:`المتجر غير مربوط، أو موقوف مؤقتًا`}),_jsxs(_components.td,{children:[`اربطه، أو أعد تفعيل `,_jsx(_components.strong,{children:`Active`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptProductMismatch`})}),_jsx(_components.td,{children:`عملية الشراء لمنتج غير منتج العنصر`}),_jsxs(_components.td,{children:[`تحقّق من `,_jsx(_components.strong,{children:`Store product IDs`}),` للعنصر`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptBelongsToAnotherPlayer`})}),_jsx(_components.td,{children:`اشتراها لاعب Flock آخر، أو استردّها`}),_jsx(_components.td,{children:`سجّل الدخول باللاعب الذي اشتراها`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptPending`})}),_jsx(_components.td,{children:`لا يزال المتجر ينتظر الدفع`}),_jsx(_components.td,{children:`لا شيء: تُرسَل من جديد في التشغيل التالي`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderStoreUnavailable`})}),_jsx(_components.td,{children:`لم يستطع Flock الوصول إلى المتجر`}),_jsx(_components.td,{children:`لا شيء: تُرسَل من جديد في التشغيل التالي`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptInvalid`})}),_jsx(_components.td,{children:`لم يؤكّد المتجر عملية الشراء`}),_jsx(_components.td,{children:`اقرأ السبب: عملية شراء مزيّفة، أو مستردّة، أو لحظة سيئة لدى المتجر`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`unity-iap-4`,children:`Unity IAP 4`}),`\n`,_jsxs(_components.p,{children:[`تحتفظ اللعبة التي تعمل بـ Unity IAP 4.x بشيفرة الشراء الخاصة بها، وتسلّم كل عملية شراء إلى Flock عبر\n`,_jsx(_components.code,{children:`Shop.RedeemStoreReceiptAsync`}),`، ولا تُنهيها في المتجر إلا بعد أن تعود. والملف\n`,_jsx(_components.a,{href:`https://github.com/QwackStack/FlockUnitySDK/blob/main/Docs~/recipes/FlockUnityIap4Store.cs`,children:_jsx(_components.code,{children:`FlockUnityIap4Store.cs`})}),`\nفي مستودع حزمة التطوير على GitHub نسخة جاهزة تنسخها إلى مشروعك (فحزمة `,_jsx(_components.code,{children:`.unitypackage`}),` لا تتضمّنه).`]}),`\n`,_jsx(Heading,{level:`2`,id:`your-own-store-code-in-unreal`,children:`شيفرة المتجر الخاصة بك في Unreal`}),`\n`,_jsxs(_components.p,{children:[`اللعبة التي لها شيفرة فوترة خاصة بها (على Android مع UE 5.4 حتى 5.7، مثلًا) تسلّم كل عملية شراء إلى Flock عبر\n`,_jsx(_components.code,{children:`RedeemStoreReceipt`}),` لمزوّد المتجر (`,_jsx(_components.strong,{children:`Flock Redeem Store Receipt`}),`، مع `,_jsx(_components.strong,{children:`Make Google Play Receipt`}),` أو\n`,_jsx(_components.strong,{children:`Make App Store Receipt`}),`)، ولا تُنهيها في المتجر إلا بعد أن تنجح. ويمكن إرسال الاسترداد مرة أخرى بأمان:\nفعملية الشراء الواحدة في المتجر تُنشئ عملية شراء واحدة في Flock.`]}),`\n`,_jsx(_components.p,{children:`استخدم طريقة شراء واحدة. فعقد Blueprint الخاصة بالشراء داخل التطبيق في المحرّك تُنهي عملية الشراء لحظة\nإجرائها، قبل أن يسلّمها Flock، فتضيع عملية الشراء التي يرفضها Flock بعد ذلك. وتحذّر لوحة إعداد Flock في\nالمحرّر حين يستخدمها Blueprint في لعبة تبيع متاجرها عناصر بمال حقيقي؛ فلا تُبقِها إلا لمنتجات لا يبيعها أي\nعنصر في متاجر Flock.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"الشراء داخل التطبيق","description":"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.","href":"/ar/guides/real-money-purchases"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"ما الذي تُعدّه","slug":"what-you-set-up","depth":2,"children":[]},{"title":"اعرض سعر المتجر","slug":"show-the-stores-price","depth":2,"children":[]},{"title":"الشراء","slug":"buy","depth":2,"children":[]},{"title":"استعادة المشتريات","slug":"restore-purchases","depth":2,"children":[]},{"title":"مشتريات تنتهي لاحقًا","slug":"purchases-finished-later","depth":2,"children":[]},{"title":"إيقاف بيع عنصر","slug":"stop-selling-an-item","depth":2,"children":[]},{"title":"اختبر قبل الإطلاق","slug":"test-before-you-ship","depth":2,"children":[]},{"title":"الإيرادات","slug":"revenue","depth":2,"children":[]},{"title":"حين يفشل شيء","slug":"when-something-fails","depth":2,"children":[]},{"title":"Unity IAP 4","slug":"unity-iap-4","depth":2,"children":[]},{"title":"شيفرة المتجر الخاصة بك في Unreal","slug":"your-own-store-code-in-unreal","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qwacks/05763fd4e1d53e37/lang-toggle.js"],"subdomain":"qwacks","siteName":"Qwacks","title":"الشراء داخل التطبيق - Qwacks","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/guides/real-money-purchases","matchLevel":1},"ar":{"href":"/ar/guides/real-money-purchases","matchLevel":0}}},"lastModified":"2026-11-11T19:01:52.263Z","originalFileLocation":"ar/guides/real-money-purchases.mdx","locale":"ar"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"الشراء داخل التطبيق - Qwacks\">\u003cmeta data-mint-head property=\"og:description\" content=\"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qwacks\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qwacks.com/ar/guides/real-money-purchases\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%A7%D9%82%D8%AA%D8%B5%D8%A7%D8%AF+%D9%88%D8%A7%D9%84%D9%85%D8%AF%D9%81%D9%88%D8%B9%D8%A7%D8%AA\u0026amp;title=%D8%A7%D9%84%D8%B4%D8%B1%D8%A7%D8%A1+%D8%AF%D8%A7%D8%AE%D9%84+%D8%A7%D9%84%D8%AA%D8%B7%D8%A8%D9%8A%D9%82\u0026amp;description=%D8%A8%D9%90%D8%B9+%D8%B9%D9%86%D8%A7%D8%B5%D8%B1+%D8%A7%D9%84%D9%85%D8%AA%D8%AC%D8%B1+%D8%A8%D9%85%D8%A7%D9%84+%D8%AD%D9%82%D9%8A%D9%82%D9%8A+%D8%B9%D8%A8%D8%B1+App+Store+%D9%88Google+Play.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=006782a5aeed94e696359577b919dcf79c55e800f08dd2de5bf62fe2dfe1c15f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"الشراء داخل التطبيق - Qwacks\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=%D8%A7%D9%84%D8%A7%D9%82%D8%AA%D8%B5%D8%A7%D8%AF+%D9%88%D8%A7%D9%84%D9%85%D8%AF%D9%81%D9%88%D8%B9%D8%A7%D8%AA\u0026amp;title=%D8%A7%D9%84%D8%B4%D8%B1%D8%A7%D8%A1+%D8%AF%D8%A7%D8%AE%D9%84+%D8%A7%D9%84%D8%AA%D8%B7%D8%A8%D9%8A%D9%82\u0026amp;description=%D8%A8%D9%90%D8%B9+%D8%B9%D9%86%D8%A7%D8%B5%D8%B1+%D8%A7%D9%84%D9%85%D8%AA%D8%AC%D8%B1+%D8%A8%D9%85%D8%A7%D9%84+%D8%AD%D9%82%D9%8A%D9%82%D9%8A+%D8%B9%D8%A8%D8%B1+App+Store+%D9%88Google+Play.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=006782a5aeed94e696359577b919dcf79c55e800f08dd2de5bf62fe2dfe1c15f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0099FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qwacks.com/ar/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ar/guides/real-money-purchases.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.qwacks.com/ar/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qwacks.com/#organization\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qwacks.com#website\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qwacks.com/ar/guides/real-money-purchases#webpage\",\"url\":\"https://docs.qwacks.com/ar/guides/real-money-purchases\",\"name\":\"الشراء داخل التطبيق\",\"description\":\"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\",\"dateModified\":\"2026-11-11T19:01:52.263Z\",\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qwacks.com/ar/guides/real-money-purchases#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qwacks.com/ar/guides/real-money-purchases#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"الميزات\",\"item\":\"https://docs.qwacks.com/ar/guides/players-and-auth\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"الاقتصاد والمدفوعات\",\"item\":\"https://docs.qwacks.com/ar/guides/currencies-and-wallets\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"الشراء داخل التطبيق\",\"item\":\"https://docs.qwacks.com/ar/guides/real-money-purchases\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qwacks.com/ar/guides/real-money-purchases#article\",\"headline\":\"الشراء داخل التطبيق\",\"name\":\"الشراء داخل التطبيق\",\"description\":\"بِع عناصر المتجر بمال حقيقي عبر App Store وGoogle Play.\",\"url\":\"https://docs.qwacks.com/ar/guides/real-money-purchases\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qwacks.com/ar/guides/real-money-purchases#webpage\"},\"dateModified\":\"2026-11-11T19:01:52.263Z\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qwacks\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qwacks\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ar/guides/real-money-purchases.md","siteName":"Qwacks","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/guides/real-money-purchases"}]},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"tabs":[{"tab":"Qwacks","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/qwacks.svg","pages":[{"title":"Qwacks","href":"/ar/welcome"}]},{"tab":"Flock","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/flock.svg","groups":[{"group":"بدء الاستخدام","pages":[{"title":"Flock","href":"/ar/introduction"},{"title":"البداية السريعة","href":"/ar/quickstart"},{"title":"المصادقة","href":"/ar/authentication"},{"title":"حزمة تطوير Unity","href":"/ar/sdk/unity"},{"title":"حزمة تطوير Unreal","href":"/ar/sdk/unreal"}]},{"group":"المفاهيم","pages":[{"title":"الاستوديوهات والألعاب","href":"/ar/concepts/studios-and-games"},{"title":"الإصدارات","href":"/ar/concepts/versions"},{"title":"اللاعبون","href":"/ar/concepts/players"}]},{"group":"الميزات","pages":[{"group":"اللاعبون","pages":[{"title":"تسجيل الدخول","href":"/ar/guides/players-and-auth"},{"title":"ربط الحسابات","href":"/ar/guides/account-linking"},{"title":"بيانات اللاعب","href":"/ar/guides/player-data"},{"title":"الحظر","href":"/ar/guides/bans"}]},{"group":"التقدّم","pages":[{"title":"الإنجازات","href":"/ar/guides/achievements"},{"title":"لوحات الصدارة","href":"/ar/guides/leaderboards"}]},{"group":"الاقتصاد والمدفوعات","pages":[{"title":"العملات والمحافظ","href":"/ar/guides/currencies-and-wallets"},{"title":"المتاجر والمخزون","description":"بِع العناصر وتتبّع ما يملكه كل لاعب.","href":"/ar/guides/shops-and-inventory"},{"title":"الشراء داخل التطبيق","href":"/ar/guides/real-money-purchases"},{"title":"الدفع عبر الويب","description":"بِع عناصر المتجر بمال حقيقي على Windows وmacOS وLinux وWebGL عبر Stripe أو Tap أو Moyasar.","href":"/ar/guides/web-checkout"}]},{"group":"محتوى اللعبة","pages":[{"title":"الإعدادات عن بُعد","href":"/ar/guides/remote-config"},{"title":"تحديثات اللعبة","href":"/ar/guides/game-patches"},{"title":"ملفات اللعبة","href":"/ar/guides/assets"}]},{"group":"التواصل مع اللاعبين","pages":[{"title":"شرائح اللاعبين","href":"/ar/guides/segments"},{"title":"الإشعارات","href":"/ar/guides/notifications"}]},{"group":"التحليلات","pages":[{"title":"التحليلات والأحداث","href":"/ar/guides/analytics-and-events"},{"title":"تنبيهات المطوّرين","href":"/ar/guides/developer-alerts"}]},{"group":"اللعب الجماعي","pages":[{"title":"اللعب الجماعي","sidebarTitle":"نظرة عامة","href":"/ar/guides/multiplayer"},{"title":"الفرق","href":"/ar/guides/parties"},{"title":"مطابقة اللاعبين","href":"/ar/guides/matchmaking"},{"title":"الجلسات","href":"/ar/guides/sessions"},{"title":"اتصال اللاعبين","href":"/ar/guides/connecting-players"}]}]},{"group":"المرجع","pages":[{"title":"سجل التغييرات","href":"/ar/changelog"}]}]},{"tab":"Protokite","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/protokite.svg","pages":[{"title":"Protokite","href":"/ar/protokite/getting-started"}]},{"tab":"Data Duck","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/data-duck.svg","pages":[{"title":"Data Duck","href":"/ar/data-duck/getting-started"}]}]}]},"basePath":"","title":"الشراء داخل التطبيق - Qwacks","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}