@@ -251,52 +251,10 @@ export default {
251251 }
252252
253253 if (this .paypal .creditActive ) {
254- if (this .paypalCreditThresholdEnabled ) {
255- if (total >= Number (this .paypalCreditThresholdValue )) {
256- options .paypalCredit = {
257- flow: ' checkout' ,
258- amount: total,
259- currency: this .currencyCode ,
260- buttonStyle: {
261- color: this .paypal .creditColor !== ' gold'
262- && this .paypal .creditColor !== ' blue'
263- && this .paypal .creditColor !== ' silver'
264- ? this .paypal .creditColor : ' darkblue' ,
265- label: this .paypal .creditLabel ,
266- shape: this .paypal .creditShape ,
267- size: ' responsive' ,
268- },
269- commit: true ,
270- sdkConfig: {
271- currency: this .currencyCode ,
272- dataAttributes: {
273- ' csp-nonce' : window .cspNonce ,
274- },
275- },
276- };
277- }
254+ if (this .paypalCreditThresholdEnabled && total >= Number (this .paypalCreditThresholdValue )) {
255+ options .paypal .sdkConfig [' enable-funding' ] = ' credit' ;
278256 } else {
279- options .paypalCredit = {
280- flow: ' checkout' ,
281- amount: total,
282- currency: this .currencyCode ,
283- buttonStyle: {
284- color: this .paypal .creditColor !== ' gold'
285- && this .paypal .creditColor !== ' blue'
286- && this .paypal .creditColor !== ' silver'
287- ? this .paypal .creditColor : ' darkblue' ,
288- label: this .paypal .creditLabel ,
289- shape: this .paypal .creditShape ,
290- size: ' responsive' ,
291- },
292- commit: true ,
293- sdkConfig: {
294- currency: this .currencyCode ,
295- dataAttributes: {
296- ' csp-nonce' : window .cspNonce ,
297- },
298- },
299- };
257+ options .paypal .sdkConfig [' enable-funding' ] = ' credit' ;
300258 }
301259 }
302260 }
0 commit comments