Skip to content

Commit

Permalink
SW-365: replace usage of ?? to support php 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Mueller committed Oct 28, 2021
1 parent 7e62d3b commit cc9b8eb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,12 @@ public function addApplepayPaymentParameters($payment, $token) {

$payment->setPaydata($paydata);

$payment->setCardtype($cardTypeMappings[strtolower($token['paymentMethod']['network'] ?? 'default')]);
if (!isset($token['paymentMethod']['network']) || is_null($token['paymentMethod']['network'])) {
$cardType = 'default';
} else {
$cardType = $token['paymentMethod']['network'];
}
$payment->setCardtype($cardTypeMappings[strtolower($cardType)]);

return $payment;
}
Expand Down

0 comments on commit cc9b8eb

Please sign in to comment.