Skip to content

Commit 945d703

Browse files
committed
feat(stripe): add option google_pay_existing_payment_method_required
1 parent 5de9e66 commit 945d703

File tree

5 files changed

+47
-41
lines changed

5 files changed

+47
-41
lines changed

Diff for: package-lock.json

+19-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"zenn-content-css": "^0.1.100"
2020
},
2121
"devDependencies": {
22-
"@capacitor-community/admob": "^4.2.0",
23-
"@capacitor-community/stripe": "^5.4.0",
22+
"@capacitor-community/admob": "^5.3.1",
23+
"@capacitor-community/stripe": "^5.5.1",
2424
"@capacitor/docgen": "^0.1.0",
2525
"@types/fs-extra": "^9.0.13",
2626
"@types/glob": "^7.2.0",

Diff for: src/docs/stripe/google-pay.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ In file `android/app/src/main/AndroidManifest.xml`, add the following XML elemen
7979
android:value="@bool/google_pay_is_testing"/>
8080
```
8181

82-
#### Optional: If you get user information, set these:
82+
#### Optional1: If you get user information, set these:
8383

8484
Added metadata options to specify what, if any, billing info to require from Google Pay. Add the following entries to strings.xml in the Android project to enable additional data:
8585

@@ -112,6 +112,25 @@ android:name="com.getcapacitor.community.stripe.billing_address_format"
112112
android:value="@string/billing_address_format"/>
113113
```
114114

115+
#### Optional2: If you don't require existing payment method at Googl Pay:
116+
117+
If false, Google Pay is "not" considered ready if the customer's Google Pay wallet has existing payment methods.
118+
Default to true.
119+
120+
In file `android/app/src/main/res/values/strings.xml` add the these value.
121+
122+
```xml
123+
<bool name="google_pay_existing_payment_method_required">false</bool>
124+
```
125+
126+
And in file `android/app/src/main/AndroidManifest.xml`, add the following XML elements under `manifest > application`.
127+
128+
```xml
129+
<meta-data
130+
android:name="com.getcapacitor.community.stripe.google_pay_existing_payment_method_required"
131+
android:value="@bool/google_pay_existing_payment_method_required"/>
132+
```
133+
115134
### 1. isGooglePayAvailable
116135
First, you should check to be able to use Google Pay on device.
117136

Diff for: src/docs/stripe/google-pay/android-manifest.xml.md

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ file: "AndroidManifest.xml"
7878
<meta-data
7979
android:name="com.getcapacitor.community.stripe.billing_address_format"
8080
android:value="@string/billing_address_format"/>
81+
82+
<meta-data
83+
android:name="com.getcapacitor.community.stripe.google_pay_existing_payment_method_required"
84+
android:value="@string/google_pay_existing_payment_method_required"/>
8185
</application>
8286

8387
<!-- Permissions -->

Diff for: src/docs/stripe/google-pay/strings.xml.md

+2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ file: "strings.xml"
2020
<bool name="phone_number_required">true</bool>
2121
<bool name="billing_address_required">true</bool>
2222
<string name="billing_address_format">Full</string>
23+
24+
<bool name="google_pay_existing_payment_method_required">false</bool>
2325
</resources>
2426
```

0 commit comments

Comments
 (0)