Skip to content

Commit fa8a2bf

Browse files
author
Oleksii Korshenko
authored
Merge pull request #360 from magento-mpi/MPI-PR-2.1
Fixed issues: - MAGETWO-57460: [Backport] - Exception occurs when tracking shipment with invalid FedEx tracking number - for 2.1.x - MAGETWO-57097: [Backport] Issue with fetching shipping charges based on city for 2.1.x - MAGETWO-56952: [Backport] Issue with get active payment methods (getActiveMethods) for 2.1.x - MAGETWO-56940: [Backport] Kount and 3D Secure doesn't work for Braintree Vault for 2.1.x
2 parents 86e5124 + 2349f40 commit fa8a2bf

File tree

14 files changed

+1938
-577
lines changed

14 files changed

+1938
-577
lines changed

app/code/Magento/Braintree/view/frontend/web/js/view/payment/adapter.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ define([
7676
globalMessageList.addErrorMessage({
7777
message: errorMessage
7878
});
79-
}
79+
},
80+
81+
/**
82+
* May be triggered on Braintree SDK setup
83+
*/
84+
onReady: function () {}
8085
};
8186
});

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ define(
6868
*/
6969
onReady: function (checkout) {
7070
braintree.checkout = checkout;
71+
braintree.onReady();
7172
},
7273

7374
/**
@@ -198,6 +199,7 @@ define(
198199
onReady: function (checkout) {
199200
braintree.checkout = checkout;
200201
this.additionalData['device_data'] = checkout.deviceData;
202+
braintree.onReady();
201203
}
202204
};
203205

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/paypal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ define([
3636
onReady: function (checkout) {
3737
Braintree.checkout = checkout;
3838
this.enableButton();
39+
Braintree.onReady();
3940
},
4041

4142
/**

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/vault.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ define([
88
'jquery',
99
'Magento_Braintree/js/view/payment/method-renderer/cc-form',
1010
'Magento_Vault/js/view/payment/method-renderer/vault',
11+
'Magento_Braintree/js/view/payment/adapter',
1112
'Magento_Ui/js/model/messageList',
1213
'Magento_Checkout/js/model/full-screen-loader'
13-
], function ($, Component, VaultComponent, globalMessageList, fullScreenLoader) {
14+
], function ($, Component, VaultComponent, Braintree, globalMessageList, fullScreenLoader) {
1415
'use strict';
1516

1617
return VaultComponent.extend({
@@ -49,7 +50,17 @@ define([
4950
* Place order
5051
*/
5152
placeOrder: function () {
52-
this.getPaymentMethodNonce();
53+
var self = this;
54+
55+
/**
56+
* Define on ready callback
57+
*/
58+
Braintree.onReady = function () {
59+
self.getPaymentMethodNonce();
60+
};
61+
self.hostedFields(function (formComponent) {
62+
formComponent.initBraintree();
63+
});
5364
},
5465

5566
/**

app/code/Magento/Dhl/view/frontend/web/js/model/shipping-rates-validation-rules.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ define(
1616
},
1717
'country_id': {
1818
'required': true
19+
},
20+
'city': {
21+
'required': true
1922
}
2023
};
2124
}

0 commit comments

Comments
 (0)