Skip to content

Commit 6c695ad

Browse files
One fix for Android, one check for com.android.application and one iOS fix (#1942)
* Fix border radius handling, see flutter-stripe/flutter_stripe#1933 * throw warning when incompatible com.android.application plugin is used see flutter-stripe/flutter_stripe#1909 * throw warning when incompatible com.android.application plugin is used see flutter-stripe/flutter_stripe#1909 * remove unnecessary println * Fix iOS issue from flutter-stripe/flutter_stripe#1928
1 parent 5a0783e commit 6c695ad

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/stripe_android/android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,11 @@ dependencies {
6565
// Users need to declare this dependency on their own, otherwise all methods are a no-op
6666
compileOnly 'com.stripe:stripe-android-issuing-push-provisioning:1.1.0'
6767
}
68+
69+
afterEvaluate {
70+
// check version of com.android.application - fail if 8.0.0 or higher
71+
def androidPluginVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
72+
if (androidPluginVersion >= '8.0.0') {
73+
throw new GradleException("flutter_stripe: Stripe Android SDK requires com.android.application plugin lower than 8.0.0.\nSee https://github.com/flutter-stripe/flutter_stripe/issues/1909\n")
74+
}
75+
}

packages/stripe_android/android/src/main/kotlin/com/facebook/react/bridge/ReadableMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public boolean hasKey(String key) {
4444

4545
public Integer getInt(String key) throws Exception {
4646
if (map.opt(key) instanceof Double) {
47-
throw new Exception("We've got a double here");
47+
return (int) getDouble(key);
4848
}
4949
return map.getInt(key);
5050
}

packages/stripe_ios/ios/Classes/CardFieldFactory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ extension CardFieldView {
162162
cardParams.type = STPPaymentMethodType.card
163163
cardParams.card = cardMethodParams
164164

165-
self.cardField.paymentMethodParams.card = cardMethodParams
165+
self.cardField.paymentMethodParams = STPPaymentMethodParams.paramsWith(card: cardMethodParams, billingDetails: nil, metadata: nil)
166166
self.cardField.postalCode = params["postalCode"] as? String
167167
self.cardParams = cardParams
168168
self.cardPostalCode = params["postalCode"] as? String

0 commit comments

Comments
 (0)