Skip to content

Commit b7c6675

Browse files
committed
UMCS-383(change) Update payment types in readme.
- Add card test with invalid expiry date.
1 parent 43ee8bb commit b7c6675

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Please refer to the following documentation for installation instructions and us
3333
* Unzer Bank Transfer (PIS)
3434
* Unzer Direct Debit (secured) + Recurring
3535
* Unzer Instalment (secured)
36-
* Unzer Invoice (secured)
36+
* Unzer Invoice
37+
* Unzer Invoice Secured (deprecated)
3738
* WeChat Pay
3839

3940
## Supported features

test/integration/PaymentTypes/CardTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,21 @@ public function invalidRecurrenceTypeShouldThrowApiException($recurrenceType): v
150150
$card->charge('99.99', 'EUR', 'https://unzer.com', null, null, null, null, null, null, null, $recurrenceType);
151151
}
152152

153+
/**
154+
* Invalid expiry date should throw API exception.
155+
*
156+
* @test
157+
*/
158+
public function invalidExpiryDateShouldThrowApiException(): void
159+
{
160+
$card = $this->createCardObject('4711100000000000');
161+
$card->setExpiryDate('01/2001');
162+
163+
/** @var Card $card */
164+
$this->expectException(UnzerApiException::class);
165+
$this->unzer->createPaymentType($card);
166+
}
167+
153168
/**
154169
* Card should be chargeable with recurrence type.
155170
*

0 commit comments

Comments
 (0)