Skip to content

Commit f20ad91

Browse files
authored
Merge pull request #88 from unzerdev/UMCS-383/qa_changes
Umcs 383/qa changes
2 parents bb6368d + c16d58a commit f20ad91

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
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

examples/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ function printMessage($type, $title, $text)
239239
With "paylater-invoice" type.
240240
</div>
241241
</div>
242+
<div class="ui attached white button" onclick="location.href='https://docs.unzer.com/payment-methods/unzer-invoice-upl/';">
243+
Documentation
244+
</div>
242245
<div id="tryInvoiceSecuredExample" class="ui bottom attached green button" onclick="location.href='PaylaterInvoice/';">
243246
Try
244247
</div>

test/Fixtures/CustomerFixtureTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function getMinimalNotRegisteredB2bCustomer(): Customer
9898
*/
9999
public function getMaximalNotRegisteredB2bCustomer(): Customer
100100
{
101-
102101
$customer = $this->getMinimalNotRegisteredB2bCustomer()
103102
->setShippingAddress($this->getShippingAddress())
104103
->setSalutation(Salutations::MR)
@@ -135,7 +134,6 @@ public function getMinimalRegisteredB2bCustomer(): Customer
135134
*/
136135
public function getMaximalRegisteredB2bCustomer(): Customer
137136
{
138-
139137
$customer = $this->getMinimalRegisteredB2bCustomer()
140138
->setShippingAddress($this->getShippingAddress())
141139
->setSalutation(Salutations::MR)

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)