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
0b4a91f1
Commit
0b4a91f1
authored
Aug 23, 2017
by
Aleffio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PW-243: Code optimization
parent
326ff29d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
Model/Cron.php
Model/Cron.php
+2
-3
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
.../js/view/payment/method-renderer/adyen-oneclick-method.js
+7
-5
view/frontend/web/template/payment/oneclick-form.html
view/frontend/web/template/payment/oneclick-form.html
+1
-1
No files found.
Model/Cron.php
View file @
0b4a91f1
...
...
@@ -834,19 +834,17 @@ class Cron
$updateBillingAgreement
->
setStatus
(
\Adyen\Payment\Model\Billing\Agreement
::
STATUS_CANCELED
);
$updateBillingAgreement
->
save
();
}
else
{
$updateBillingAgreement
->
setStatus
(
\Adyen\Payment\Model\Billing\Agreement
::
STATUS_ACTIVE
);
$updateBillingAgreement
->
save
();
}
$updateBillingAgreement
->
save
();
}
// Get or create billing agreement
$billingAgreement
=
$this
->
_billingAgreementFactory
->
create
();
$billingAgreement
->
load
(
$recurringDetailReference
,
'reference_id'
);
$message
=
__
(
'Updated billing agreement #%1.'
,
$recurringDetailReference
);
// check if BA exists
if
(
!
(
$billingAgreement
&&
$billingAgreement
->
getAgreementId
()
>
0
&&
$billingAgreement
->
isValid
()))
{
// create new
...
...
@@ -866,6 +864,7 @@ class Cron
else
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
"Using existing Billing Agreement"
);
$billingAgreement
->
setIsObjectChanged
(
true
);
$message
=
__
(
'Updated billing agreement #%1.'
,
$recurringDetailReference
);
}
// Populate billing agreement data
...
...
view/frontend/web/js/view/payment/method-renderer/adyen-oneclick-method.js
View file @
0b4a91f1
...
...
@@ -101,7 +101,7 @@ define(
generationtime
:
generationtime
};
if
(
updatedExpiryDate
||
window
.
checkoutConfig
.
payment
.
adyenOneclick
.
hasCustomerInteraction
){
if
(
updatedExpiryDate
||
self
.
hasVerification
()
){
var
options
=
{
enableValidations
:
false
};
var
cse_key
=
this
.
getCSEKey
();
...
...
@@ -185,6 +185,9 @@ define(
getGenerationTime
:
function
()
{
return
window
.
checkoutConfig
.
payment
.
adyenCc
.
generationTime
;
},
hasVerification
:
function
()
{
return
window
.
checkoutConfig
.
payment
.
adyenOneclick
.
hasCustomerInteraction
;
},
validate
:
function
()
{
var
code
=
self
.
item
.
method
;
...
...
@@ -203,7 +206,7 @@ define(
// only check if recurring type is set to oneclick
var
cid
=
true
;
if
(
self
.
hasVerification
())
{
if
(
this
.
hasVerification
())
{
var
cid
=
Boolean
(
$
(
form
+
'
#
'
+
codeValue
+
'
_cc_cid
'
).
valid
());
}
}
else
{
...
...
@@ -230,6 +233,8 @@ define(
},
selectBillingAgreement
:
function
()
{
var
self
=
this
;
self
.
expiry
(
false
);
updatedExpiryDate
=
false
;
// set payment method data
var
data
=
{
...
...
@@ -262,9 +267,6 @@ define(
}
return
null
;
}),
hasVerification
:
function
()
{
return
window
.
checkoutConfig
.
payment
.
adyenOneclick
.
hasCustomerInteraction
;
},
getPlaceOrderUrl
:
function
()
{
return
window
.
checkoutConfig
.
payment
.
iframe
.
placeOrderUrl
[
this
.
getCode
()];
}
...
...
view/frontend/web/template/payment/oneclick-form.html
View file @
0b4a91f1
...
...
@@ -131,7 +131,7 @@
</div>
<!-- ko if:
($parent.hasVerification()
)-->
<!-- ko if:
hasVerification(
)-->
<div
class=
"field cvv required"
data-bind=
"attr: {id: getCode() + '_' + value + '_cc_type_cvv_div'}"
>
<label
data-bind=
"attr: {for: getCode() + '_' + value + '_cc_cid'}"
class=
"label"
>
<span>
<!-- ko text: $t('Card Verification Number')--><!-- /ko -->
</span>
...
...
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