Skip to content

Commit ddbdfff

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-52660
2 parents b45b3cb + 152dbdc commit ddbdfff

File tree

19 files changed

+75
-43
lines changed

19 files changed

+75
-43
lines changed

app/code/Magento/Braintree/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</requires>
3434
</field>
3535
<field id="braintree_cc_vault_active" translate="label" type="select" sortOrder="12" showInDefault="1" showInWebsite="1" showInStore="0">
36-
<label>Vault enabled</label>
36+
<label>Vault Enabled</label>
3737
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
3838
<config_path>payment/braintree_cc_vault/active</config_path>
3939
<requires>
@@ -155,7 +155,7 @@
155155
<comment>It is recommended to set this value to "PayPal" per store views.</comment>
156156
</field>
157157
<field id="braintree_paypal_vault_active" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="0">
158-
<label>Vault enabled</label>
158+
<label>Vault Enabled</label>
159159
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
160160
<config_path>payment/braintree_paypal_vault/active</config_path>
161161
<requires>

app/code/Magento/Braintree/view/adminhtml/web/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
.braintree-section .heading {display: inline-block; background: url("images/braintree_logo.png") no-repeat 0 50% / 18rem auto; padding-left: 20rem;}
7-
.braintree-section .button-container {display: inline-block; float: right;}
6+
.braintree-section .heading {background: url("images/braintree_logo.png") no-repeat 0 50% / 18rem auto; padding-left: 20rem;}
7+
.braintree-section .button-container {float: right;}
88
.braintree-section .config-alt {background: url("images/braintree_allinone.png") no-repeat scroll 0 0 / 100% auto; height: 28px; margin: 0.5rem 0 0; width: 230px;}

app/code/Magento/Payment/view/frontend/web/js/view/payment/iframe.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ define(
154154
*/
155155
clearTimeout: function () {
156156
clearTimeout(this.timeoutId);
157+
this.fail();
157158

158159
return this;
159160
},

app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,10 @@ protected function _isPaymentEnabled($element)
7878
*/
7979
protected function _getHeaderTitleHtml($element)
8080
{
81-
$html = '<div class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
81+
$html = '<div class="config-heading" >';
8282

8383
$groupConfig = $element->getGroup();
8484

85-
$html .= '</strong>';
86-
87-
if ($element->getComment()) {
88-
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
89-
}
90-
$html .= '<div class="config-alt"></div>';
91-
$html .= '</div>';
92-
9385
$disabledAttributeString = $this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"';
9486
$disabledClassString = $this->_isPaymentEnabled($element) ? '' : ' disabled';
9587
$htmlId = $element->getHtmlId();
@@ -122,6 +114,13 @@ protected function _getHeaderTitleHtml($element)
122114
) . '</a>';
123115
}
124116

117+
$html .= '</div>';
118+
$html .= '<div class="heading"><strong>' . $element->getLegend() . '</strong>';
119+
120+
if ($element->getComment()) {
121+
$html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
122+
}
123+
$html .= '<div class="config-alt"></div>';
125124
$html .= '</div></div>';
126125

127126
return $html;

app/code/Magento/Paypal/Model/Config.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,9 @@ public function isOrderReviewStepDisabled()
866866
*/
867867
public function getExpressCheckoutStartUrl($token)
868868
{
869-
return $this->getPaypalUrl(['cmd' => '_express-checkout', 'token' => $token]);
869+
return sprintf('https://www.%spaypal.com/checkoutnow/2%s',
870+
$this->getValue('sandboxFlag') ? 'sandbox.' : '',
871+
'?token=' . urlencode($token));
870872
}
871873

872874
/**

app/code/Magento/Paypal/Model/Express.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -672,19 +672,13 @@ public function assignData(\Magento\Framework\DataObject $data)
672672

673673
$additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);
674674

675-
if (
676-
!is_array($additionalData)
677-
|| !isset($additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT])
678-
) {
675+
if (!is_array($additionalData)) {
679676
return $this;
680677
}
681678

682-
$this->getInfoInstance()
683-
->setAdditionalInformation(
684-
ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT,
685-
$additionalData[ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT]
686-
);
687-
679+
foreach ($additionalData as $key => $value) {
680+
$this->getInfoInstance()->setAdditionalInformation($key, $value);
681+
}
688682
return $this;
689683
}
690684

app/code/Magento/Paypal/Model/Payflow/Transparent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ public function authorize(InfoInterface $payment, $amount)
166166
$request->setData('trxtype', self::TRXTYPE_AUTH_ONLY);
167167
$request->setData('origid', $token);
168168
$request->setData('amt', $this->formatPrice($amount));
169+
$request->setData('currency', $order->getBaseCurrencyCode());
170+
$request->setData('taxamt', $this->formatPrice($order->getBaseTaxAmount()));
171+
$request->setData('freightamt', $this->formatPrice($order->getBaseShippingAmount()));
169172

170173
$response = $this->postRequest($request, $this->getConfig());
171174
$this->processErrors($response);

app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ public function testAssignData()
182182
$data = new DataObject(
183183
[
184184
PaymentInterface::KEY_ADDITIONAL_DATA => [
185-
Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT => $transportValue
185+
Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT => $transportValue,
186+
Express\Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID => $transportValue,
187+
Express\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN => $transportValue
186188
]
187189
]
188190
);
@@ -202,11 +204,12 @@ public function testAssignData()
202204

203205
$this->parentAssignDataExpectation($data);
204206

205-
$paymentInfo->expects(static::once())
207+
$paymentInfo->expects(static::exactly(3))
206208
->method('setAdditionalInformation')
207-
->with(
208-
Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT,
209-
$transportValue
209+
->withConsecutive(
210+
[Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT, $transportValue],
211+
[Express\Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID, $transportValue],
212+
[Express\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN, $transportValue]
210213
);
211214

212215
$this->_model->assignData($data);

app/code/Magento/Paypal/Test/Unit/Model/Payflow/TransparentTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function initializationAuthorizeMock()
122122
$this->orderMock = $this->getMockBuilder(\Magento\Sales\Model\Order::class)
123123
->setMethods([
124124
'getCustomerId', 'getBillingAddress', 'getShippingAddress', 'getCustomerEmail',
125-
'getId', 'getIncrementId'
125+
'getId', 'getIncrementId', 'getBaseCurrencyCode'
126126
])
127127
->disableOriginalConstructor()
128128
->getMock();
@@ -164,6 +164,9 @@ protected function buildRequestData()
164164
$this->paymentMock->expects($this->once())
165165
->method('getOrder')
166166
->willReturn($this->orderMock);
167+
$this->orderMock->expects($this->once())
168+
->method('getBaseCurrencyCode')
169+
->willReturn('USD');
167170
$this->orderMock->expects($this->once())
168171
->method('getBillingAddress')
169172
->willReturn($this->addressBillingMock);

app/code/Magento/Paypal/etc/adminhtml/system/paypal_payflowpro.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
</requires>
8585
</field>
8686
<field id="payflowpro_cc_vault_active" translate="label" type="select" sortOrder="22" showInDefault="1" showInWebsite="1" showInStore="0">
87-
<label>Vault enabled</label>
87+
<label>Vault Enabled</label>
8888
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
8989
<config_path>payment/payflowpro_cc_vault/active</config_path>
9090
<attribute type="shared">1</attribute>

0 commit comments

Comments
 (0)