Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinaBaraliu committed Dec 23, 2024
1 parent 3233ce8 commit b8c4070
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Service/Applepay/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,26 @@ public function process($request)
$this->logger->addDebug('Cart Variable (line 209): '. json_encode($cart));
$this->logger->addDebug('Cart shipping addressss: '. json_encode($cart->getShippingAddress()));
$this->logger->addDebug('Cart shipping address methodsss: '. json_encode($cart->getShippingAddress()->getGroupedAllShippingRates()));
try {
$shippingMethods = $this->appleShippingMethod->getAvailableMethods($cart);
} catch (\Exception $e) {
throw new \Exception(__('Unable to retrieve shipping methods.'));
}
// try {
// $shippingMethods = $this->appleShippingMethod->getAvailableMethods($cart);
// } catch (\Exception $e) {
// throw new \Exception(__('Unable to retrieve shipping methods.'));
// }

$this->logger->addDebug('Shipping Methods Variable: '. json_encode($shippingMethods));
// $this->logger->addDebug('Shipping Methods Variable: '. json_encode($shippingMethods));

$this->logger->addDebug('Cart Session: ' . json_encode($cart->getData()));


foreach ($shippingMethods as $method) {
$shippingMethodsResult[] = [
'carrier_title' => $method['carrier_title'],
'price_incl_tax' => round($method['amount']['value'], 2),
'method_code' => $method['carrier_code'] . '_' . $method['method_code'],
'method_title' => $method['method_title'],
];
}
$this->logger->addDebug('Shipping Methods Result Variable: '. json_encode($shippingMethodsResult));
// foreach ($shippingMethods as $method) {
// $shippingMethodsResult[] = [
// 'carrier_title' => $method['carrier_title'],
// 'price_incl_tax' => round($method['amount']['value'], 2),
// 'method_code' => $method['carrier_code'] . '_' . $method['method_code'],
// 'method_title' => $method['method_title'],
// ];
// }
// $this->logger->addDebug('Shipping Methods Result Variable: '. json_encode($shippingMethodsResult));

$shippingMethodsss = [
[
Expand Down

0 comments on commit b8c4070

Please sign in to comment.