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
cfd948a2
Commit
cfd948a2
authored
Jan 09, 2019
by
Alessio Zampatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add try/catch on originKeys call, add error message for card methods on frontend and backend
parent
cee5877b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
1 deletion
+25
-1
Helper/Data.php
Helper/Data.php
+6
-1
view/adminhtml/templates/form/cc.phtml
view/adminhtml/templates/form/cc.phtml
+5
-0
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
...nd/web/js/view/payment/method-renderer/adyen-cc-method.js
+3
-0
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
.../js/view/payment/method-renderer/adyen-oneclick-method.js
+3
-0
view/frontend/web/template/payment/cc-form.html
view/frontend/web/template/payment/cc-form.html
+4
-0
view/frontend/web/template/payment/oneclick-form.html
view/frontend/web/template/payment/oneclick-form.html
+4
-0
No files found.
Helper/Data.php
View file @
cfd948a2
...
...
@@ -1395,7 +1395,12 @@ class Data extends AbstractHelper
$client
=
$this
->
initializeAdyenClient
(
$storeId
);
$service
=
$this
->
createAdyenCheckoutUtilityService
(
$client
);
$response
=
$service
->
originKeys
(
$params
);
try
{
$response
=
$service
->
originKeys
(
$params
);
}
catch
(
\Exception
$e
){
$this
->
adyenLogger
->
error
(
$e
->
getMessage
());
}
$originKey
=
""
;
...
...
view/adminhtml/templates/form/cc.phtml
View file @
cfd948a2
...
...
@@ -33,6 +33,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
<fieldset
class=
"admin__fieldset payment-method"
id=
"payment_form_
<?php
/* @noEscape */
echo
$code
;
?>
"
style=
"display:none"
>
<span
id=
"noApiKey"
class=
"message message-error error"
style=
"visibility: hidden"
>
<?php
echo
$block
->
escapeHtml
(
__
(
'Please configure an API Key in your Adyen Required Settings'
));
?>
</span>
<div
class=
"field admin__field"
>
<label
for=
"
<?php
/* @noEscape */
echo
$code
;
?>
_cc_owner"
>
...
...
@@ -96,6 +97,10 @@ echo $code; ?>" style="display:none">
*/
var
secureFieldsInitialize
=
function
()
{
if
(
!
"
<?php
echo
$block
->
getCheckoutOriginKeys
();
?>
"
)
{
document
.
getElementById
(
'
noApiKey
'
).
style
=
"
visibility: visible; display:inline-block
"
;
return
;
}
var
cardNode
=
document
.
getElementById
(
"
cardContainer-
<?php
/* @noEscape */
echo
$code
;
?>
"
);
var
checkout
=
new
AdyenCheckout
({
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-cc-method.js
View file @
cfd948a2
...
...
@@ -71,6 +71,9 @@ define(
renderSecureFields
:
function
()
{
var
self
=
this
;
self
.
placeOrderAllowed
(
false
);
if
(
!
self
.
getOriginKey
())
{
return
;
}
installments
.
setInstallments
(
0
);
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
View file @
cfd948a2
...
...
@@ -206,6 +206,9 @@ define(
renderSecureCVC
:
function
()
{
var
self
=
this
;
if
(
!
self
.
getOriginKey
())
{
return
;
}
var
oneClickCardNode
=
document
.
getElementById
(
'
cvcContainer-
'
+
self
.
value
);
var
checkout
=
new
AdyenCheckout
({
...
...
view/frontend/web/template/payment/cc-form.html
View file @
cfd948a2
...
...
@@ -39,6 +39,10 @@
<div
class=
"payment-method-content"
>
<!-- ko ifnot: (getOriginKey()) -->
<span
class=
"message message-error error"
>
<!-- ko text: $t('Please configure an API Key in your Adyen Required Settings')--><!-- /ko -->
</span>
<!--/ko-->
<div
class=
"payment-method-billing-address"
>
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
...
...
view/frontend/web/template/payment/oneclick-form.html
View file @
cfd948a2
...
...
@@ -45,6 +45,10 @@
</div>
<div
class=
"payment-method-content"
>
<!-- ko ifnot: (getOriginKey()) -->
<span
class=
"message message-error error"
>
<!-- ko text: $t('Please configure an API Key in your Adyen Required Settings')--><!-- /ko -->
</span>
<!--/ko-->
<!-- ko foreach: $parent.getRegion(getMessageName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
...
...
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