انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-031-L08

عرض عملي: رفض الدفع وتشغيل التعويضات

  • الدرس 8 من 8
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

exercise the failure path end to end. Prepares MID-031-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Use a test card number that payments declines.
  2. payments replies PaymentDeclined; the saga moves to COMPENSATING.
  3. The orchestrator sends ReleaseStock; inventory releases the reservation; the order becomes CANCELLED.
  4. Planned mistake: write the compensation assuming a reservation exists; trigger the decline before stock replied and it throws. Fix: tolerate a missing reservation and record the cancellation.
  5. Replay ReleaseStock and confirm stock is unchanged the second time.
  6. Add a timeout case: stop payments; after the deadline the saga compensates.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.