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
b1a0c576
Commit
b1a0c576
authored
Jan 13, 2020
by
Ángel Campos
Committed by
GitHub
Jan 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into update_backoffice_ui
parents
cf59b4af
4b3a59fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
19 deletions
+112
-19
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
+76
-0
Model/Cron.php
Model/Cron.php
+31
-18
SECURITY.md
SECURITY.md
+4
-0
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
...d/web/js/view/payment/method-renderer/adyen-hpp-method.js
+1
-1
No files found.
CODE_OF_CONDUCT.md
0 → 100644
View file @
b1a0c576
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
*
Using welcoming and inclusive language
*
Being respectful of differing viewpoints and experiences
*
Gracefully accepting constructive criticism
*
Focusing on what is best for the community
*
Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
*
The use of sexualized language or imagery and unwelcome sexual attention or
advances
*
Trolling, insulting/derogatory comments, and personal or political attacks
*
Public or private harassment
*
Publishing others' private information, such as a physical or electronic
address, without explicit permission
*
Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at support@adyen.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the
[
Contributor Covenant
][
homepage
]
, version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[
homepage
]:
https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
Model/Cron.php
View file @
b1a0c576
...
@@ -38,6 +38,7 @@ class Cron
...
@@ -38,6 +38,7 @@ class Cron
/**
/**
* Logging instance
* Logging instance
*
* @var \Adyen\Payment\Logger\AdyenLogger
* @var \Adyen\Payment\Logger\AdyenLogger
*/
*/
protected
$_logger
;
protected
$_logger
;
...
@@ -296,6 +297,7 @@ class Cron
...
@@ -296,6 +297,7 @@ class Cron
/**
/**
* Process the notification
* Process the notification
*
* @return void
* @return void
*/
*/
public
function
processNotification
()
public
function
processNotification
()
...
@@ -452,7 +454,8 @@ class Cron
...
@@ -452,7 +454,8 @@ class Cron
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$this
->
_updateNotification
(
$notification
,
false
,
false
);
$this
->
_updateNotification
(
$notification
,
false
,
false
);
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
sprintf
(
"Notification %s had an error: %s
\n
%s"
,
$notification
->
getEntityId
(),
$e
->
getMessage
(),
$e
->
getTraceAsString
())
sprintf
(
"Notification %s had an error: %s
\n
%s"
,
$notification
->
getEntityId
(),
$e
->
getMessage
(),
$e
->
getTraceAsString
())
);
);
}
}
}
}
...
@@ -780,6 +783,7 @@ class Cron
...
@@ -780,6 +783,7 @@ class Cron
/**
/**
* retrieve last 4 digits of card from the reason field
* retrieve last 4 digits of card from the reason field
*
* @param $reason
* @param $reason
* @return string
* @return string
*/
*/
...
@@ -934,7 +938,7 @@ class Cron
...
@@ -934,7 +938,7 @@ class Cron
}
}
// Order is already Cancelled
// Order is already Cancelled
if
(
$this
->
_order
->
isCanceled
()){
if
(
$this
->
_order
->
isCanceled
())
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
"Order is already cancelled, skipping OFFER_CLOSED"
);
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
"Order is already cancelled, skipping OFFER_CLOSED"
);
break
;
break
;
}
}
...
@@ -1138,6 +1142,7 @@ class Cron
...
@@ -1138,6 +1142,7 @@ class Cron
/**
/**
* Not implemented
* Not implemented
*
* @return bool
* @return bool
*/
*/
protected
function
_refundOrder
()
protected
function
_refundOrder
()
...
@@ -1287,8 +1292,8 @@ class Cron
...
@@ -1287,8 +1292,8 @@ class Cron
}
}
/**
/**
* @throws Exception
* @return void
* @return void
* @throws Exception
*/
*/
protected
function
_prepareInvoice
()
protected
function
_prepareInvoice
()
{
{
...
@@ -1352,19 +1357,27 @@ class Cron
...
@@ -1352,19 +1357,27 @@ class Cron
$orderCurrencyCode
=
$this
->
_order
->
getOrderCurrencyCode
();
$orderCurrencyCode
=
$this
->
_order
->
getOrderCurrencyCode
();
$amount
=
$this
->
_adyenHelper
->
originalAmount
(
$this
->
_value
,
$orderCurrencyCode
);
$amount
=
$this
->
_adyenHelper
->
originalAmount
(
$this
->
_value
,
$orderCurrencyCode
);
// add to order payment
try
{
$date
=
new
\DateTime
();
// add to order payment
$this
->
_adyenOrderPaymentFactory
->
create
()
$date
=
new
\DateTime
();
->
setPspreference
(
$this
->
_pspReference
)
$this
->
_adyenOrderPaymentFactory
->
create
()
->
setMerchantReference
(
$this
->
_merchantReference
)
->
setPspreference
(
$this
->
_pspReference
)
->
setPaymentId
(
$paymentObj
->
getId
())
->
setMerchantReference
(
$this
->
_merchantReference
)
->
setPaymentMethod
(
$this
->
_paymentMethod
)
->
setPaymentId
(
$paymentObj
->
getId
())
->
setAmount
(
$amount
)
->
setPaymentMethod
(
$this
->
_paymentMethod
)
->
setTotalRefunded
(
0
)
->
setAmount
(
$amount
)
->
setCreatedAt
(
$date
)
->
setTotalRefunded
(
0
)
->
setUpdatedAt
(
$date
)
->
setCreatedAt
(
$date
)
->
save
();
->
setUpdatedAt
(
$date
)
->
save
();
}
catch
(
\Exception
$e
)
{
$this
->
_adyenLogger
->
addError
(
'While processing a notification an exception occured. The payment has already been saved in the '
.
'adyen_order_payment table but something went wrong later. Please check your logs for potential '
.
'error messages regarding the merchant reference (order id): "'
.
$this
->
_merchantReference
.
'" and PSP reference: "'
.
$this
->
_pspReference
.
'"'
);
}
if
(
$this
->
_isTotalAmount
(
$paymentObj
->
getEntityId
(),
$orderCurrencyCode
))
{
if
(
$this
->
_isTotalAmount
(
$paymentObj
->
getEntityId
(),
$orderCurrencyCode
))
{
$this
->
_createInvoice
();
$this
->
_createInvoice
();
...
@@ -1618,9 +1631,9 @@ class Cron
...
@@ -1618,9 +1631,9 @@ class Cron
}
}
/**
/**
* @throws Exception
* @throws \Magento\Framework\Exception\LocalizedException
* @return void
* @return void
* @throws \Magento\Framework\Exception\LocalizedException
* @throws Exception
*/
*/
protected
function
_createInvoice
()
protected
function
_createInvoice
()
{
{
...
...
SECURITY.md
0 → 100644
View file @
b1a0c576
# Reporting Security Issues
We welcome reports of possible vulnerabilities or issues as part of our responsible disclosure program. For more information go to
https://support.adyen.com/hc/en-us/articles/115001187330-How-do-I-report-a-possible-security-issue-to-Adyen-
view/frontend/web/js/view/payment/method-renderer/adyen-hpp-method.js
View file @
b1a0c576
...
@@ -43,7 +43,7 @@ define(
...
@@ -43,7 +43,7 @@ define(
var
paymentMethod
=
ko
.
observable
(
null
);
var
paymentMethod
=
ko
.
observable
(
null
);
var
messageComponents
;
var
messageComponents
;
var
shippingAddressCountryCode
=
quote
.
shippingAddress
().
countryId
;
var
shippingAddressCountryCode
=
quote
.
shippingAddress
().
countryId
;
var
unsupportedPaymentMethods
=
[
'
scheme
'
,
'
boleto
'
,
'
bcmc_mobile_QR
'
,
'
wechatpay
'
];
var
unsupportedPaymentMethods
=
[
'
scheme
'
,
'
boleto
'
,
'
bcmc_mobile_QR
'
,
'
wechatpay
'
,
'
bcmc
'
];
/**
/**
* Shareble adyen checkout component
* Shareble adyen checkout component
* @type {AdyenCheckout}
* @type {AdyenCheckout}
...
...
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