Skip to content

Commit

Permalink
fix: use STPAPIClient.shared otherwise stuff breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecruzan-stripe committed Apr 11, 2022
1 parent a7683cc commit fdba790
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ios/StripeSdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
let url = RCTConvert.nsString(appInfo["url"]) ?? ""

self.merchantIdentifier = merchantIdentifier

self.apiClient = STPAPIClient.init(publishableKey: publishableKey)
self.apiClient?.stripeAccount = stripeAccountId
self.apiClient?.appInfo = STPAppInfo(name: name, partnerId: partnerId, version: version, url: url)

STPAPIClient.shared.publishableKey = publishableKey
STPAPIClient.shared.stripeAccount = stripeAccountId
STPAPIClient.shared.appInfo = STPAppInfo(name: name, partnerId: partnerId, version: version, url: url)
self.apiClient = STPAPIClient.shared

self.paymentHandler = STPPaymentHandler.shared()
self.paymentHandler?.apiClient = self.apiClient!
Expand Down

0 comments on commit fdba790

Please sign in to comment.