Skip to content

Commit

Permalink
Reverting changes to disable Place Order button.
Browse files Browse the repository at this point in the history
  • Loading branch information
khushboo-singhvi committed Oct 7, 2024
1 parent 9f36b99 commit da84aa0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Magewire/Payment/Method/CreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Adyen\Hyva\Model\CreditCard\InstallmentsManager;
use Hyva\Checkout\Model\Magewire\Component\Evaluation\EvaluationResult;
use Hyva\Checkout\Model\Magewire\Component\EvaluationResultFactory;
use Magento\Checkout\Model\Session as SessionCheckout;

class CreditCard extends AdyenPaymentComponent
{
const METHOD_CC = 'adyen_cc';
Expand All @@ -18,9 +18,7 @@ class CreditCard extends AdyenPaymentComponent
public function __construct(
private readonly Context $context,
private readonly BrandsManager $brandsManager,
private readonly InstallmentsManager $installmentsManager,
private readonly SessionCheckout $sessionCheckout

private readonly InstallmentsManager $installmentsManager
) {
parent::__construct($this->context);
}
Expand All @@ -38,10 +36,8 @@ public function getMethodCode(): string
*/
public function evaluateCompletion(EvaluationResultFactory $resultFactory): EvaluationResult
{
$payment = $this->sessionCheckout->getQuote()->getPayment();
return $payment->getMethod() === 'adyen_cc' && !$payment->getAdditionalData()
? $resultFactory->createBlocking()
: $resultFactory->createSuccess();
return $resultFactory->createSuccess();

}

public function refreshProperties(): void
Expand Down

0 comments on commit da84aa0

Please sign in to comment.