Composer Supply Chain Security: 2.10 and 2.11 in Practice
A practical guide for PHP and Laravel teams to enable Composer's malware blocking, cooldown and advisory policies, and fix the habits attackers exploit.
How to accept wallet, QR, card and online payments in Iraq safely: server-side confirmation, webhook checks, reconciliation and account protection.

Wallets, QR codes and card machines are now part of everyday business in Iraq and the Kurdistan Region. Many organisations are connecting to a payment provider for the first time, often with a small team and a tight deadline. In my view, the biggest risk with digital payments in Iraq is not the technology. It is the gap between "the customer says they paid" and "the money actually arrived".
This article is a practical security checklist for IT managers, developers and founders who accept or integrate these payments.
The numbers have moved quickly. Shafaq News, citing the Eco Iraq Observatory, reported that electronic payments in Iraq reached 25.4 trillion IQD (about $16.71bn) in the first seven months of 2026, across more than 10.8 million transactions. The same report counts 37.6 million payment cards, around 197,000 POS terminals and 18 electronic payment companies, five of which offer digital wallets.
Other signals point the same way:
The ZainCash CEO has pointed to "talent bottlenecks" as one of the things holding growth back. That matches what I see: integrations are often built quickly by people who have never handled money flows before. The controls below are the ones I would insist on.
A success page, a screenshot or a forwarded SMS shows nothing about whether money reached your account. Screens can be edited, old screenshots reused, and messages faked.
When a provider calls your server to say a payment succeeded, you must prove three things: the call really came from them, it is fresh, and you have not already acted on it. Below is a simplified Laravel example. Header names, signing formats and payload fields differ between providers, so always follow your provider's own documentation.
// Example only: adapt header names and payload fields to your provider's documentation.
public function handle(Request $request)
{
$timestamp = (string) $request->header('X-Timestamp', '');
$signature = (string) $request->header('X-Signature', '');
$payload = $request->getContent();
// Reject missing or old timestamps to block replays (5-minute window).
abort_if($timestamp === '' || abs(time() - (int) $timestamp) > 300, 401);
// Constant-time comparison of the HMAC signature.
$expected = hash_hmac('sha256', $timestamp.'.'.$payload, config('services.wallet.webhook_secret'));
abort_unless(hash_equals($expected, $signature), 401);
$data = json_decode($payload, true);
DB::transaction(function () use ($data) {
// Idempotency: provider_ref has a unique index, so each payment is recorded once.
$payment = Payment::firstOrCreate(
['provider_ref' => $data['reference']],
['order_id' => $data['order_id'], 'amount' => (int) $data['amount'], 'currency' => $data['currency']]
);
if (! $payment->wasRecentlyCreated) {
return; // Already processed.
}
$order = Order::whereKey($data['order_id'])->lockForUpdate()->firstOrFail();
// Amount (integer IQD) and currency must match the order exactly.
if ($order->status !== 'pending' || $order->amount_iqd !== $payment->amount || $payment->currency !== 'IQD') {
Log::warning('Payment mismatch', ['provider_ref' => $payment->provider_ref]);
return;
}
$order->update(['status' => 'paid']);
});
return response()->noContent();
}
A few rules sit behind this code:
Reconciliation is the control that catches what the others miss. Every day, match your orders against the provider's settlement report. Every unmatched item goes to a named owner, not to a shared inbox. This is how you find integration bugs, duplicate fulfilments and insider fraud while the amounts are still small.
Connectivity problems and provider downtime also happen. Plan for them:
The merchant dashboard is where the money is, so treat it like a bank login.
Customers need protecting too. Send payment and refund confirmations by SMS or WhatsApp from one consistent, registered sender name. State clearly that you will never ask for their OTP or PIN. At BulkSMSIraq, which I founded, we send OTP confirmations and payment notifications for businesses. That is one practical way to make these messages arrive from a sender your customers recognise.
Finally, collect less. Do not store card data or wallet PINs. Log transaction references, not personal details. If you follow ISO/IEC 27001, these controls map naturally to access control, supplier relationships, and logging and monitoring, so they can sit inside your existing management system.
Only connect to CBI-licensed banks, wallets and payment companies. This protects your customers and keeps you out of regulatory trouble.
It matters especially in the Kurdistan Region. In October 2026 the KRG Ministry of Transport and Communications instructed internet service providers to block digital-currency and online forex transactions, applying a CBI framework. Before signing with any provider, ask for their licence and check it.
| Channel | Main risk | Key control |
|---|---|---|
| QR or wallet payments | Fake screenshots, spoofed confirmations | Check status on the server or merchant app |
| Card POS | Staff misuse, refund abuse | Role limits, refund approval, daily reconciliation |
| Online gateway or webhook | Forged or replayed callbacks | HMAC check, timestamp, idempotency |
| Payout or bank detail changes | Account takeover | MFA plus OTP and call-back confirmation |
Before you go live, confirm that:
If your team is small, it is reasonable to get outside help with the integration or a security review. My company, Standing, provides app development, information security services and hosting for organisations in Iraq and the Kurdistan Region.
Digital payments are growing fast here, and that is good news for businesses and citizens alike. The one habit that prevents most losses is simple: trust your server and your provider, never the customer's screen. Build everything else on top of that rule.
🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.