/

Common Integration Bugs in Algerian Payments & Delivery

Slogan: Test what fails, not just what succeeds.

Integrating Chargily Pay v2, SATIM, and Yalidine often passes manual "happy path" QA on staging, then fails silently or loses money in production under retries, browser refreshes, unit mixups, or bad wilaya data. Below are 9 recurring production bugs — each linked to an exact dz-sandbox scenario that reproduces it offline.

#Bug GuideSymptom in ProductionReproducing Scenario(s)
1Duplicate WebhooksCustomer billed once, order fulfilled or wallet credited twiceduplicate_webhook
2Out-of-Order Webhookscanceled / older event overwrites a newer paid orderout_of_order_webhooks
3Missing Signature VerificationAttacker forges HTTP POST checkout.paid directly to webhook routewebhook_bad_signature
4Non-Idempotent FulfillmentWebhook arrives late or simultaneously with redirect polling -> double parceldelayed_webhook, duplicate_webhook
5Timeout Without Retry / Idempotency KeyGateway slow/500 causes hung requests or orphan checkoutstimeout, network_drop, gateway_500
6Amount Units: DZD vs Centimes2,500 DZD charged as 25 DZD on SATIM (amount * 100) or 250,000 DZD on Chargilyamount_mismatch
7Double Charge on Refresh / Back ButtonUser hits Back/F5 and confirms the same SATIM/Chargily order twicedouble_charge_attempt
8Parcel Stuck States & Virtual TimersPolling jobs hang forever or never reconcile returned parcelsstatus_stuck, lifecycle_fast, returned_to_sender
9Invalid Wilaya / Commune & Phone ValidationCOD checkout accepts bad commune, then courier API rejects 100% of labelsinvalid_wilaya, phone_rejected
box.style.display = "block"; if (!hits.length) { box.innerHTML = "
" + noResultsText + "
"; return; } box.innerHTML = hits.map(function (hit) { return "" + hit.title.replace(/" + hit.path + " — " + hit.excerpt.replace(/"; }).join(""); }); })();