Skip to content

Commit 180c4d9

Browse files
authored
Merge pull request #3116 from wmde/remove-sofort-config
Remove Sofort from config
2 parents eb39b7e + a6061cb commit 180c4d9

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

.docker/app/config.dev.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@
109109
"PPL": {
110110
"donation-enabled": true,
111111
"membership-enabled": false
112-
},
113-
"SUB": {
114-
"donation-enabled": true,
115-
"membership-enabled": false
116112
}
117113
},
118114
"cookie": {

app/config/config.dist.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@
125125
"PPL": {
126126
"donation-enabled": true,
127127
"membership-enabled": false
128-
},
129-
"SUB": {
130-
"donation-enabled": true,
131-
"membership-enabled": false
132128
}
133129
},
134130
"preset-amounts": {

app/config/config.test.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
},
9797
"PPL": {
9898
"donation-enabled": true
99-
},
100-
"SUB": {
101-
"donation-enabled": true
10299
}
103100
},
104101
"user-data-key": "DiF8rUjXa2/pePFhQqB5ylDWfH/W5rlEXnrvf5/tNnk=",

tests/EdgeToEdge/Routes/AddDonationRouteTest.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Monolog\Logger;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\DataProvider;
11-
use PHPUnit\Framework\MockObject\MockObject;
1211
use Symfony\Component\HttpFoundation\Request;
1312
use Symfony\Component\HttpFoundation\Response;
1413
use WMDE\Fundraising\DonationContext\DataAccess\DoctrineEntities\Donation;
@@ -19,8 +18,6 @@
1918
use WMDE\Fundraising\Frontend\Tests\Fixtures\BucketLoggerSpy;
2019
use WMDE\Fundraising\Frontend\Tests\Fixtures\InMemoryTranslator;
2120
use WMDE\Fundraising\Frontend\Tests\Fixtures\PayPalAPISpy;
22-
use WMDE\Fundraising\PaymentContext\Services\PaymentUrlGenerator\Sofort\Response as SofortResponse;
23-
use WMDE\Fundraising\PaymentContext\Services\PaymentUrlGenerator\Sofort\SofortClient;
2421

2522
#[CoversClass( AddDonationController::class )]
2623
class AddDonationRouteTest extends WebRouteTestCase {
@@ -445,35 +442,6 @@ public function testGivenValidCreditCardData_redirectsToPaymentProvider(): void
445442
$this->assertStringContainsString( 'thatother.paymentprovider.com', $response->headers->get( 'Location' ) ?: '' );
446443
}
447444

448-
public function testValidSofortInput_savesDonationAndRedirectsTo3rdPartyPage(): void {
449-
$client = $this->createClient();
450-
$response = new SofortResponse();
451-
$response->setPaymentUrl( 'https://bankingpin.please' );
452-
453-
/** @var SofortClient&MockObject $sofortClient */
454-
$sofortClient = $this->createMock( SofortClient::class );
455-
$sofortClient
456-
->method( 'get' )
457-
->willReturn( $response );
458-
$this->getFactory()->setSofortClient( $sofortClient );
459-
460-
$client->followRedirects( false );
461-
$client->request(
462-
'POST',
463-
'/donation/add',
464-
$this->newValidSofortInput()
465-
);
466-
467-
$donation = $this->getDonationFromDatabase();
468-
469-
$this->assertSame( 'X', $donation->getStatus() );
470-
$this->assertMatchesRegularExpression( '/^(XR)-[ACDEFKLMNPRTWXYZ349]{3}-[ACDEFKLMNPRTWXYZ349]{3}-[ACDEFKLMNPRTWXYZ349]/', $donation->getBankTransferCode() );
471-
472-
$response = $client->getResponse();
473-
$this->assertTrue( $response->isRedirect() );
474-
$this->assertSame( 'https://bankingpin.please', $response->headers->get( 'Location' ) );
475-
}
476-
477445
/**
478446
* @return array<string, int|string>
479447
*/
@@ -486,18 +454,6 @@ private function newValidCreditCardInput(): array {
486454
];
487455
}
488456

489-
/**
490-
* @return array<string, int|string>
491-
*/
492-
private function newValidSofortInput(): array {
493-
return [
494-
'amount' => '10000',
495-
'paymentType' => 'SUB',
496-
'interval' => 0,
497-
'addressType' => 'anonym',
498-
];
499-
}
500-
501457
public function testGivenInvalidRequest_genericErrorMessageIsDisplayed(): void {
502458
$client = $this->createClient();
503459

0 commit comments

Comments
 (0)