Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit d3db840

Browse files
committed
Fixed that "MASTERCARD" (Caps) wasn't handled correct
1 parent ea4ff5d commit d3db840

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Receipt.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ public function getPaymentMethods(): array
112112
public function hasPayedCashless(): bool
113113
{
114114
return preg_match('/Kartenzahlung/', $this->raw_receipt) ||
115-
//the following line is just for old receipts which doesn't have "Kartenzahlung" in it
116-
(preg_match('/Bezahlung/', $this->raw_receipt) && preg_match('/(VISA|MasterCard|American Express|JCB)/', $this->raw_receipt));
115+
(preg_match('/Bezahlung/', $this->raw_receipt) && preg_match('/(visa|mastercard|american express)/', strtolower($this->raw_receipt)));
117116
}
118117

119118
public function hasPayedContactless(): bool

0 commit comments

Comments
 (0)