Skip to content

Commit

Permalink
Adjusted to the latest Vanilo 4 interfaces; added Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Apr 16, 2024
1 parent 074988a commit 227ddf2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
php: ['8.2', '8.3']
laravel: ['10.0', '10.37']
laravel: ['10.0', '10.48', '11.0', '11.3']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }}
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#### 2023-XX-YY

- Added Vanilo 4 Compatibility
- Added Laravel 11 support
- Dropped Vanilo 3, Laravel 9 and PHP 8.1 support

## 1.1.0
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
},
"require-dev": {
"ext-sqlite3": "*",
"orchestra/testbench": "^8.0",
"phpunit/phpunit" : "^9.0"
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit" : "^10.0"
},
"autoload-dev": {
"psr-4": {
Expand Down
16 changes: 6 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php"
backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true"
convertErrorsToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix="Test.php">src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Vanilo Mollie Test Suite">
<directory>tests</directory>
Expand All @@ -18,4 +9,9 @@
<env name="APP_DEBUG" value="true"/>
<env name="MOLLIE_API_KEY" value="123456"/>
</php>
<source>
<include>
<directory suffix="Test.php">src/</directory>
</include>
</source>
</phpunit>
5 changes: 5 additions & 0 deletions src/Messages/MolliePaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ public function setView(string $view): self

return $this;
}

public function getRemoteId(): ?string
{
return $this->molliePayment->id;
}
}
5 changes: 5 additions & 0 deletions src/Messages/MolliePaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function getTransactionId(): ?string
return $this->transactionId;
}

public function getTransactionAmount(): float
{
return $this->getAmountPaid() ?? 0;
}

public function getAmountPaid(): ?float
{
return match ($this->getNativeStatus()->value()) {
Expand Down

0 comments on commit 227ddf2

Please sign in to comment.