Skip to content

Commit

Permalink
Adjusted to the latest Vanilo 4 interfaces. Added Laravel 11 compatib…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
fulopattila122 committed Apr 15, 2024
1 parent c286cbb commit b93f985
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
php: ['8.2']
laravel: ['10.0', '10.12']
php: ['8.2', '8.3']
laravel: ['10.43', '10.48', '11.0']
vanilo: ['4.0']
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }} Vanilo ${{ matrix.vanilo }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
##### 2023-XX-YY

- Added Vanilo 4 support
- Added Laravel 11 support
- Dropped Vanilo 3 support
- Dropped PHP 8.0 and 8.1 support
- Dropped Laravel 9 support
- Changed the minimal Laravel version requirement to v10.43

---

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"require": {
"php": "^8.2",
"konekt/concord": "^1.13",
"konekt/enum": "^4.0",
"laravel/framework": "^10.0",
"konekt/enum": "^4.2",
"laravel/framework": "^10.43|^11.0",
"vanilo/contracts": "^4.0",
"vanilo/payment": "^4.0",
"ext-dom": "*",
Expand Down
6 changes: 6 additions & 0 deletions src/Messages/NetopiaPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public function willRedirect(): bool
return true;
}

// What is this method for?
public function getRemoteId(): ?string
{
return null;
}

public function setPaymentId(string $paymentId): self
{
$this->paymentId = $paymentId;
Expand Down
5 changes: 5 additions & 0 deletions src/Messages/NetopiaPaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public function getTransactionId(): ?string
return $this->paymentId;
}

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

public function getAmountPaid(): ?float
{
$sign = ($this->action->isCredit() || $this->action->isCanceled()) ? -1 : 1;
Expand Down
20 changes: 20 additions & 0 deletions tests/Dummies/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,24 @@ public function getBillpayer(): ?Billpayer
{
return new SomeBillPayer();
}

public function getNumber(): string
{
return (string) $this->id;
}

public function getPayableRemoteId(): ?string
{
return null;
}

public function setPayableRemoteId(string $remoteId): void
{
// TODO: Implement setPayableRemoteId() method.
}

public static function findByPayableRemoteId(string $remoteId): ?Payable
{
return null;
}
}

0 comments on commit b93f985

Please sign in to comment.