Skip to content

Commit 9104a45

Browse files
YevSentisitnikov
authored andcommitted
MAGETWO-54721: Not possible to use Braintree as a payment method when reward points or store credit has been applied to an order
- Removed useless isSingleUse() method
1 parent fbb3710 commit 9104a45

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

app/code/Magento/Braintree/Model/Ui/ConfigProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public function getConfig()
7979
'payment' => [
8080
self::CODE => [
8181
'isActive' => $this->config->isActive(),
82-
'isSingleUse' => !$isPayPalActive,
8382
'clientToken' => $this->getClientToken(),
8483
'ccTypesMapper' => $this->config->getCctypesMapper(),
8584
'sdkUrl' => $this->config->getSdkUrl(),

app/code/Magento/Braintree/Test/Unit/Model/Ui/ConfigProviderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ public function getConfigDataProvider()
154154
'payment' => [
155155
ConfigProvider::CODE => [
156156
'isActive' => true,
157-
'isSingleUse' => false,
158157
'clientToken' => self::CLIENT_TOKEN,
159158
'ccTypesMapper' => ['visa' => 'VI', 'american-express' => 'AE'],
160159
'sdkUrl' => self::SDK_URL,

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ define(
133133
* @param {Boolean} isActive
134134
*/
135135
onActiveChange: function (isActive) {
136-
if (!isActive || this.isSingleUse()) {
136+
if (!isActive) {
137137
return;
138138
}
139139

@@ -318,14 +318,6 @@ define(
318318
});
319319

320320
return false;
321-
},
322-
323-
/**
324-
* Check if Braintree configured without PayPal
325-
* @returns {Boolean}
326-
*/
327-
isSingleUse: function () {
328-
return window.checkoutConfig.payment[this.getCode()].isSingleUse;
329321
}
330322
});
331323
}

0 commit comments

Comments
 (0)