Skip to content

Commit b53b0ae

Browse files
Merge branch 'master' into porter/mandate-text
2 parents a858aa6 + acbf4a6 commit b53b0ae

81 files changed

Lines changed: 484 additions & 188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
name: RN Stripe
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
push:
59
branches: [master]
610
pull_request:
711
branches: ['**']
12+
paths-ignore:
13+
- '**/*.md'
14+
- '**/*.MD'
815
schedule:
916
- cron: '0 7 * * *' # run at 7 AM UTC, 12 AM PST
1017
workflow_dispatch: # manually trigger the e2e tests
@@ -188,6 +195,9 @@ jobs:
188195
- name: checkout
189196
uses: actions/checkout@v4
190197

198+
- name: Setup Xcode
199+
run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
200+
191201
- name: Get yarn cache directory path
192202
id: yarn-cache-dir-path
193203
run: echo "::set-output name=dir::$(yarn cache dir)"

.github/workflows/js-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches: [master]
66
pull_request:
77
branches: ['**']
8+
paths-ignore:
9+
- '**/*.md'
10+
- '**/*.MD'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
815

916
jobs:
1017
js-tests:

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
branches: [master]
66
pull_request:
77
branches: ['**']
8+
paths-ignore:
9+
- '**/*.md'
10+
- '**/*.MD'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
815

916
jobs:
1017
test-ios:
@@ -14,6 +21,9 @@ jobs:
1421
- name: checkout
1522
uses: actions/checkout@v4
1623

24+
- name: Setup Xcode
25+
run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
26+
1727
- name: Get yarn cache directory path
1828
id: yarn-cache-dir-path
1929
run: echo "::set-output name=dir::$(yarn cache dir)"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# CHANGELOG
22

