Skip to content

Commit

Permalink
Fix CS and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Dec 18, 2023
1 parent 7f0e332 commit 6b23cbe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PaymentMethods/Twint.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function getConfig(): array
],
'filtersOnBuild' => false,
'confirmationDelayed' => false,
'SEPA' => false
'SEPA' => false,
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Shared/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getPayment($payment_id, $apiKey, $use_cache = true): ?\Mollie\Ap
*/
public function getAllPaymentMethods($apiKey, $test_mode = false, $use_cache = true)
{
if(!$apiKey) {
if (!$apiKey) {
$apiKey = $this->getApiKey($test_mode);
}
$result = $this->getRegularPaymentMethods($apiKey, $test_mode, $use_cache);
Expand Down Expand Up @@ -693,6 +693,7 @@ public function isSubscription($orderId)

public function getAllAvailablePaymentMethods($use_cache = true, $filters = [])
{

$apiKey = $this->settingsHelper->getApiKey();
$methods = false;
$locale = $this->getPaymentLocale();
Expand All @@ -714,7 +715,6 @@ public function getAllAvailablePaymentMethods($use_cache = true, $filters = [])
} else {
delete_transient($transient_id);
}

// No cache exists, call the API and cache the result
if ($methods === false) {
if (!$apiKey) {
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Functional/Payment/PaymentServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function processPayment_Order_success(){
expect('get_option')
->with('mollie-payments-for-woocommerce_api_switch')
->andReturn(false);
expect('get_transient')->andReturn(['ideal'=>['id'=>'ideal']]);
expect('get_transient')->andReturn(['ideal'=>['id'=>'ideal', 'status'=>'activated']]);
$wcOrder->expects($this->any())
->method('get_billing_company')
->willReturn('');
Expand Down

0 comments on commit 6b23cbe

Please sign in to comment.