Skip to content

Commit

Permalink
Fixed that "MASTERCARD" (Caps) wasn't handled correct
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu committed Aug 29, 2020
1 parent ea4ff5d commit d3db840
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Receipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ public function getPaymentMethods(): array
public function hasPayedCashless(): bool
{
return preg_match('/Kartenzahlung/', $this->raw_receipt) ||
//the following line is just for old receipts which doesn't have "Kartenzahlung" in it
(preg_match('/Bezahlung/', $this->raw_receipt) && preg_match('/(VISA|MasterCard|American Express|JCB)/', $this->raw_receipt));
(preg_match('/Bezahlung/', $this->raw_receipt) && preg_match('/(visa|mastercard|american express)/', strtolower($this->raw_receipt)));
}

public function hasPayedContactless(): bool
Expand Down

0 comments on commit d3db840

Please sign in to comment.