Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 4.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	Helper/PurchaseHelper.php
#	Observer/PreAuth.php
#	composer.json
#	etc/module.xml
  • Loading branch information
ebanolopes committed Jul 6, 2021
2 parents e5bd3a4 + 779bd3c commit 28c7d83
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions Helper/PurchaseHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,18 @@ public function makeShipments(Order $order)

public function makeShipper($shippingMethod)
{
$shippingCarrier = $shippingMethod->getCarrierCode();
if (is_string($shippingMethod)) {
$shippingMethodArray = explode('_', $shippingMethod);

if (count($shippingMethodArray) < 2) {
return false;
}

$shippingCarrier = $shippingMethodArray[0];
} else {
$shippingCarrier = $shippingMethod->getCarrierCode();
}

$allowMethodsJson = $this->scopeConfigInterface->getValue('signifyd/general/shipper_config');
$allowMethods = $this->jsonSerializer->unserialize($allowMethodsJson);

Expand All @@ -771,7 +782,18 @@ public function makeShipper($shippingMethod)

public function makeshippingMethod($shippingMethod)
{
$shippingMethodCode = $shippingMethod->getMethod();
if (is_string($shippingMethod)) {
$shippingMethodArray = explode('_', $shippingMethod);

if (count($shippingMethodArray) < 2) {
return false;
}

$shippingMethodCode = $shippingMethodArray[1];
} else {
$shippingMethodCode = $shippingMethod->getMethod();
}

$allowMethodsJson = $this->scopeConfigInterface->getValue('signifyd/general/shipping_method_config');
$allowMethods = $this->jsonSerializer->unserialize($allowMethodsJson);

Expand Down

0 comments on commit 28c7d83

Please sign in to comment.