Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<resource>BlueFinch_Checkout::config</resource>
<group id="general" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<comment>
<![CDATA[Version: 1.3.0<br>BlueFinch Checkout Provided By <a href="http://bluefinchcommerce.com/" target="_blank">BlueFinch Commerce</a>]]>
<![CDATA[Version: 1.3.2<br>BlueFinch Checkout Provided By <a href="http://bluefinchcommerce.com/" target="_blank">BlueFinch Commerce</a>]]>
</comment>
<label>General</label>
<field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/web/js/checkout/dist/main.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/braintree-web-drop-in/dist/browser/dropin.js b/node_modules/braintree-web-drop-in/dist/browser/dropin.js
index 3620025..e46fc54 100644
index 3620025..fc59ad7 100644
--- a/node_modules/braintree-web-drop-in/dist/browser/dropin.js
+++ b/node_modules/braintree-web-drop-in/dist/browser/dropin.js
@@ -23853,6 +23853,12 @@ BasePayPalView.prototype.initialize = function () {
Expand All @@ -15,7 +15,38 @@ index 3620025..e46fc54 100644
var checkoutJSConfiguration;
var buttonSelector = '[data-braintree-id="paypal-button"]';
var environment = self.client.getConfiguration().gatewayConfiguration.environment === 'production' ? 'production' : 'sandbox';
@@ -23898,7 +23904,7 @@ BasePayPalView.prototype.initialize = function () {
@@ -23868,6 +23874,30 @@ BasePayPalView.prototype.initialize = function () {
payment: function () {
return paypalInstance.createPayment(self.paypalConfiguration).catch(reportError);
},
+ createOrder: function (data, actions) {
+ return actions.order.create({
+ purchase_units: [{
+ "amount": {
+ "currency_code": self.paypalConfiguration.sdkConfig.currency,
+ "value": self.paypalConfiguration.amount
+ }
+ }]
+ });
+ },
+ onApprove: (data) => {
+ return paypalInstance.tokenizePayment(data).then(function (tokenizePayload) {
+ var shouldNotVault = self.paypalConfiguration.vault && self.paypalConfiguration.vault.vaultPayPal === false;
+
+ if (shouldNotVault) {
+ data.vault = false;
+ }
+
+ if (!shouldNotVault && self.paypalConfiguration.flow === 'vault' && !self.model.isGuestCheckout) {
+ tokenizePayload.vaulted = true;
+ }
+ self.model.addPaymentMethod(tokenizePayload);
+ }).catch(reportError);
+ },
onAuthorize: function (data) {
// NEXT_MAJOR_VERSION change out this vaultPayPal property
// to something more generic, such as vaultOnTokenization so
@@ -23898,7 +23928,7 @@ BasePayPalView.prototype.initialize = function () {
};

Object.keys(global.paypal.FUNDING).forEach(function (key) {
Expand All @@ -24,7 +55,7 @@ index 3620025..e46fc54 100644
return;
}
checkoutJSConfiguration.funding.disallowed.push(global.paypal.FUNDING[key]);
@@ -23913,11 +23919,15 @@ BasePayPalView.prototype.initialize = function () {
@@ -23913,11 +23943,15 @@ BasePayPalView.prototype.initialize = function () {

buttonSelector = dropinWrapperId + ' ' + buttonSelector;

Expand All @@ -45,7 +76,7 @@ index 3620025..e46fc54 100644
}).catch(reportError);

function reportError(err) {
@@ -23959,31 +23969,7 @@ BasePayPalView.isEnabled = function (options) {
@@ -23959,31 +23993,7 @@ BasePayPalView.isEnabled = function (options) {
return Promise.resolve(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,52 +251,10 @@ export default {
}

if (this.paypal.creditActive) {
if (this.paypalCreditThresholdEnabled) {
if (total >= Number(this.paypalCreditThresholdValue)) {
options.paypalCredit = {
flow: 'checkout',
amount: total,
currency: this.currencyCode,
buttonStyle: {
color: this.paypal.creditColor !== 'gold'
&& this.paypal.creditColor !== 'blue'
&& this.paypal.creditColor !== 'silver'
? this.paypal.creditColor : 'darkblue',
label: this.paypal.creditLabel,
shape: this.paypal.creditShape,
size: 'responsive',
},
commit: true,
sdkConfig: {
currency: this.currencyCode,
dataAttributes: {
'csp-nonce': window.cspNonce,
},
},
};
}
if (this.paypalCreditThresholdEnabled && total >= Number(this.paypalCreditThresholdValue)) {
options.paypal.sdkConfig['enable-funding'] = 'credit';
} else {
options.paypalCredit = {
flow: 'checkout',
amount: total,
currency: this.currencyCode,
buttonStyle: {
color: this.paypal.creditColor !== 'gold'
&& this.paypal.creditColor !== 'blue'
&& this.paypal.creditColor !== 'silver'
? this.paypal.creditColor : 'darkblue',
label: this.paypal.creditLabel,
shape: this.paypal.creditShape,
size: 'responsive',
},
commit: true,
sdkConfig: {
currency: this.currencyCode,
dataAttributes: {
'csp-nonce': window.cspNonce,
},
},
};
options.paypal.sdkConfig['enable-funding'] = 'credit';
}
}
}
Expand Down