Skip to content

Commit

Permalink
fix: require latest moneyphp
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Apr 9, 2024
1 parent 8ae2cc8 commit dde9c77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"omnipay/paypal": "^3",
"omnipay/dummy": "^3",
"omnipay/paymentexpress": "^3.1.1",
"moneyphp/money": "^4.5",
"symfony/http-foundation": "^5.4.25 || ^6.3.1"
},
"autoload": {
Expand Down
6 changes: 5 additions & 1 deletion tests/PaymentGatewayControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,17 @@ public function testInvalidStatus()

public function testStaticRoute()
{
Config::nest();

$staticUrl = 'paymentendpoint/gateway/PaymentExpress_PxPay/complete?id=UNIQUEHASH23q5123tqasdf';
$response = $this->get($staticUrl);
// should return 404, because static route isn't enabled
$this->assertEquals($response->getStatusCode(), 404);

// Configure gateway to use static route
Config::modify()->update(GatewayInfo::class, 'PaymentExpress_PxPay', ['use_static_route' => true]);
Config::modify()->set(GatewayInfo::class, 'PaymentExpress_PxPay', [
'use_static_route' => true
]);

$this->setMockHttpResponse(
'paymentexpress/tests/Mock/PxPayCompletePurchaseSuccess.txt'
Expand Down

0 comments on commit dde9c77

Please sign in to comment.