Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared Libs
Adyen Magento2
Commits
a01f9d94
Commit
a01f9d94
authored
May 23, 2017
by
Rik ter Beek
Committed by
GitHub
May 23, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #115 from Adyen/develop
Merge from 'Develop'
parents
9063aa5a
ca3ab998
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
8 deletions
+31
-8
Block/Redirect/Pos.php
Block/Redirect/Pos.php
+15
-5
Model/Cron.php
Model/Cron.php
+13
-0
Model/Ui/AdyenPosConfigProvider.php
Model/Ui/AdyenPosConfigProvider.php
+1
-1
composer.json
composer.json
+1
-1
etc/module.xml
etc/module.xml
+1
-1
No files found.
Block/Redirect/Pos.php
View file @
a01f9d94
...
...
@@ -49,6 +49,12 @@ class Pos extends \Magento\Payment\Block\Form
*/
protected
$_adyenLogger
;
/**
* Currency factory
*
* @var \Magento\Directory\Model\CurrencyFactory
*/
protected
$_currencyFactory
;
/**
* Pos constructor.
...
...
@@ -66,7 +72,8 @@ class Pos extends \Magento\Payment\Block\Form
\Magento\Sales\Model\OrderFactory
$orderFactory
,
\Magento\Checkout\Model\Session
$checkoutSession
,
\Adyen\Payment\Helper\Data
$adyenHelper
,
\Adyen\Payment\Logger\AdyenLogger
$adyenLogger
\Adyen\Payment\Logger\AdyenLogger
$adyenLogger
,
\Magento\Directory\Model\CurrencyFactory
$currencyFactory
)
{
$this
->
_orderFactory
=
$orderFactory
;
$this
->
_checkoutSession
=
$checkoutSession
;
...
...
@@ -75,6 +82,7 @@ class Pos extends \Magento\Payment\Block\Form
$this
->
_request
=
$context
->
getRequest
();
$this
->
_adyenHelper
=
$adyenHelper
;
$this
->
_adyenLogger
=
$adyenLogger
;
$this
->
_currencyFactory
=
$currencyFactory
;
if
(
!
$this
->
_order
)
{
$incrementId
=
$this
->
_getCheckout
()
->
getLastRealOrderId
();
...
...
@@ -97,7 +105,7 @@ class Pos extends \Magento\Payment\Block\Form
{
$launchlink
=
""
;
try
{
if
(
$this
->
_order
->
getPayment
())
if
(
$this
->
_order
->
getPayment
())
{
$realOrderId
=
$this
->
_order
->
getRealOrderId
();
...
...
@@ -134,9 +142,10 @@ class Pos extends \Magento\Payment\Block\Form
$paymentAmount
.
"&originalCustomMerchantReference="
.
$merchantReference
.
"&originalCustomSessionId="
.
session_id
());
$launchlink
=
"adyen://payment?sessionId="
.
session_id
()
.
"&amount="
.
$paymentAmount
.
"¤cy="
.
$currencyCode
.
"&merchantReference="
.
$merchantReference
.
$recurringParams
.
$receiptOrderLines
.
"&callback="
.
$callbackUrl
.
$extraParamaters
;
// Cash you can trigger by adding transactionType=CASH
$launchlink
=
"adyen://payment?sessionId="
.
session_id
()
.
"&amount="
.
$paymentAmount
.
"¤cy="
.
$currencyCode
.
"&merchantReference="
.
$merchantReference
.
$recurringParams
.
$receiptOrderLines
.
"&callback="
.
$callbackUrl
.
$extraParamaters
;
// cash not working see ticket
// https://youtrack.is.adyen.com/issue/IOS-130#comment=102-20285
...
...
@@ -250,6 +259,7 @@ class Pos extends \Magento\Payment\Block\Form
"====== YOUR PAYMENT DETAILS ======||CB
\n
"
.
"---||C
\n
"
;
return
$myReceiptOrderLines
;
}
...
...
Model/Cron.php
View file @
a01f9d94
...
...
@@ -234,6 +234,19 @@ class Cron
sprintf
(
"Processing notification %s"
,
$notification
->
getEntityId
())
);
/**
* If the event is a RECURRING_CONTRACT wait an extra 5 minutes
* before processing so we are sure the RECURRING_CONTRACT
*/
if
(
trim
(
$notification
->
getEventCode
())
==
Notification
::
RECURRING_CONTRACT
&&
strtotime
(
$notification
->
getCreatedAt
())
>=
strtotime
(
'-5 minutes'
,
time
()))
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
"This is a recurring_contract notification wait an extra 5 minutes
before processing this to make sure the contract exists"
);
continue
;
}
// log the executed notification
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
print_r
(
$notification
->
debug
(),
1
));
...
...
Model/Ui/AdyenPosConfigProvider.php
View file @
a01f9d94
...
...
@@ -85,7 +85,7 @@ class AdyenPosConfigProvider implements ConfigProviderInterface
self
::
CODE
=>
[
'isActive'
=>
true
,
'redirectUrl'
=>
$this
->
_urlBuilder
->
getUrl
(
'adyen/process/redirect'
,
[
'_secure'
=>
$this
->
_getRequest
()
->
isSecure
()])
'adyen/process/redirect
Pos
'
,
[
'_secure'
=>
$this
->
_getRequest
()
->
isSecure
()])
]
]
];
...
...
composer.json
View file @
a01f9d94
...
...
@@ -2,7 +2,7 @@
"name"
:
"adyen/module-payment"
,
"description"
:
"Official Magento2 Plugin to connect to Payment Service Provider Adyen."
,
"type"
:
"magento2-module"
,
"version"
:
"2.0.
4
"
,
"version"
:
"2.0.
5
"
,
"license"
:
[
"OSL-3.0"
,
"AFL-3.0"
...
...
etc/module.xml
View file @
a01f9d94
...
...
@@ -24,7 +24,7 @@
-->
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<module
name=
"Adyen_Payment"
setup_version=
"2.0.
4
"
>
<module
name=
"Adyen_Payment"
setup_version=
"2.0.
5
"
>
<sequence>
<module
name=
"Magento_Sales"
/>
<module
name=
"Magento_Quote"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment