Skip to content

Commit b3695fb

Browse files
author
Yu Tang
committed
Merge remote-tracking branch 'origin/FearlessKiwis-MAGETWO-44708-Shipping-Address-is-not-passed-to-Braintree-if-Shipping-Address' into FearlessKiwis-develop-no-refactoring
2 parents b712f09 + db78184 commit b3695fb

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

app/code/Magento/Braintree/Model/PaymentMethod.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ protected function populateAuthorizeRequest(InfoInterface $payment, $token)
409409
if ($token) {
410410
$transactionParams['paymentMethodToken'] = $token;
411411
$transactionParams['customerId'] = $customerId;
412+
$transactionParams['billing'] = $this->toBraintreeAddress($billing);
413+
$transactionParams['shipping'] = $this->toBraintreeAddress($shipping);
412414
} elseif ($this->getInfoInstance()->getAdditionalInformation('payment_method_nonce')) {
413415
$transactionParams['paymentMethodNonce'] =
414416
$this->getInfoInstance()->getAdditionalInformation('payment_method_nonce');

app/code/Magento/Braintree/Test/Unit/Model/PaymentMethodTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,6 @@ public function authorizeDataProvider()
13611361
'merchantAccountId' => self::MERCHANT_ACCOUNT_ID,
13621362
'paymentMethodToken' => self::CC_TOKEN,
13631363
'customerId' => self::CUSTOMER_ID,
1364-
'billing' => null,
1365-
'shipping' => null,
13661364
'deviceData' => 'fraud_detection_data',
13671365
],
13681366
'braintree_response' => [
@@ -1429,8 +1427,6 @@ public function authorizeDataProvider()
14291427
'merchantAccountId' => self::MERCHANT_ACCOUNT_ID,
14301428
'paymentMethodNonce' => self::PAYMENT_METHOD_NONCE,
14311429
'customerId' => self::CUSTOMER_ID,
1432-
'billing' => null,
1433-
'shipping' => null,
14341430
'deviceData' => 'fraud_detection_data',
14351431
'options' => [
14361432
'three_d_secure' => [
@@ -1502,8 +1498,6 @@ public function authorizeDataProvider()
15021498
'merchantAccountId' => self::MERCHANT_ACCOUNT_ID,
15031499
'paymentMethodToken' => self::CC_TOKEN,
15041500
'customerId' => self::CUSTOMER_ID,
1505-
'billing' => null,
1506-
'shipping' => null,
15071501
'deviceData' => 'fraud_detection_data',
15081502
],
15091503
'braintree_response' => [

0 commit comments

Comments
 (0)