@@ -136,7 +136,7 @@ extension StripeSdkImpl {
136136 configuration. paymentMethodLayout = . automatic
137137 }
138138
139- configuration. cardBrandAcceptance = computeCardBrandAcceptance ( params: params)
139+ configuration. cardBrandAcceptance = StripeSdkImpl . computeCardBrandAcceptance ( params: params)
140140
141141 // Parse custom payment method configuration
142142 if let customPaymentMethodConfig = params [ " customPaymentMethodConfiguration " ] as? [ String : Any ] {
@@ -229,7 +229,7 @@ extension StripeSdkImpl {
229229 modeParams: modeParams,
230230 paymentMethodTypes: intentConfiguration [ " paymentMethodTypes " ] as? [ String ] ,
231231 onBehalfOf: intentConfiguration [ " onBehalfOf " ] as? String ,
232- captureMethod: mapCaptureMethod ( captureMethodString) ,
232+ captureMethod: StripeSdkImpl . mapCaptureMethod ( captureMethodString) ,
233233 useConfirmationTokenCallback: hasConfirmationTokenHandler
234234 )
235235
@@ -247,7 +247,7 @@ extension StripeSdkImpl {
247247 }
248248 }
249249
250- internal func computeCardBrandAcceptance( params: NSDictionary ) -> PaymentSheet . CardBrandAcceptance {
250+ internal static func computeCardBrandAcceptance( params: NSDictionary ) -> PaymentSheet . CardBrandAcceptance {
251251 if let cardBrandAcceptanceParams = params [ " cardBrandAcceptance " ] as? NSDictionary {
252252 if let filter = cardBrandAcceptanceParams [ " filter " ] as? String {
253253 switch filter {
@@ -272,7 +272,7 @@ extension StripeSdkImpl {
272272 return . all
273273 }
274274
275- private func mapToCardBrandCategory( brand: String ) -> PaymentSheet . CardBrandAcceptance . BrandCategory ? {
275+ private static func mapToCardBrandCategory( brand: String ) -> PaymentSheet . CardBrandAcceptance . BrandCategory ? {
276276 switch brand {
277277 case " visa " :
278278 return . visa
@@ -287,7 +287,7 @@ extension StripeSdkImpl {
287287 }
288288 }
289289
290- func mapCaptureMethod( _ captureMethod: String ? ) -> PaymentSheet . IntentConfiguration . CaptureMethod {
290+ static func mapCaptureMethod( _ captureMethod: String ? ) -> PaymentSheet . IntentConfiguration . CaptureMethod {
291291 if let captureMethod = captureMethod {
292292 switch captureMethod {
293293 case " Automatic " : return PaymentSheet . IntentConfiguration. CaptureMethod. automatic
@@ -311,9 +311,9 @@ extension StripeSdkImpl {
311311 mode = PaymentSheet . IntentConfiguration. Mode. payment (
312312 amount: amount,
313313 currency: modeParams [ " currencyCode " ] as? String ?? " " ,
314- setupFutureUsage: setupFutureUsageFromString ( from: modeParams [ " setupFutureUsage " ] as? String ?? " " ) ,
314+ setupFutureUsage: StripeSdkImpl . setupFutureUsageFromString ( from: modeParams [ " setupFutureUsage " ] as? String ?? " " ) ,
315315 captureMethod: captureMethod,
316- paymentMethodOptions: buildPaymentMethodOptions ( paymentMethodOptionsParams: modeParams [ " paymentMethodOptions " ] as? NSDictionary ?? [ : ] )
316+ paymentMethodOptions: StripeSdkImpl . buildPaymentMethodOptions ( paymentMethodOptionsParams: modeParams [ " paymentMethodOptions " ] as? NSDictionary ?? [ : ] )
317317 )
318318 } else {
319319 mode = PaymentSheet . IntentConfiguration. Mode. setup (
@@ -357,33 +357,33 @@ extension StripeSdkImpl {
357357 }
358358 }
359359
360- func buildPaymentMethodOptions( paymentMethodOptionsParams: NSDictionary ) -> PaymentSheet . IntentConfiguration . Mode . PaymentMethodOptions ? {
360+ static func buildPaymentMethodOptions( paymentMethodOptionsParams: NSDictionary ) -> PaymentSheet . IntentConfiguration . Mode . PaymentMethodOptions ? {
361361 if let sfuDictionary = paymentMethodOptionsParams [ " setupFutureUsageValues " ] as? NSDictionary {
362362 var setupFutureUsageValues : [ STPPaymentMethodType : PaymentSheet . IntentConfiguration . SetupFutureUsage ] = [ : ]
363-
363+
364364 for (paymentMethodCode, sfuValue) in sfuDictionary {
365365 if let paymentMethodCode = paymentMethodCode as? String ,
366366 let sfuString = sfuValue as? String {
367367 let setupFutureUsage = setupFutureUsageFromString ( from: sfuString)
368368 let paymentMethodType = STPPaymentMethodType . fromIdentifier ( paymentMethodCode)
369-
369+
370370 if let setupFutureUsage = setupFutureUsage {
371371 if paymentMethodType != . unknown {
372372 setupFutureUsageValues [ paymentMethodType] = setupFutureUsage
373373 }
374374 }
375375 }
376376 }
377-
377+
378378 if !setupFutureUsageValues. isEmpty {
379379 return PaymentSheet . IntentConfiguration. Mode. PaymentMethodOptions ( setupFutureUsageValues: setupFutureUsageValues)
380380 }
381381 }
382382
383383 return nil
384384 }
385-
386- func setupFutureUsageFromString( from string: String ) -> PaymentSheet . IntentConfiguration . SetupFutureUsage ? {
385+
386+ static func setupFutureUsageFromString( from string: String ) -> PaymentSheet . IntentConfiguration . SetupFutureUsage ? {
387387 switch string {
388388 case " OnSession " :
389389 return PaymentSheet . IntentConfiguration. SetupFutureUsage. onSession
0 commit comments