3+
## x.x.x - x-x-x
4+
5+
**Features**
6+
- [#1956](https://github.com/stripe/stripe-react-native/pull/1956) Added support for the Billie payment method
7+
8+
**Changes**
9+
- Klarna: Made `billingDetails.email` and `billingDetails.address.country` optional when creating Klarna payment methods. See Stripe docs: [Migrate Klarna from Sources – Field mapping reference](https://docs.stripe.com/payments/klarna/migrate) ("Not required when using the Payment Element. It’s collected automatically.").
10+
11+
**Fixes**
12+
- Fixed iOS crash "Stripe SDK confirmPayment must not be null" when calling `confirmPayment` with optional parameters. Updated native bridge to properly handle nullable params argument. [#2048](https://github.com/stripe/stripe-react-native/issues/2048)
13+
314
## 0.50.3 - 2025-08-07
415

516
**Fixed**

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Get started with our [📚 integration guides](https://stripe.com/docs/payments/
2323

2424
**Native UI**: We provide native screens and elements to securely collect payment details on Android and iOS.
2525

26-
**PaymentSheet**: [Learn how to integrate](https://stripe.com/docs/payments/accept-a-payment) PaymentSheet, our new pre-built payments UI for mobile apps. PaymentSheet lets you accept cards, Apple Pay, Google Pay, and much more out of the box and also supports saving & reusing payment methods. PaymentSheet currently accepts the following payment methods: Card, Apple Pay, Google Pay, SEPA Debit, Bancontact, iDEAL, EPS, P24, Afterpay/Clearpay, Klarna, Giropay, and ACH.
26+
**PaymentSheet**: [Learn how to integrate](https://stripe.com/docs/payments/accept-a-payment) PaymentSheet, our new pre-built payments UI for mobile apps. PaymentSheet lets you accept cards, Apple Pay, Google Pay, and much more out of the box and also supports saving & reusing payment methods. PaymentSheet currently accepts the following payment methods: Card, Apple Pay, Google Pay, SEPA Debit, Bancontact, Billie, iDEAL, EPS, P24, Afterpay/Clearpay, Klarna, Giropay, and ACH.
2727

2828
#### Recommended usage
2929

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ StripeSdk_compileSdkVersion=30
33
StripeSdk_targetSdkVersion=28
44
StripeSdk_minSdkVersion=21
55
# Keep StripeSdk_stripeVersion in sync with https://github.com/stripe/stripe-identity-react-native/blob/main/android/gradle.properties
6-
StripeSdk_stripeVersion=21.22.+
6+
StripeSdk_stripeVersion=21.23.+

android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class PaymentMethodCreateParamsFactory(
3939
PaymentMethod.Type.Ideal -> createIDEALParams()
4040
PaymentMethod.Type.Alipay -> createAlipayParams()
4141
PaymentMethod.Type.Bancontact -> createBancontactParams()
42+
PaymentMethod.Type.Billie -> createBillieParams()
4243
PaymentMethod.Type.SepaDebit -> createSepaParams()
4344
PaymentMethod.Type.Oxxo -> createOXXOParams()
4445
PaymentMethod.Type.Giropay -> createGiropayParams()
@@ -90,6 +91,13 @@ class PaymentMethodCreateParamsFactory(
9091
throw PaymentMethodCreateParamsException("You must provide billing details")
9192
}
9293

94+
@Throws(PaymentMethodCreateParamsException::class)
95+
private fun createBillieParams(): PaymentMethodCreateParams =
96+
PaymentMethodCreateParams.createBillie(
97+
billingDetails = billingDetailsParams,
98+
metadata = metadataParams,
99+
)
100+
93101
@Throws(PaymentMethodCreateParamsException::class)
94102
private fun createSepaParams(): PaymentMethodCreateParams {
95103
billingDetailsParams?.let {
@@ -200,21 +208,11 @@ class PaymentMethodCreateParamsFactory(
200208
}
201209

202210
@Throws(PaymentMethodCreateParamsException::class)
203-
private fun createKlarnaParams(): PaymentMethodCreateParams {
204-
if (billingDetailsParams == null ||
205-
billingDetailsParams.address?.country.isNullOrBlank() ||
206-
billingDetailsParams.email.isNullOrBlank()
207-
) {
208-
throw PaymentMethodCreateParamsException(
209-
"Klarna requires that you provide the following billing details: email, country",
210-
)
211-
}
212-
213-
return PaymentMethodCreateParams.createKlarna(
211+
private fun createKlarnaParams(): PaymentMethodCreateParams =
212+
PaymentMethodCreateParams.createKlarna(
214213
billingDetails = billingDetailsParams,
215214
metadata = metadataParams,
216215
)
217-
}
218216

219217
@Throws(PaymentMethodCreateParamsException::class)
220218
private fun createPayPalParams(): PaymentMethodCreateParams = PaymentMethodCreateParams.createPayPal(metadata = metadataParams)
@@ -256,6 +254,7 @@ class PaymentMethodCreateParamsFactory(
256254
PaymentMethod.Type.Ideal,
257255
PaymentMethod.Type.Alipay,
258256
PaymentMethod.Type.Bancontact,
257+
PaymentMethod.Type.Billie,
259258
PaymentMethod.Type.SepaDebit,
260259
PaymentMethod.Type.Oxxo,
261260
PaymentMethod.Type.Giropay,

android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import com.stripe.android.paymentelement.PaymentMethodOptionsSetupFutureUsagePre
4545
import com.stripe.android.paymentsheet.CreateIntentCallback
4646
import com.stripe.android.paymentsheet.CreateIntentResult
4747
import com.stripe.android.paymentsheet.ExperimentalCustomerSessionApi
48-
import com.stripe.android.paymentsheet.PaymentOptionCallback
48+
import com.stripe.android.paymentsheet.PaymentOptionResultCallback
4949
import com.stripe.android.paymentsheet.PaymentSheet
5050
import com.stripe.android.paymentsheet.PaymentSheetResult
5151
import com.stripe.android.paymentsheet.PaymentSheetResultCallback
@@ -124,9 +124,9 @@ class PaymentSheetFragment :
124124
}
125125

126126
val paymentOptionCallback =
127-
PaymentOptionCallback { paymentOption ->
127+
PaymentOptionResultCallback { paymentOptionResult ->
128128
val result =
129-
paymentOption?.let {
129+
paymentOptionResult.paymentOption?.let {
130130
val bitmap = getBitmapFromVectorDrawable(context, it.drawableResourceId)
131131
val imageString = getBase64FromBitmap(bitmap)
132132
val option: WritableMap = WritableNativeMap()
@@ -272,15 +272,15 @@ class PaymentSheetFragment :
272272
PaymentSheet.FlowController
273273
.Builder(
274274
resultCallback = paymentResultCallback,
275-
paymentOptionCallback = paymentOptionCallback,
275+
paymentOptionResultCallback = paymentOptionCallback,
276276
).createIntentCallback(createIntentCallback)
277277
.confirmCustomPaymentMethodCallback(this)
278278
.build(this)
279279
} else {
280280
PaymentSheet.FlowController
281281
.Builder(
282282
resultCallback = paymentResultCallback,
283-
paymentOptionCallback = paymentOptionCallback,
283+
paymentOptionResultCallback = paymentOptionCallback,
284284
).confirmCustomPaymentMethodCallback(this)
285285
.build(this)
286286
}

android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ internal fun mapPaymentMethodType(type: PaymentMethod.Type?): String =
129129
PaymentMethod.Type.AuBecsDebit -> "AuBecsDebit"
130130
PaymentMethod.Type.BacsDebit -> "BacsDebit"
131131
PaymentMethod.Type.Bancontact -> "Bancontact"
132+
PaymentMethod.Type.Billie -> "Billie"
132133
PaymentMethod.Type.Card -> "Card"
133134
PaymentMethod.Type.CardPresent -> "CardPresent"
134135
PaymentMethod.Type.Eps -> "Eps"
@@ -159,6 +160,7 @@ internal fun mapToPaymentMethodType(type: String?): PaymentMethod.Type? =
159160
"AuBecsDebit" -> PaymentMethod.Type.AuBecsDebit
160161
"BacsDebit" -> PaymentMethod.Type.BacsDebit
161162
"Bancontact" -> PaymentMethod.Type.Bancontact
163+
"Billie" -> PaymentMethod.Type.Billie
162164
"AfterpayClearpay" -> PaymentMethod.Type.AfterpayClearpay
163165
"CardPresent" -> PaymentMethod.Type.CardPresent
164166
"Eps" -> PaymentMethod.Type.Eps

e2e-tests/afterpay-clearpay.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
appId: ${APP_ID}
22
---
3-
- launchApp
3+
- launchApp:
4+
clearState: true
45
- tapOn: "Buy now pay later"
56
- scrollUntilVisible:
67
element:

0 commit comments

Comments
 (0)