Skip to content

Commit

Permalink
Merge pull request #435 from fatchip-Stefan/SW-375_php_56
Browse files Browse the repository at this point in the history
SW-365: replace usage of ?? to support php 5.6
  • Loading branch information
hreinberger authored Oct 28, 2021
2 parents 7e62d3b + cc9b8eb commit 484ba75
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 484ba75

Please sign in to comment.