Problem
In the Zibal driver (src/Drivers/Zibal/Zibal.php), the purchase() method builds the POST payload manually and doesn't include optional parameters like:
mobile
description
allowedCards
- etc.
Even though the method checkOptionalDetails() exists for this purpose, it is never used.
Why it matters
When we set these values using:
$invoice->detail([
'mobile' => $user->phone,
'description' => 'Test order'
]);
$data = [
'merchant' => $this->settings->merchantId,
'amount' => $amount,
'callbackUrl' => $this->settings->callbackUrl,
'orderId' => $orderId
];
$data = $this->checkOptionalDetails($data);
CURLOPT_POSTFIELDS => json_encode($data),