We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 7025e6c6 authored by Attila Kiss's avatar Attila Kiss Committed by GitHub

Merge pull request #725 from Adyen/PW-2422

[PW-2422] Add validation of the billing/shipping address in the payment forms
parents f8204fbb 44f51491
...@@ -78,6 +78,7 @@ define( ...@@ -78,6 +78,7 @@ define(
var isValid = ko.observable(false); var isValid = ko.observable(false);
return Component.extend({ return Component.extend({
isPlaceOrderActionAllowed: ko.observable(quote.billingAddress() != null),
defaults: { defaults: {
template: 'Adyen_Payment/payment/oneclick-form', template: 'Adyen_Payment/payment/oneclick-form',
recurringDetailReference: '', recurringDetailReference: '',
...@@ -195,7 +196,7 @@ define( ...@@ -195,7 +196,7 @@ define(
isButtonActive: function () { isButtonActive: function () {
return self.isActive() && this.getCode() == self.isChecked() && self.isBillingAgreementChecked() && this.placeOrderAllowed(); return self.isActive() && this.getCode() == self.isChecked() && self.isBillingAgreementChecked() && this.placeOrderAllowed() && self.isPlaceOrderActionAllowed();
}, },
/** /**
* Custom place order function * Custom place order function
...@@ -528,7 +529,6 @@ define( ...@@ -528,7 +529,6 @@ define(
if (quote.paymentMethod().method == paymentMethod()) { if (quote.paymentMethod().method == paymentMethod()) {
return recurringDetailReference(); return recurringDetailReference();
} }
return null; return null;
}), }),
placeOrderHandler: null, placeOrderHandler: null,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment