mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 08:04:31 +00:00
feat: delete cart when cannot order
This commit is contained in:
parent
0a9d8ccfcf
commit
94bec57857
@ -59,7 +59,10 @@ readonly class OvhConnector implements ConnectorInterface
|
||||
$offer['orderable'] === true &&
|
||||
$offer['pricingMode'] === $pricingMode
|
||||
);
|
||||
if (empty($offer)) throw new Exception('Cannot buy this domain name');
|
||||
if (empty($offer)) {
|
||||
$conn->delete("/order/cart/{$cartId}");
|
||||
throw new Exception('Cannot buy this domain name');
|
||||
}
|
||||
|
||||
$item = $conn->post("/order/cart/{$cartId}/domain", [
|
||||
"domain" => $ldhName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user