Skip to content

Commit

Permalink
Support for Blik (Adyen#1022)
Browse files Browse the repository at this point in the history
* Try to render the component for all alternative payment methods as the error will be handled in the try/catch

* Checking full amount of minutes to cancel orders on Auth success false

* Update README
  • Loading branch information
acampos1916 authored May 5, 2021
1 parent 3fa7463 commit d81cbbd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Model/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private function shouldSkipProcessingNotification($notification)
$authorisationSuccessFalseMinDate = new \DateTime('-10 minutes');
$createdAt = \DateTime::createFromFormat('Y-m-d H:i:s', $notification['created_at']);

$minutesUntilProcessing = $createdAt->diff($authorisationSuccessFalseMinDate)->i;
$minutesUntilProcessing = ($createdAt->format('U') - $authorisationSuccessFalseMinDate->format('U')) / 60;

if ($minutesUntilProcessing > 0) {
$this->_adyenLogger->addAdyenNotificationCronjob(
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ If you need to setup your cronjob in Magento <a href="http://devdocs.magento.com
* Ratepay
* Oxxo
* Econtexts
* Blik

_This is not an extensive list of all the supported payment methods but only the ones that have been already verified. In case you would like to see other payment methods in the list as well please contact us to verify those too._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,6 @@ define(
showPayButton = true;
}

// If the details are empty and the pay button does not needs to be rendered by the component
// simply skip rendering the adyen checkout component
if (!paymentMethod.details && !showPayButton) {
result.isPlaceOrderAllowed(true);
return;
}

var city = '';
var country = '';
var postalCode = '';
Expand Down Expand Up @@ -359,8 +352,6 @@ define(
component.mount(containerId);
}).catch(e => {
result.isAvailable(false);
console.log(paymentMethod.methodIdentifier +
' is not available, the method will be hidden from the payment list');
});
} else {
component.mount(containerId);
Expand Down

0 comments on commit d81cbbd

Please sign in to comment.